natureco-cli 5.18.3 → 5.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/package.json +1 -1
  2. package/skills/airunway-aks-setup/SKILL.md +73 -0
  3. package/skills/algorithmic-art/SKILL.md +405 -0
  4. package/skills/appinsights-instrumentation/SKILL.md +76 -0
  5. package/skills/azure-ai/SKILL.md +71 -0
  6. package/skills/azure-aigateway/SKILL.md +129 -0
  7. package/skills/azure-cloud-migrate/SKILL.md +52 -0
  8. package/skills/azure-compliance/SKILL.md +108 -0
  9. package/skills/azure-compute/SKILL.md +46 -0
  10. package/skills/azure-cost/SKILL.md +45 -0
  11. package/skills/azure-deploy/SKILL.md +97 -0
  12. package/skills/azure-diagnostics/SKILL.md +151 -0
  13. package/skills/azure-enterprise-infra-planner/SKILL.md +54 -0
  14. package/skills/azure-hosted-copilot-sdk/SKILL.md +89 -0
  15. package/skills/azure-kubernetes/SKILL.md +153 -0
  16. package/skills/azure-kusto/SKILL.md +231 -0
  17. package/skills/azure-messaging/SKILL.md +57 -0
  18. package/skills/azure-prepare/SKILL.md +165 -0
  19. package/skills/azure-quotas/SKILL.md +276 -0
  20. package/skills/azure-rbac/SKILL.md +17 -0
  21. package/skills/azure-reliability/SKILL.md +387 -0
  22. package/skills/azure-resource-lookup/SKILL.md +108 -0
  23. package/skills/azure-resource-visualizer/SKILL.md +183 -0
  24. package/skills/azure-storage/SKILL.md +100 -0
  25. package/skills/azure-upgrade/SKILL.md +91 -0
  26. package/skills/azure-validate/SKILL.md +72 -0
  27. package/skills/brainstorming/SKILL.md +159 -0
  28. package/skills/brand-guidelines/SKILL.md +73 -0
  29. package/skills/brandkit/SKILL.md +798 -0
  30. package/skills/brutalist-skill/SKILL.md +92 -0
  31. package/skills/canvas-design/SKILL.md +130 -0
  32. package/skills/cavecrew/SKILL.md +82 -0
  33. package/skills/caveman-commit/SKILL.md +65 -0
  34. package/skills/caveman-help/SKILL.md +63 -0
  35. package/skills/caveman-review/SKILL.md +55 -0
  36. package/skills/caveman-stats/SKILL.md +10 -0
  37. package/skills/claude-api/SKILL.md +356 -0
  38. package/skills/composition-patterns/SKILL.md +89 -0
  39. package/skills/decision-mapping/SKILL.md +84 -0
  40. package/skills/deploy-to-vercel/SKILL.md +296 -0
  41. package/skills/design-an-interface/SKILL.md +94 -0
  42. package/skills/design-doc-mermaid/SKILL.md +498 -0
  43. package/skills/develop-userscripts/SKILL.md +84 -0
  44. package/skills/doc-coauthoring/SKILL.md +375 -0
  45. package/skills/documentation/SKILL.md +109 -0
  46. package/skills/docx/SKILL.md +590 -0
  47. package/skills/edit-article/SKILL.md +15 -0
  48. package/skills/entra-agent-id/SKILL.md +356 -0
  49. package/skills/entra-app-registration/SKILL.md +191 -0
  50. package/skills/faceless-explainer/SKILL.md +202 -0
  51. package/skills/fastify/SKILL.md +75 -0
  52. package/skills/general-video/SKILL.md +143 -0
  53. package/skills/git-guardrails-claude-code/SKILL.md +95 -0
  54. package/skills/github-actions-docs/SKILL.md +98 -0
  55. package/skills/gpt-tasteskill/SKILL.md +74 -0
  56. package/skills/grill-me/SKILL.md +7 -0
  57. package/skills/grilling/SKILL.md +10 -0
  58. package/skills/handoff/SKILL.md +16 -0
  59. package/skills/hyperframes/SKILL.md +152 -0
  60. package/skills/hyperframes-animation/SKILL.md +82 -0
  61. package/skills/hyperframes-cli/SKILL.md +109 -0
  62. package/skills/hyperframes-core/SKILL.md +78 -0
  63. package/skills/hyperframes-creative/SKILL.md +68 -0
  64. package/skills/hyperframes-media/SKILL.md +97 -0
  65. package/skills/image-to-code-skill/SKILL.md +1228 -0
  66. package/skills/imagegen-frontend-mobile/SKILL.md +1465 -0
  67. package/skills/imagegen-frontend-web/SKILL.md +987 -0
  68. package/skills/implement/SKILL.md +15 -0
  69. package/skills/init/SKILL.md +91 -0
  70. package/skills/internal-comms/SKILL.md +32 -0
  71. package/skills/lark-approval/SKILL.md +56 -0
  72. package/skills/lark-base/SKILL.md +157 -0
  73. package/skills/lark-doc/SKILL.md +81 -0
  74. package/skills/lark-shared/SKILL.md +168 -0
  75. package/skills/lark-workflow-meeting-summary/SKILL.md +122 -0
  76. package/skills/linting-neostandard-eslint9/SKILL.md +64 -0
  77. package/skills/loop-me/SKILL.md +32 -0
  78. package/skills/microsoft-foundry/SKILL.md +262 -0
  79. package/skills/migrate-to-shoehorn/SKILL.md +118 -0
  80. package/skills/minimalist-skill/SKILL.md +85 -0
  81. package/skills/motion-graphics/SKILL.md +170 -0
  82. package/skills/music-to-video/SKILL.md +197 -0
  83. package/skills/node/SKILL.md +94 -0
  84. package/skills/nodejs-core/SKILL.md +156 -0
  85. package/skills/oauth/SKILL.md +186 -0
  86. package/skills/obsidian-vault/SKILL.md +59 -0
  87. package/skills/octocat/SKILL.md +93 -0
  88. package/skills/openclaw-secure-linux-cloud/SKILL.md +157 -0
  89. package/skills/opensource-guide-coach/SKILL.md +218 -0
  90. package/skills/output-skill/SKILL.md +49 -0
  91. package/skills/pdf/SKILL.md +314 -0
  92. package/skills/pptx/SKILL.md +232 -0
  93. package/skills/pr-to-video/SKILL.md +235 -0
  94. package/skills/product-launch-video/SKILL.md +205 -0
  95. package/skills/python-appservice-deploy/SKILL.md +36 -0
  96. package/skills/qa/SKILL.md +130 -0
  97. package/skills/react-best-practices/SKILL.md +149 -0
  98. package/skills/react-native-skills/SKILL.md +121 -0
  99. package/skills/react-view-transitions/SKILL.md +320 -0
  100. package/skills/readme-i18n/SKILL.md +176 -0
  101. package/skills/redesign-skill/SKILL.md +178 -0
  102. package/skills/remotion/SKILL.md +364 -0
  103. package/skills/request-refactor-plan/SKILL.md +68 -0
  104. package/skills/resolving-merge-conflicts/SKILL.md +14 -0
  105. package/skills/running-claude-code-via-litellm-copilot/SKILL.md +263 -0
  106. package/skills/scaffold-exercises/SKILL.md +106 -0
  107. package/skills/secure-linux-web-hosting/SKILL.md +162 -0
  108. package/skills/setup-pre-commit/SKILL.md +91 -0
  109. package/skills/shadcn/SKILL.md +267 -0
  110. package/skills/simple/SKILL.md +52 -0
  111. package/skills/skill-creator/SKILL.md +485 -0
  112. package/skills/skill-optimizer/SKILL.md +47 -0
  113. package/skills/skills-cli/SKILL.md +281 -0
  114. package/skills/slack-gif-creator/SKILL.md +254 -0
  115. package/skills/snipgrapher/SKILL.md +58 -0
  116. package/skills/soft-skill/SKILL.md +98 -0
  117. package/skills/stitch-skill/SKILL.md +184 -0
  118. package/skills/supabase/SKILL.md +135 -0
  119. package/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  120. package/skills/systematic-debugging/SKILL.md +296 -0
  121. package/skills/talking-head-recut/SKILL.md +1191 -0
  122. package/skills/taste-skill/SKILL.md +1206 -0
  123. package/skills/taste-skill-v1/SKILL.md +226 -0
  124. package/skills/tdd/SKILL.md +108 -0
  125. package/skills/teach/SKILL.md +140 -0
  126. package/skills/test-driven-development/SKILL.md +371 -0
  127. package/skills/theme-factory/SKILL.md +59 -0
  128. package/skills/to-prd/SKILL.md +75 -0
  129. package/skills/typescript-magician/SKILL.md +117 -0
  130. package/skills/tzst/SKILL.md +68 -0
  131. package/skills/ubiquitous-language/SKILL.md +93 -0
  132. package/skills/use-my-browser/SKILL.md +110 -0
  133. package/skills/using-superpowers/SKILL.md +121 -0
  134. package/skills/vercel-cli-with-tokens/SKILL.md +353 -0
  135. package/skills/vercel-optimize/SKILL.md +322 -0
  136. package/skills/viral-instagram-reels/SKILL.md +180 -0
  137. package/skills/viral-short-form/SKILL.md +147 -0
  138. package/skills/viral-short-form-ideas/SKILL.md +184 -0
  139. package/skills/viral-tiktok-content/SKILL.md +180 -0
  140. package/skills/web-artifacts-builder/SKILL.md +74 -0
  141. package/skills/web-design-guidelines/SKILL.md +39 -0
  142. package/skills/webapp-testing/SKILL.md +96 -0
  143. package/skills/website-to-video/SKILL.md +145 -0
  144. package/skills/writing-beats/SKILL.md +67 -0
  145. package/skills/writing-fragments/SKILL.md +79 -0
  146. package/skills/writing-great-skills/SKILL.md +82 -0
  147. package/skills/writing-guidelines/SKILL.md +39 -0
  148. package/skills/writing-plans/SKILL.md +174 -0
  149. package/skills/writing-shape/SKILL.md +79 -0
  150. package/skills/xdrop/SKILL.md +78 -0
  151. package/skills/xget/SKILL.md +87 -0
  152. package/skills/xlsx/SKILL.md +292 -0
  153. package/src/tools/skills_download.js +217 -0
  154. package/src/utils/tools.js +2 -2
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: minimalist-ui
3
+ description: Clean editorial-style interfaces. Warm monochrome palette, typographic contrast, flat bento grids, muted pastels. No gradients, no heavy shadows.
4
+ ---
5
+
6
+ # Protocol: Premium Utilitarian Minimalism UI Architect
7
+
8
+ ## 1. Protocol Overview
9
+ Name: Premium Utilitarian Minimalism & Editorial UI
10
+ Description: An advanced frontend engineering directive for generating highly refined, ultra-minimalist, "document-style" web interfaces analogous to top-tier workspace platforms. This protocol strictly enforces a high-contrast warm monochrome palette, bespoke typographic hierarchies, meticulous structural macro-whitespace, bento-grid layouts, and an ultra-flat component architecture with deliberate muted pastel accents. It actively rejects standard generic SaaS design trends.
11
+
12
+ ## 2. Absolute Negative Constraints (Banned Elements)
13
+ The AI must strictly avoid the following generic web development defaults:
14
+ - DO NOT use the "Inter", "Roboto", or "Open Sans" typefaces.
15
+ - DO NOT use generic, thin-line icon libraries like "Lucide", "Feather", or standard "Heroicons".
16
+ - DO NOT use Tailwind's default heavy drop shadows (e.g., `shadow-md`, `shadow-lg`, `shadow-xl`). Shadows must be practically non-existent or heavily customized to be ultra-diffuse and low opacity (< 0.05).
17
+ - DO NOT use primary colored backgrounds for large elements or sections (e.g., no bright blue, green, or red hero sections).
18
+ - DO NOT use gradients, neon colors, or 3D glassmorphism (beyond subtle navbar blurs).
19
+ - DO NOT use `rounded-full` (pill shapes) for large containers, cards, or primary buttons.
20
+ - DO NOT use emojis anywhere in code, markup, text content, headings, or alt text. Replace with proper icons or clean SVG primitives.
21
+ - DO NOT use generic placeholder names like "John Doe", "Acme Corp", or "Lorem Ipsum". Use realistic, contextual content.
22
+ - DO NOT use AI copywriting clichés: "Elevate", "Seamless", "Unleash", "Next-Gen", "Game-changer", "Delve". Write plain, specific language.
23
+
24
+ ## 3. Typographic Architecture
25
+ The interface must rely on extreme typographic contrast and premium font selection to establish an editorial feel.
26
+ - Primary Sans-Serif (Body, UI, Buttons): Use clean, geometric, or system-native fonts with character. Target: `font-family: 'SF Pro Display', 'Geist Sans', 'Helvetica Neue', 'Switzer', sans-serif`.
27
+ - Editorial Serif (Hero Headings & Quotes): Target: `font-family: 'Lyon Text', 'Newsreader', 'Playfair Display', 'Instrument Serif', serif`. Apply tight tracking (`letter-spacing: -0.02em` to `-0.04em`) and tight line-height (`1.1`).
28
+ - Monospace (Code, Keystrokes, Meta-data): Target: `font-family: 'Geist Mono', 'SF Mono', 'JetBrains Mono', monospace`.
29
+ - Text Colors: Body text must never be absolute black (`#000000`). Use off-black/charcoal (`#111111` or `#2F3437`) with a generous `line-height` of `1.6` for legibility. Secondary text should be muted gray (`#787774`).
30
+
31
+ ## 4. Color Palette (Warm Monochrome + Spot Pastels)
32
+ Color is a scarce resource, utilized only for semantic meaning or subtle accents.
33
+ - Canvas / Background: Pure White `#FFFFFF` or Warm Bone/Off-White `#F7F6F3` / `#FBFBFA`.
34
+ - Primary Surface (Cards): `#FFFFFF` or `#F9F9F8`.
35
+ - Structural Borders / Dividers: Ultra-light gray `#EAEAEA` or `rgba(0,0,0,0.06)`.
36
+ - Accent Colors: Exclusively use highly desaturated, washed-out pastels for tags, inline code backgrounds, or subtle icon backgrounds.
37
+ - Pale Red: `#FDEBEC` (Text: `#9F2F2D`)
38
+ - Pale Blue: `#E1F3FE` (Text: `#1F6C9F`)
39
+ - Pale Green: `#EDF3EC` (Text: `#346538`)
40
+ - Pale Yellow: `#FBF3DB` (Text: `#956400`)
41
+
42
+ ## 5. Component Specifications
43
+ - Bento Box Feature Grids:
44
+ - Utilize asymmetrical CSS Grid layouts.
45
+ - Cards must have exactly `border: 1px solid #EAEAEA`.
46
+ - Border-radius must be crisp: `8px` or `12px` maximum.
47
+ - Internal padding must be generous (e.g., `24px` to `40px`).
48
+ - Primary Call-To-Action (Buttons):
49
+ - Solid background `#111111`, text `#FFFFFF`.
50
+ - Slight border-radius (`4px` to `6px`). No box-shadow.
51
+ - Hover state should be a subtle color shift to `#333333` or a micro-scale `transform: scale(0.98)`.
52
+ - Tags & Status Badges:
53
+ - Pill-shaped (`border-radius: 9999px`), very small typography (`text-xs`), uppercase with wide tracking (`letter-spacing: 0.05em`).
54
+ - Background must use the defined Muted Pastels.
55
+ - Accordions (FAQ):
56
+ - Strip all container boxes. Separate items only with a `border-bottom: 1px solid #EAEAEA`.
57
+ - Use a clean, sharp `+` and `-` icon for the toggle state.
58
+ - Keystroke Micro-UIs:
59
+ - Render shortcuts as physical keys using `<kbd>` tags: `border: 1px solid #EAEAEA`, `border-radius: 4px`, `background: #F7F6F3`, using the Monospace font.
60
+ - Faux-OS Window Chrome:
61
+ - When mocking up software, wrap it in a minimalist container with a white top bar containing three small, light gray circles (replicating macOS window controls).
62
+
63
+ ## 6. Iconography & Imagery Directives
64
+ - System Icons: Use "Phosphor Icons (Bold or Fill weights)" or "Radix UI Icons" for a technical, slightly thicker-stroke aesthetic. Standardize stroke width across all icons.
65
+ - Illustrations: Monochromatic, rough continuous-line ink sketches on a white background, featuring a single offset geometric shape filled with a muted pastel color.
66
+ - Photography: Use high-quality, desaturated images with a warm tone. Apply subtle overlays (`opacity: 0.04` warm grain) to blend photos into the monochrome palette. Never use oversaturated stock photos. Use reliable placeholders like `https://picsum.photos/seed/{context}/1200/800` when real assets are unavailable.
67
+ - Hero & Section Backgrounds: Sections should not feel empty and flat. Use subtle full-width background imagery at very low opacity, soft radial light spots (`radial-gradient` with warm tones at `opacity: 0.03`), or minimal geometric line patterns to add depth without breaking the clean aesthetic.
68
+
69
+ ## 7. Subtle Motion & Micro-Animations
70
+ Motion should feel invisible — present but never distracting. The goal is quiet sophistication, not spectacle.
71
+ - Scroll Entry: Elements fade in gently as they enter the viewport. Use `translateY(12px)` + `opacity: 0` resolving over `600ms` with `cubic-bezier(0.16, 1, 0.3, 1)`. Use `IntersectionObserver`, never `window.addEventListener('scroll')`.
72
+ - Hover States: Cards lift with an ultra-subtle shadow shift (`box-shadow` transitioning from `0 0 0` to `0 2px 8px rgba(0,0,0,0.04)` over `200ms`). Buttons respond with `scale(0.98)` on `:active`.
73
+ - Staggered Reveals: Lists and grid items enter with a cascade delay (`animation-delay: calc(var(--index) * 80ms)`). Never mount everything at once.
74
+ - Background Ambient Motion: Optional. A single, very slow-moving radial gradient blob (`animation-duration: 20s+`, `opacity: 0.02-0.04`) drifting behind hero sections. Must be applied to a `position: fixed; pointer-events: none` layer. Never on scrolling containers.
75
+ - Performance: Animate exclusively via `transform` and `opacity`. No layout-triggering properties (`top`, `left`, `width`, `height`). Use `will-change: transform` sparingly and only on actively animating elements.
76
+
77
+ ## 8. Execution Protocol
78
+ When tasked with writing frontend code (HTML, React, Tailwind, Vue) or designing a layout:
79
+ 1. Establish the macro-whitespace first. Use massive vertical padding between sections (e.g., `py-24` or `py-32` in Tailwind).
80
+ 2. Constrain the main typography content width to `max-w-4xl` or `max-w-5xl`.
81
+ 3. Apply the custom typographic hierarchy and monochromatic color variables immediately.
82
+ 4. Ensure every card, divider, and border adheres strictly to the `1px solid #EAEAEA` rule.
83
+ 5. Add scroll-entry animations to all major content blocks.
84
+ 6. Ensure sections have visual depth through imagery, ambient gradients, or subtle textures — no empty flat backgrounds.
85
+ 7. Provide code that reflects this high-end, uncluttered, editorial aesthetic natively without requiring manual adjustments.
@@ -0,0 +1,170 @@
1
+ ---
2
+ name: motion-graphics
3
+ description: >
4
+ Use when the user wants a short, design-led motion graphic where motion is the
5
+ message: kinetic typography, stat or number count-up, chart/data-viz hit,
6
+ logo sting, brand lockup, lower-third, callout, social overlay, animated
7
+ headline/tweet/news item, motion poster, or quick captured-page highlight.
8
+ Usually under 10s and up to ~30s, with no narration arc, voice-over, or
9
+ live-action subject. Can render to MP4 or transparent overlay. Not for longer,
10
+ multi-scene, narrated, or brand-reel pieces (use general-video), narrated
11
+ website videos (website-to-video), topic explainers
12
+ (faceless-explainer), product promos (product-launch-video), PR videos
13
+ (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a
14
+ quick motion-first piece or a longer / narrated treatment, see /hyperframes.
15
+ metadata:
16
+ {
17
+ "tags": "orchestrator, motion-graphics, kinetic-type, data-viz, logo-reveal, lower-thirds, news, tweet, webpage, asset-fusion, short-form, overlay, no-narration",
18
+ }
19
+ ---
20
+
21
+ # motion-graphics — dispatch entry
22
+
23
+ > **Confirm the route before Step 0.** This skill makes a **short, design-led, unnarrated motion graphic** (motion is the message; ~under 10s, no voice-over). A **longer, multi-scene, or narrated** treatment → `/general-video`; a **narrated video of a website** → `/website-to-video`; a **topic explainer** → `/faceless-explainer`; a **product promo** → `/product-launch-video`; **captions on existing footage** → `/embedded-captions`. **Out of scope**: live / at-render-time data, or footage it can't capture. Unsure motion-first-vs-narrated? **Read `/hyperframes` first.**
24
+
25
+ A short design-led motion graphic. **Asset-first**: decide the asset strategy and source real material _before_ designing the shot, then design the shot around what you have, then compose by reusing catalog capabilities. All artifacts go to `PROJECT_DIR = videos/<project-name>/` (created in Step 0); all paths below are relative to it.
26
+
27
+ | Phase | Execution | Primary artifact | Detailed flow |
28
+ | -------- | --------------------------------------------------------------------- | ---------------------------------------------------------------- | ----------------------------- |
29
+ | init | Bash | `hyperframes.json` | Step 0 |
30
+ | plan | subagent — **decide search?** + classify + asset strategy | `shot-plan.json` (draft: category, `asset_needs` queries, brief) | `agents/director.md` (Part 1) |
31
+ | source ◇ | Bash — media-use resolve (**skip if `asset_needs` is empty**) | `assets/` + `assets/index.md` | `phases/source/guide.md` |
32
+ | design | subagent — shot design around resolved assets | `shot-plan.json` (final: block(s) + layout + motion + positions) | `agents/director.md` (Part 2) |
33
+ | build | subagent — reuse-first composition | `compositions/index.html` | `agents/builder.md` |
34
+ | render | Bash — `hyperframes render` (MP4, or `--format webm/mov` for overlay) | `renders/video.mp4` | Step 5 |
35
+ | verify | Bash — `lint` / `inspect` -> repair subagent on failure | (fixes in place) | `agents/finalize.md` |
36
+
37
+ `◇ source` runs only when the chosen category declares assets. Pure code/text categories (e.g. `kinetic-type`, most `charts`/`stat`) have `asset_needs: []` and skip straight from plan to design.
38
+
39
+ ## Categories — split by the search decision
40
+
41
+ `plan`'s **first decision is: does this need a search?** That fork splits the categories into two groups; then the specific category is picked — for search-driven, **by the type of content the search returns**. Each category is one `categories/<id>/module.md` (its planning + build rules); the shared motion vocabulary lives in `references/motion-vocabulary.md` (→ `hyperframes-animation` rules/blueprints + registry blocks).
42
+
43
+ **Form categories — no search; the user supplies the content:**
44
+
45
+ | Category | Intent | Leans on |
46
+ | -------------- | ---------------------------------------------- | --------------------------------------------------------------------------- |
47
+ | `kinetic-type` | punchy line / quote / title, motion-first text | `caption-*` blocks + animation rules |
48
+ | `stat` | single hero number / count-up + ring | `apple-money-count` / `rules/{counting-dynamic-scale, stat-bars-and-fills}` |
49
+ | `charts` | bar / line / pie / race / % from data | `data-chart` block |
50
+ | `logo-reveal` | logo sting / brand lockup (user logo) | `logo-outro` / `rules/svg-path-draw` |
51
+ | `lower-thirds` | name / title bars, callouts, social overlays | `caption-*` + registry overlay blocks |
52
+
53
+ **Search-driven categories — search first, then animate by content type** (the RWA path):
54
+
55
+ | Returned content | Category | Animation |
56
+ | ---------------- | -------------- | -------------------------------------------------------------- |
57
+ | webpage / link | `webpage` | webpage / UI animation (scroll, reveal, cursor, callouts) |
58
+ | news article | `news` | headline reveal + source card + key-fact callouts |
59
+ | tweet | `tweet` | animated tweet card |
60
+ | image / entity | `asset-fusion` | the asset's geometry _becomes_ the chart (RWA diegetic fusion) |
61
+
62
+ Build order: one at a time, coverage-first (rough is fine). `kinetic-type` ported from the prototype; the rest follow.
63
+
64
+ ## Prerequisites
65
+
66
+ macOS Apple Silicon or Linux x64. System tools: `brew install node ffmpeg`. `npx hyperframes doctor` once. macOS GPU render: `export PRODUCER_BROWSER_GPU_MODE=hardware`.
67
+
68
+ Optional keys (local fallbacks if unset) — only needed by categories that source/generate assets via media-use:
69
+
70
+ | Key | Used for | Fallback |
71
+ | ----------------------------------- | ----------------------------------------------------------- | ------------------------------- |
72
+ | `GEMINI_API_KEY` / `GOOGLE_API_KEY` | image generation (media-use resolve) | skip generate / search-only |
73
+ | (asset_scout / search providers) | `webpage`/`news`/`tweet` + `asset-fusion` real-asset search | category degrades to asset-free |
74
+
75
+ ## Flow
76
+
77
+ ### Step 0 — Initialize
78
+
79
+ cwd is the agent workspace root; write all artifacts under `PROJECT_DIR = videos/<project-name>/`. `<project-name>`: use the dir the user gave, else a short kebab-case name from the intent (`<subject>-motion`). Not the workspace basename or a timestamp.
80
+
81
+ Only when `$PROJECT_DIR/hyperframes.json` is absent:
82
+
83
+ ```bash
84
+ PROJECT_DIR="${MOTION_GRAPHICS_DIR:-videos/<project-name>}"
85
+ mkdir -p "$(dirname "$PROJECT_DIR")"
86
+ npx hyperframes init "$PROJECT_DIR" --non-interactive --skip-skills --example=blank
87
+ ```
88
+
89
+ **Constraints:** never `hyperframes init` in the workspace root; never nest another `hyperframes/` inside `PROJECT_DIR`; every Bash command (master + subagents) is a `(cd "$PROJECT_DIR" && ...)` subshell — never bare `cd`.
90
+
91
+ ### Step 1 — Plan (subagent: Director Part 1)
92
+
93
+ Dispatch one subagent. prompt = full `agents/director.md` + `## Dispatch context` (`SKILL_DIR` / `PROJECT_DIR` / the user's request / `Schema: <SKILL_DIR>/references/shot-plan-ir.md`). It must:
94
+
95
+ 1. **Decide: does this need a search?** (the first fork)
96
+ - **No** → pick a **form category** (kinetic-type / stat / charts / logo-reveal / lower-thirds); content is user-supplied; `asset_needs: []`.
97
+ - **Yes** → emit a **search plan** into `asset_needs[]` (news / web / tweet / image; two-pole queries). The specific **search-driven category** (webpage / news / tweet / asset-fusion) is confirmed by the content type returned in Step 2, and finalized in Step 3.
98
+ 2. Write a draft `shot-plan.json` (envelope + chosen form category _or_ search intent + `asset_needs` + a one-paragraph shot brief). Schema: `references/shot-plan-ir.md`.
99
+
100
+ Validation: `[ -s "$PROJECT_DIR/shot-plan.json" ] && echo ok || echo missing`.
101
+
102
+ ### Step 2 — Source ◇ (Bash: media-use, conditional)
103
+
104
+ If `shot-plan.json.asset_needs` is non-empty, resolve assets (search / generate / fetch → frozen project-local paths + ledger). See `phases/source/guide.md` (wraps `media-use resolve`; the search-driven categories use the news/web/tweet/image search). If `asset_needs` is empty, **skip to Step 3**.
105
+
106
+ ```bash
107
+ # illustrative — see phases/source/guide.md
108
+ (cd "$PROJECT_DIR" && node <SKILL_DIR>/phases/source/resolve.mjs --plan ./shot-plan.json --out ./assets)
109
+ ```
110
+
111
+ Degrade gracefully: if a search/provider is unavailable, the category falls back to asset-free (note it in `context.log`).
112
+
113
+ ### Step 3 — Design (subagent: Director Part 2)
114
+
115
+ Dispatch a subagent (prompt = `agents/director.md` Part 2 + dispatch context including the resolved `assets/index.md` if Step 2 ran + `catalog-map.md`). It designs the shot **around the available assets**: pick the catalog block(s) + the `hyperframes-animation` rules/blueprints, the layout, the motion, beats, and (for `asset-fusion`) the `element_positions` + eyedropper palette. Finalizes `shot-plan.json` (`content.block` + `content.customize` + per-category content).
116
+
117
+ ### Step 4 — Build (subagent: Builder, reuse-first)
118
+
119
+ Dispatch a subagent. prompt = full `agents/builder.md` + dispatch context (`shot-plan.json`, `catalog-map.md`, the category's `module.md`, `references/motion-vocabulary.md`, `references/builder-contract.md`). **Reuse-first**: `npx hyperframes add <block>` + customize in place; hand-author only gaps + the asset-fusion affordance. Output `compositions/index.html` honoring the HF contract (paused GSAP timeline on `window.__timelines`, `class="clip"` + stable ids, `tl.seek(0)`, deterministic).
120
+
121
+ ### Step 5 — Render (Bash)
122
+
123
+ ```bash
124
+ (cd "$PROJECT_DIR" && npx hyperframes render . --skill=motion-graphics -q draft -o ./renders/video.mp4)
125
+ # transparent overlay variant: --format webm (or mov)
126
+ ```
127
+
128
+ ### Step 6 — Verify (Bash → repair subagent on failure)
129
+
130
+ ```bash
131
+ (cd "$PROJECT_DIR" && npx hyperframes lint . && npx hyperframes inspect .)
132
+ ```
133
+
134
+ exit 0 → done. On lint/inspect errors, dispatch the repair subagent (`agents/finalize.md`: snapshot QA + one in-place fix pass + re-render). Never change a fixed duration in repair.
135
+
136
+ ### Report + optional preview
137
+
138
+ Report the final output (`renders/video.mp4`, or the `.webm` / `.mov` overlay variant) + duration. **Don't open a preview during the run.** Offer one only on request, started **after** render so it serves the final file:
139
+
140
+ ```bash
141
+ (cd "$PROJECT_DIR" && npx hyperframes preview) # Studio UI; or `npx hyperframes play` for a shareable link
142
+ ```
143
+
144
+ Flags live in the `hyperframes-cli` skill (`references/preview-render.md`).
145
+
146
+ ## Resume table
147
+
148
+ | State | Continue from |
149
+ | -------------------------------------------------------- | ------------------------ |
150
+ | no `shot-plan.json` | Step 1 (plan) |
151
+ | `shot-plan.json` has `asset_needs`, no `assets/` | Step 2 (source) |
152
+ | `shot-plan.json` final, no `compositions/index.html` | Step 3/4 (design+build) |
153
+ | `compositions/index.html` exists, no `renders/video.mp4` | Step 5 (render) + Step 6 |
154
+ | `renders/video.mp4` exists | Report + stop |
155
+
156
+ ## Design notes (maintainers — execution does not read this)
157
+
158
+ - **Asset-first rationale:** sourcing is front-loaded and informs shot design (the RWA flow: analyze → search → review → compose). the search-driven categories (`webpage`/`news`/`tweet`) and `asset-fusion` both lean on media-use search (news/web/tweet/image), which is media-use's documented RWA lineage.
159
+ - **Reuse-first:** the in-ecosystem analog of LLM-generated templates is "compose catalog blocks + `hyperframes-animation` rules". HF's paused GSAP timeline ≙ Remotion's `useCurrentFrame`.
160
+ - **Category module contract:** one `categories/<id>/module.md` (planning + build), sharing `references/motion-vocabulary.md` (+ optional eval). Adding a category = drop the folder + register its classifier line in `agents/director.md` + its row in `catalog-map.md`; the phase pipeline is untouched.
161
+ - **Directory shape:**
162
+ ```
163
+ videos/<project-name>/
164
+ hyperframes.json context.log
165
+ shot-plan.json # the IR (Director output)
166
+ assets/ assets/index.md # media-use output (if sourced)
167
+ compositions/index.html # Builder output
168
+ renders/video.mp4
169
+ ```
170
+ - **Registration:** in `hyperframes` router — add the "design-led short motion graphic" intent + Workflow description; carve the motion-graphics triggers out of `/general-video`; add reverse Do-NOT-use edges. See `motion-graphics-genre.md` §5-7.
@@ -0,0 +1,197 @@
1
+ ---
2
+ name: music-to-video
3
+ description: "Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it."
4
+ ---
5
+
6
+ # music-to-video — one music-grounded, beat-synced video workflow
7
+
8
+ Use this skill to turn a **music track** into a beat-synced HyperFrames video. You analyze the track once, lay out the frames, fill in a per-frame plan, and build each frame as a composition. The input is a music track plus optional user images or videos — there is **no narration and no website capture**. Typography and templates are the floor (a complete video needs zero assets); any media the user supplies is cut in on the same beat grid.
9
+
10
+ You are the **orchestrator**. Work in `videos/<project>/`. Run the steps in order and pass each **Gate** before moving on. Two steps need the user: **Step 3** (plan approval) and **Step 6** (render approval). Do every step yourself except **Step 4**, where you dispatch **one sub-agent per frame**. Keep design and motion rules out of this file — they live in `references/` and the `frame-worker` sub-agent.
11
+
12
+ `SKILL_DIR` = this skill directory. `PROJECT_DIR` = `videos/<project-name>/`.
13
+
14
+ Workflow: Step 0 setup → `hyperframes.json` + `assets/bgm.mp3`; Step 1 analyze → `audiomap.json`; Step 2 skeleton → `STORYBOARD.md` (frames, groups `TBD`); Step 3 plan → complete `STORYBOARD.md` + `frame.md`; Step 4 build → `compositions/frames/NN-*.html`; Step 5 assemble → `index.html`; Step 6 render → `renders/video.mp4`.
15
+
16
+ ## Two ideas that shape everything
17
+
18
+ - **One analyzer, and you trust it.** `analyze-beatgrid.py` is the only beat analyzer — never re-measure beats with another tool or by ear. Its energy / density / rolls / onsets / silences are always reliable. Its `bpm` and `beats_sec` are reliable **only when the music is genuinely rhythmic**; on calm music the grid is a metronome the tracker imposed, so pace by phrases and energy instead and never hard-cut to it. Deciding which case you're in is each frame's `pacing` (Step 2).
19
+ - **One frame = one file; groups live inside.** Step 2 cuts the track into **frames**, and each frame becomes one composition file `compositions/frames/NN-<frame_id>.html`, built by one frame-worker. A frame can subdivide into **groups** (each a template or a motion-primitives combo). Extra density goes _inside_ a group, so **frame count tracks distinct treatments, not beats** — a fast track does not blow up the number of sub-agents.
20
+
21
+ ---
22
+
23
+ ## Step 0: Setup, BGM, and inputs
24
+
25
+ Goal: Establish the music source, create the HyperFrames project, and note any user-supplied media.
26
+
27
+ The **music is the spine** — establish one track before anything else. This skill is tuned for **fast, high-energy BGM**: a strong beat grid drives the cuts (calm tracks work, but pace by phrase rather than beat). If the user gave you audio — a music file, or a video to pull the audio from — use it. If not, generate one: choose the mood from the user's description (e.g. "driving synthwave", "trap beat", "upbeat corporate") and produce a track via `/hyperframes-media` (`references/bgm.md` — HeyGen retrieval when credentialed, else local Lyria / MusicGen; ElevenLabs or another generator also works). Before generating, run `npx hyperframes auth status` and **relay its output verbatim (don't paraphrase or rewrite it)** — it shows whether BGM comes from HeyGen or local MusicGen and, if not signed in, how to sign in. **If not signed in, STOP and wait for the user to choose — sign in, or continue offline with local MusicGen — before generating the track**; don't write keys into a per-repo `.env`. (In autonomous mode, note the status and continue offline.) See `/hyperframes-media` → Preflight for the canonical guidance. Either way the track lands at `assets/bgm.mp3`. Stage any user-supplied images or videos so frames can weave them in on the beat grid; otherwise typography carries the whole video.
28
+
29
+ Initialize only if `hyperframes.json` is missing. Name `<project>` from the brief in kebab-case, such as `midnight-drive-loop` — never a timestamp.
30
+
31
+ ```bash
32
+ npx hyperframes init "videos/<project>" --non-interactive --skip-skills --example=blank
33
+ mkdir -p "$PROJECT_DIR/assets" "$PROJECT_DIR/renders"
34
+ cp "<user-music>" "$PROJECT_DIR/assets/bgm.mp3" # extract from a video first if needed
35
+ # only if the user gave you images/videos:
36
+ node <SKILL_DIR>/scripts/stage-assets.mjs --from <dir> --hyperframes "$PROJECT_DIR" --into public
37
+ ```
38
+
39
+ The **brand** (font + palette) is chosen at Step 3, not here. Don't pick a genre or a track type up front — assets are just an optional ingredient, and the genre emerges from the per-frame choices.
40
+
41
+ **Gate:** `hyperframes.json` + `assets/bgm.mp3` exist; aspect / length / fps and (if any) the asset inventory are noted.
42
+
43
+ ---
44
+
45
+ ## Step 1: Analyze the music
46
+
47
+ Goal: Produce the one canonical timing analysis the whole video is built on.
48
+
49
+ `analyze-beatgrid.py` is the **only** beat analyzer — never re-measure beats with another tool or by ear. It reads the track once and writes `audiomap.json`: energy phases (level / density / feel), onsets + `onset_rate`, rolls, silences, `hard_stops`, `key_moments`, phrases, tempo / grid, and `audio.duration_sec`. It's deterministic — the same file always gives the same map. Most fields are reliable on any music; `bpm` and `beats_sec` are reliable only when the music is genuinely rhythmic, and judging that is the call you make at Step 2.
50
+
51
+ Prerequisites: Python 3 with `librosa`, `numpy`, and `soundfile` available. If import fails, install them into the active Python environment before running the analyzer:
52
+
53
+ ```bash
54
+ python3 -m pip install librosa numpy soundfile
55
+ ```
56
+
57
+ ```bash
58
+ python3 <SKILL_DIR>/scripts/analyze-beatgrid.py "$PROJECT_DIR/assets/bgm.mp3" \
59
+ -o "$PROJECT_DIR/audiomap.json" --print
60
+ ```
61
+
62
+ **Gate:** `audiomap.json` exists; `audio.duration_sec` is known.
63
+
64
+ ---
65
+
66
+ ## Step 2: Frame skeleton (structure only)
67
+
68
+ Goal: Read the music and lay out the frames — the skeleton of `STORYBOARD.md`.
69
+
70
+ Read [`references/frame-skeleton.md`](references/frame-skeleton.md). Turn `audiomap.json` into the **skeleton** of `STORYBOARD.md` yourself — there is no intermediate JSON. Cut the track into **frames** at real musical changes (`hard_stops`, SURGE / DROP `key_moments`, the edges of a roll, a stretch with no onsets, a big energy jump), snapping every boundary to an audiomap anchor. For each frame set `span_sec`, `pacing` (the verdict from Step 1's trust call — `beat_cut` when the grid is real, `phrase_flow` when it's a metronome imposed on calm music), `mood`, and a one-line `feel` (the plain music situation Step 3 matches a template against). Only classify and lay out here: leave every frame's `### Groups` as `TBD (Step 3)` and the frontmatter `style` blank — no templates, copy, color, or fonts. Expect ~1–6 frames.
71
+
72
+ **Gate:** frames tile the track (first at 0, last at `duration_s`); each carries `span_sec` + `pacing` + `mood` + `feel`; every `### Groups` is `TBD`; no content anywhere.
73
+
74
+ ---
75
+
76
+ ## Step 3: Fill the plan (user-gated)
77
+
78
+ Goal: Turn the skeleton into an approved, complete `STORYBOARD.md`.
79
+
80
+ Read [`references/planning.md`](references/planning.md), [`storyboard-format.md`](references/storyboard-format.md), [`template-catalog.md`](references/template-catalog.md), [`motion-primitive-catalog.md`](references/motion-primitive-catalog.md), and [`montage.md`](references/montage.md) (only if the user supplied assets). Editing the same file in place, do two things:
81
+
82
+ 1. **Pick the brand.** Choose one preset from `../hyperframes-creative/frame-presets/` using the table in `../hyperframes-creative/references/design-spec.md` (match the track's mood; **only its fonts and colors matter** — templates own composition). Copy it into `frame.md` **unmodified** and fill the frontmatter `style` (font + a ≤4–6 swatch palette) from it.
83
+ 2. **Fill every frame.** Decide its groups and give each a treatment: a matched template from the catalog (with bound params and real audiomap anchors), a free-compose from the primitive catalog, or an asset treatment that **obeys `pacing`**. Write the copy. You own WHAT (template / primitives + content + anchors); the frame-worker owns HOW — **never write millisecond tweens into the storyboard**.
84
+
85
+ ```bash
86
+ node <SKILL_DIR>/scripts/validate-plan.mjs --storyboard "$PROJECT_DIR/STORYBOARD.md" \
87
+ --audiomap "$PROJECT_DIR/audiomap.json" --templates <SKILL_DIR>/references/templates
88
+ ```
89
+
90
+ Fix every `✗` (hard errors: duration mismatch, frames not tiling the track, a missing `src`); warnings are best-effort. Then show the user a frame-by-frame summary and iterate until they approve.
91
+
92
+ **Gate:** `frame.md` is a verbatim preset copy; `validate-plan.mjs` exits 0; the user approved the plan.
93
+
94
+ ---
95
+
96
+ ## Step 4: Build frames from the plan
97
+
98
+ Goal: Build every frame as a self-contained composition file.
99
+
100
+ Create `compositions/frames/`. Read [`sub-agents/frame-worker.md`](sub-agents/frame-worker.md) and `../hyperframes-core/references/subagent-dispatch.md`. Dispatch **one frame-worker per frame**, in parallel where possible (otherwise in waves). Each worker gets exactly one frame and this context:
101
+
102
+ ```text
103
+ PROJECT_DIR: <abs path>
104
+ frame_id: <NN-frame_id> # = the frame file stem, e.g. 02-f2; the composition id
105
+ Your block: the `## Frame N — <frame_id>` block in PROJECT_DIR/STORYBOARD.md
106
+ audiomap: PROJECT_DIR/audiomap.json
107
+ frame.md: PROJECT_DIR/frame.md
108
+ Materials: for each group, <SKILL_DIR>/references/templates/<id>/index.html (templates) and
109
+ <SKILL_DIR>/references/motion-primitives/<id>/ (free); staged assets/ (asset groups)
110
+ Contracts: ../hyperframes-core/references/sub-compositions.md + determinism-rules.md
111
+ Canvas: <w>×<h> Pacing: <beat_cut|phrase_flow>
112
+ Write to: PROJECT_DIR/compositions/frames/<frame_id>.html
113
+ ```
114
+
115
+ The worker forks the cited materials, converts every anchor to frame-local seconds (`local_t = track_t − span_sec[0]`), gates its groups with 0ms cuts, and writes one seek-safe frame file. **The worker never runs the `hyperframes` CLI** — those commands operate on the assembled project, which doesn't exist yet, so they'd report on the wrong files. The worker just writes to the contract and stops; you verify after assembly (Step 6). As each worker returns, you can confirm its file landed on disk.
116
+
117
+ **Gate:** every frame has its `compositions/frames/NN-*.html` on disk.
118
+
119
+ ---
120
+
121
+ ## Step 5: Assemble
122
+
123
+ Goal: Wire the built frames + BGM into the playable `index.html`.
124
+
125
+ `assemble-index.mjs` is deterministic — no subagent, no judgment. It references each frame file at its cumulative `data-start`, mounts `assets/bgm.mp3` on track 11, and hard-cuts frame → frame (frames tile the track with no gaps, so there is **no transition injector**).
126
+
127
+ ```bash
128
+ node <SKILL_DIR>/scripts/assemble-index.mjs --storyboard "$PROJECT_DIR/STORYBOARD.md" \
129
+ --hyperframes "$PROJECT_DIR" --audiomap "$PROJECT_DIR/audiomap.json"
130
+ ```
131
+
132
+ Fix any `✗` it reports — a missing or blank frame file means that worker wrote a partial file; re-dispatch it (Step 4) and re-assemble.
133
+
134
+ **Gate:** `index.html` exists; total duration == `audiomap.audio.duration_sec`.
135
+
136
+ ---
137
+
138
+ ## Step 6: Verify and render
139
+
140
+ Goal: Verify the assembled video, get user approval, and render the final MP4.
141
+
142
+ Run the CLI on the **assembled project** — that's the correct unit (the per-frame workers couldn't run it). `lint` checks structure, `validate` runs headless Chrome (catching JS errors and missing assets), `inspect` snapshots frames.
143
+
144
+ ```bash
145
+ ( cd "$PROJECT_DIR" && npx hyperframes lint . && npx hyperframes validate . && npx hyperframes inspect . )
146
+ ```
147
+
148
+ Inspect at `t=0`, each frame start, the strongest DROP / SURGE, every `hard_stops[].t`, and the final frame. On failure, make the **cheapest safe fix** yourself: edit the offending `compositions/frames/NN-*.html`. Never change duration or audio timing to hide a sync issue. Once the gates pass, pause for user review, then render only on approval:
149
+
150
+ ```bash
151
+ ( cd "$PROJECT_DIR" && npx hyperframes render . --skill=music-to-video -q draft -o renders/video.mp4 --fps 30 )
152
+ ```
153
+
154
+ **Gate:** `lint` / `validate` / `inspect` passed; the user approved; `renders/video.mp4` exists with audio, duration == `audiomap.audio.duration_sec`. The final reply states the MP4 path and duration.
155
+
156
+ ---
157
+
158
+ ## Resume table
159
+
160
+ | You have | Continue from |
161
+ | -------------------------- | ------------- |
162
+ | `assets/bgm.mp3` only | Step 1 |
163
+ | `audiomap.json` | Step 2 |
164
+ | `STORYBOARD.md` (skeleton) | Step 3 |
165
+ | `STORYBOARD.md` (complete) | Step 4 |
166
+ | all frame files | Step 5 |
167
+ | `index.html` | Step 6 |
168
+
169
+ ## Quick Reference
170
+
171
+ **Formats:** landscape `1920x1080` by default; portrait `1080x1920`; square `1080x1080`. Set the canvas once in the storyboard frontmatter (`canvas: { w, h, fps }`).
172
+
173
+ **Scripts** under `scripts/`: `analyze-beatgrid.py` (the one analyzer), `validate-plan.mjs` (plan check), `assemble-index.mjs` (index assembly), `stage-assets.mjs` (stage user media), `lib/storyboard.mjs` (vendored parser). Everything else is the `hyperframes` CLI.
174
+
175
+ | Read | When |
176
+ | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
177
+ | [`references/frame-skeleton.md`](references/frame-skeleton.md) | Step 2: read the music, lay out the frames, set pacing |
178
+ | [`references/planning.md`](references/planning.md) · [`storyboard-format.md`](references/storyboard-format.md) | Step 3: pick the brand, fill each frame, write the plan |
179
+ | [`references/template-catalog.md`](references/template-catalog.md) | Step 3: pick a template per group |
180
+ | [`references/motion-primitive-catalog.md`](references/motion-primitive-catalog.md) | Step 3/4: L0 recipes for free-compose |
181
+ | [`references/montage.md`](references/montage.md) | Step 3/4: asset treatments (beat-cut / ken-burns) |
182
+ | [`sub-agents/frame-worker.md`](sub-agents/frame-worker.md) | Step 4: dispatch + build one frame |
183
+ | `../hyperframes-core/references/subagent-dispatch.md` | Step 4: dispatch sub-agents safely |
184
+ | `../hyperframes-creative/references/design-spec.md` | Step 3: pick the preset (the brand) |
185
+
186
+ ## Directory layout
187
+
188
+ ```
189
+ music-to-video/
190
+ SKILL.md
191
+ references/ frame-skeleton.md · planning.md · storyboard-format.md
192
+ template-catalog.md · motion-primitive-catalog.md · montage.md
193
+ templates/<id>/ { index.html (+ assets/ · program.json) } ← L1 catalog impls
194
+ motion-primitives/<id>/ { index.html } (+ ../assets/gsap.min.js shared by recipes) ← L0 catalog impls
195
+ scripts/ analyze-beatgrid.py · assemble-index.mjs · validate-plan.mjs · stage-assets.mjs · lib/storyboard.mjs
196
+ sub-agents/ frame-worker.md ← the one subagent (one per frame)
197
+ ```
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: node
3
+ description: Provides domain-specific best practices for Node.js development with TypeScript, covering type stripping, async patterns, error handling, streams, modules, testing, performance, caching, logging, and more. Use when setting up Node.js projects with native TypeScript support, configuring type stripping (--experimental-strip-types), writing Node 22+ TypeScript without a build step, or when the user mentions 'native TypeScript in Node', 'strip types', 'Node 22 TypeScript', '.ts files without compilation', 'ts-node alternative', or needs guidance on error handling, graceful shutdown, flaky tests, profiling, or environment configuration in Node.js. Helps configure tsconfig.json for type stripping, set up package.json scripts, handle module resolution and import extensions, and apply robust patterns across the full Node.js stack.
4
+ metadata:
5
+ tags: node, nodejs, javascript, typescript, type-stripping, backend, server
6
+ ---
7
+
8
+ ## When to use
9
+
10
+ Use this skill whenever you are dealing with Node.js code to obtain domain-specific knowledge for building robust, performant, and maintainable Node.js applications.
11
+
12
+ ## TypeScript with Type Stripping
13
+
14
+ When writing TypeScript for Node.js, use **type stripping** (Node.js 22.6+) instead of build tools like ts-node or tsx. Type stripping runs TypeScript directly by removing type annotations at runtime without transpilation.
15
+
16
+ Key requirements for type stripping compatibility:
17
+ - Use `import type` for type-only imports
18
+ - Use const objects instead of enums
19
+ - Avoid namespaces and parameter properties
20
+ - Use `.ts` extensions in imports
21
+
22
+ **Minimal example** — a valid type-stripped TypeScript file:
23
+
24
+ ```ts
25
+ // greet.ts
26
+ import type { IncomingMessage } from 'node:http';
27
+
28
+ const greet = (name: string): string => `Hello, ${name}!`;
29
+ console.log(greet('world'));
30
+ ```
31
+
32
+ Run directly with:
33
+ ```bash
34
+ node greet.ts
35
+ ```
36
+
37
+ See [rules/typescript.md](rules/typescript.md) for complete configuration and examples.
38
+
39
+ ## Common Workflows
40
+
41
+ For multi-step processes, follow these high-level sequences before consulting the relevant rule file:
42
+
43
+ **Graceful shutdown**: Register signal handlers (SIGTERM/SIGINT) → stop accepting new work → drain in-flight requests → close external connections (DB, cache) → exit with appropriate code. See [rules/graceful-shutdown.md](rules/graceful-shutdown.md).
44
+
45
+ **Error handling**: Define a shared error base class → classify errors (operational vs programmer) → add async boundary handlers (`process.on('unhandledRejection')`) → propagate typed errors through the call stack → log with context before responding or crashing. See [rules/error-handling.md](rules/error-handling.md).
46
+
47
+ **Diagnosing flaky tests**: Isolate the test with `--test-only` → check for shared state or timer dependencies → inspect async teardown order → add retry logic as a temporary diagnostic step → fix root cause. See [rules/flaky-tests.md](rules/flaky-tests.md).
48
+
49
+ **Diagnosing stuck processes/tests** (`node --test` hangs, "process did not exit", CI timeout, open handles): isolate file/test → run with explicit timeout/reporter → inspect handles via `why-is-node-running` (`SIGUSR1`) → patch deterministic teardown in resource-creation scope → rerun isolated + full suite until stable. See [rules/stuck-processes-and-tests.md](rules/stuck-processes-and-tests.md).
50
+
51
+ **Profiling a slow path**: Reproduce under realistic load → capture a CPU profile with `--cpu-prof` → identify hot functions → check for stream backpressure or unnecessary serialisation → validate improvement with a benchmark. See [rules/profiling.md](rules/profiling.md) and [rules/performance.md](rules/performance.md).
52
+
53
+ ## High-priority activation checklist (streams + caching)
54
+
55
+ When the task mentions **CSV**, **ETL**, **ingestion pipelines**, **large file processing**, **backpressure**, **repeated lookups**, or **deduplicating concurrent async calls**, explicitly apply this checklist:
56
+
57
+ 1. Use `await pipeline(...)` from `node:stream/promises` (prefer this over chained `.pipe()` in guidance/code).
58
+ 2. Include at least one explicit `async function*` transform when data is being transformed in-stream.
59
+ 3. Choose a cache strategy when repeated work appears:
60
+ - `lru-cache` for bounded in-memory reuse in a single process.
61
+ - `async-cache-dedupe` for async request deduplication / stale-while-revalidate behavior.
62
+ 4. Show where backpressure is handled (implicitly via `pipeline()` or explicitly via `drain`).
63
+
64
+ ### Integrated example pattern (CSV/ETL)
65
+
66
+ For CSV/ETL-style prompts, prefer an answer structure like:
67
+ - `createReadStream(input)`
68
+ - `async function*` parser/transform
69
+ - optional cached enrichment lookup (`async-cache-dedupe` or `lru-cache`)
70
+ - `await pipeline(...)` to a writable destination
71
+
72
+ Link relevant rules directly in explanations so models can retrieve details:
73
+ - [rules/streams.md](rules/streams.md)
74
+ - [rules/caching.md](rules/caching.md)
75
+
76
+ ## How to use
77
+
78
+ Read individual rule files for detailed explanations and code examples:
79
+
80
+ - [rules/error-handling.md](rules/error-handling.md) - Error handling patterns in Node.js
81
+ - [rules/async-patterns.md](rules/async-patterns.md) - Async/await and Promise patterns
82
+ - [rules/streams.md](rules/streams.md) - Working with Node.js streams
83
+ - [rules/modules.md](rules/modules.md) - ES Modules and CommonJS patterns
84
+ - [rules/testing.md](rules/testing.md) - Testing strategies for Node.js applications
85
+ - [rules/flaky-tests.md](rules/flaky-tests.md) - Identifying and diagnosing flaky tests with node:test
86
+ - [rules/stuck-processes-and-tests.md](rules/stuck-processes-and-tests.md) - Diagnosing processes that do not exit and tests that get stuck
87
+ - [rules/node-modules-exploration.md](rules/node-modules-exploration.md) - Navigating and analyzing node_modules directories
88
+ - [rules/performance.md](rules/performance.md) - Performance optimization techniques
89
+ - [rules/caching.md](rules/caching.md) - Caching patterns and libraries
90
+ - [rules/profiling.md](rules/profiling.md) - Profiling and benchmarking tools
91
+ - [rules/logging.md](rules/logging.md) - Logging and debugging patterns
92
+ - [rules/environment.md](rules/environment.md) - Environment configuration and secrets management
93
+ - [rules/graceful-shutdown.md](rules/graceful-shutdown.md) - Graceful shutdown and signal handling
94
+ - [rules/typescript.md](rules/typescript.md) - TypeScript configuration and type stripping in Node.js