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.
- package/package.json +1 -1
- package/skills/airunway-aks-setup/SKILL.md +73 -0
- package/skills/algorithmic-art/SKILL.md +405 -0
- package/skills/appinsights-instrumentation/SKILL.md +76 -0
- package/skills/azure-ai/SKILL.md +71 -0
- package/skills/azure-aigateway/SKILL.md +129 -0
- package/skills/azure-cloud-migrate/SKILL.md +52 -0
- package/skills/azure-compliance/SKILL.md +108 -0
- package/skills/azure-compute/SKILL.md +46 -0
- package/skills/azure-cost/SKILL.md +45 -0
- package/skills/azure-deploy/SKILL.md +97 -0
- package/skills/azure-diagnostics/SKILL.md +151 -0
- package/skills/azure-enterprise-infra-planner/SKILL.md +54 -0
- package/skills/azure-hosted-copilot-sdk/SKILL.md +89 -0
- package/skills/azure-kubernetes/SKILL.md +153 -0
- package/skills/azure-kusto/SKILL.md +231 -0
- package/skills/azure-messaging/SKILL.md +57 -0
- package/skills/azure-prepare/SKILL.md +165 -0
- package/skills/azure-quotas/SKILL.md +276 -0
- package/skills/azure-rbac/SKILL.md +17 -0
- package/skills/azure-reliability/SKILL.md +387 -0
- package/skills/azure-resource-lookup/SKILL.md +108 -0
- package/skills/azure-resource-visualizer/SKILL.md +183 -0
- package/skills/azure-storage/SKILL.md +100 -0
- package/skills/azure-upgrade/SKILL.md +91 -0
- package/skills/azure-validate/SKILL.md +72 -0
- package/skills/brainstorming/SKILL.md +159 -0
- package/skills/brand-guidelines/SKILL.md +73 -0
- package/skills/brandkit/SKILL.md +798 -0
- package/skills/brutalist-skill/SKILL.md +92 -0
- package/skills/canvas-design/SKILL.md +130 -0
- package/skills/cavecrew/SKILL.md +82 -0
- package/skills/caveman-commit/SKILL.md +65 -0
- package/skills/caveman-help/SKILL.md +63 -0
- package/skills/caveman-review/SKILL.md +55 -0
- package/skills/caveman-stats/SKILL.md +10 -0
- package/skills/claude-api/SKILL.md +356 -0
- package/skills/composition-patterns/SKILL.md +89 -0
- package/skills/decision-mapping/SKILL.md +84 -0
- package/skills/deploy-to-vercel/SKILL.md +296 -0
- package/skills/design-an-interface/SKILL.md +94 -0
- package/skills/design-doc-mermaid/SKILL.md +498 -0
- package/skills/develop-userscripts/SKILL.md +84 -0
- package/skills/doc-coauthoring/SKILL.md +375 -0
- package/skills/documentation/SKILL.md +109 -0
- package/skills/docx/SKILL.md +590 -0
- package/skills/edit-article/SKILL.md +15 -0
- package/skills/entra-agent-id/SKILL.md +356 -0
- package/skills/entra-app-registration/SKILL.md +191 -0
- package/skills/faceless-explainer/SKILL.md +202 -0
- package/skills/fastify/SKILL.md +75 -0
- package/skills/general-video/SKILL.md +143 -0
- package/skills/git-guardrails-claude-code/SKILL.md +95 -0
- package/skills/github-actions-docs/SKILL.md +98 -0
- package/skills/gpt-tasteskill/SKILL.md +74 -0
- package/skills/grill-me/SKILL.md +7 -0
- package/skills/grilling/SKILL.md +10 -0
- package/skills/handoff/SKILL.md +16 -0
- package/skills/hyperframes/SKILL.md +152 -0
- package/skills/hyperframes-animation/SKILL.md +82 -0
- package/skills/hyperframes-cli/SKILL.md +109 -0
- package/skills/hyperframes-core/SKILL.md +78 -0
- package/skills/hyperframes-creative/SKILL.md +68 -0
- package/skills/hyperframes-media/SKILL.md +97 -0
- package/skills/image-to-code-skill/SKILL.md +1228 -0
- package/skills/imagegen-frontend-mobile/SKILL.md +1465 -0
- package/skills/imagegen-frontend-web/SKILL.md +987 -0
- package/skills/implement/SKILL.md +15 -0
- package/skills/init/SKILL.md +91 -0
- package/skills/internal-comms/SKILL.md +32 -0
- package/skills/lark-approval/SKILL.md +56 -0
- package/skills/lark-base/SKILL.md +157 -0
- package/skills/lark-doc/SKILL.md +81 -0
- package/skills/lark-shared/SKILL.md +168 -0
- package/skills/lark-workflow-meeting-summary/SKILL.md +122 -0
- package/skills/linting-neostandard-eslint9/SKILL.md +64 -0
- package/skills/loop-me/SKILL.md +32 -0
- package/skills/microsoft-foundry/SKILL.md +262 -0
- package/skills/migrate-to-shoehorn/SKILL.md +118 -0
- package/skills/minimalist-skill/SKILL.md +85 -0
- package/skills/motion-graphics/SKILL.md +170 -0
- package/skills/music-to-video/SKILL.md +197 -0
- package/skills/node/SKILL.md +94 -0
- package/skills/nodejs-core/SKILL.md +156 -0
- package/skills/oauth/SKILL.md +186 -0
- package/skills/obsidian-vault/SKILL.md +59 -0
- package/skills/octocat/SKILL.md +93 -0
- package/skills/openclaw-secure-linux-cloud/SKILL.md +157 -0
- package/skills/opensource-guide-coach/SKILL.md +218 -0
- package/skills/output-skill/SKILL.md +49 -0
- package/skills/pdf/SKILL.md +314 -0
- package/skills/pptx/SKILL.md +232 -0
- package/skills/pr-to-video/SKILL.md +235 -0
- package/skills/product-launch-video/SKILL.md +205 -0
- package/skills/python-appservice-deploy/SKILL.md +36 -0
- package/skills/qa/SKILL.md +130 -0
- package/skills/react-best-practices/SKILL.md +149 -0
- package/skills/react-native-skills/SKILL.md +121 -0
- package/skills/react-view-transitions/SKILL.md +320 -0
- package/skills/readme-i18n/SKILL.md +176 -0
- package/skills/redesign-skill/SKILL.md +178 -0
- package/skills/remotion/SKILL.md +364 -0
- package/skills/request-refactor-plan/SKILL.md +68 -0
- package/skills/resolving-merge-conflicts/SKILL.md +14 -0
- package/skills/running-claude-code-via-litellm-copilot/SKILL.md +263 -0
- package/skills/scaffold-exercises/SKILL.md +106 -0
- package/skills/secure-linux-web-hosting/SKILL.md +162 -0
- package/skills/setup-pre-commit/SKILL.md +91 -0
- package/skills/shadcn/SKILL.md +267 -0
- package/skills/simple/SKILL.md +52 -0
- package/skills/skill-creator/SKILL.md +485 -0
- package/skills/skill-optimizer/SKILL.md +47 -0
- package/skills/skills-cli/SKILL.md +281 -0
- package/skills/slack-gif-creator/SKILL.md +254 -0
- package/skills/snipgrapher/SKILL.md +58 -0
- package/skills/soft-skill/SKILL.md +98 -0
- package/skills/stitch-skill/SKILL.md +184 -0
- package/skills/supabase/SKILL.md +135 -0
- package/skills/supabase-postgres-best-practices/SKILL.md +64 -0
- package/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/talking-head-recut/SKILL.md +1191 -0
- package/skills/taste-skill/SKILL.md +1206 -0
- package/skills/taste-skill-v1/SKILL.md +226 -0
- package/skills/tdd/SKILL.md +108 -0
- package/skills/teach/SKILL.md +140 -0
- package/skills/test-driven-development/SKILL.md +371 -0
- package/skills/theme-factory/SKILL.md +59 -0
- package/skills/to-prd/SKILL.md +75 -0
- package/skills/typescript-magician/SKILL.md +117 -0
- package/skills/tzst/SKILL.md +68 -0
- package/skills/ubiquitous-language/SKILL.md +93 -0
- package/skills/use-my-browser/SKILL.md +110 -0
- package/skills/using-superpowers/SKILL.md +121 -0
- package/skills/vercel-cli-with-tokens/SKILL.md +353 -0
- package/skills/vercel-optimize/SKILL.md +322 -0
- package/skills/viral-instagram-reels/SKILL.md +180 -0
- package/skills/viral-short-form/SKILL.md +147 -0
- package/skills/viral-short-form-ideas/SKILL.md +184 -0
- package/skills/viral-tiktok-content/SKILL.md +180 -0
- package/skills/web-artifacts-builder/SKILL.md +74 -0
- package/skills/web-design-guidelines/SKILL.md +39 -0
- package/skills/webapp-testing/SKILL.md +96 -0
- package/skills/website-to-video/SKILL.md +145 -0
- package/skills/writing-beats/SKILL.md +67 -0
- package/skills/writing-fragments/SKILL.md +79 -0
- package/skills/writing-great-skills/SKILL.md +82 -0
- package/skills/writing-guidelines/SKILL.md +39 -0
- package/skills/writing-plans/SKILL.md +174 -0
- package/skills/writing-shape/SKILL.md +79 -0
- package/skills/xdrop/SKILL.md +78 -0
- package/skills/xget/SKILL.md +87 -0
- package/skills/xlsx/SKILL.md +292 -0
- package/src/tools/skills_download.js +217 -0
- package/src/utils/tools.js +2 -2
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: product-launch-video
|
|
3
|
+
description: "turn a product or marketing URL, pasted script, or brief into a product launch video, including SaaS promos, feature reveals, app launches, company promos, and product marketing videos. Use this skill when the user wants to market, launch, promote, or reveal a product. Do not use it for general non-launch website tours, non-product topic explainers, GitHub pull requests, captioning existing footage, or short unnarrated motion graphics. If the intent is unclear, route through /hyperframes first."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **media-use**: Before sourcing audio/images, call `/media-use` to resolve BGM/SFX/images from the HeyGen catalog. Run `--adopt` first to register existing assets. See `/media-use` skill.
|
|
7
|
+
|
|
8
|
+
# Product Launch to HyperFrames
|
|
9
|
+
|
|
10
|
+
Use this skill to capture a product, understand its brand, plan a launch video, and build it frame by frame in HyperFrames.
|
|
11
|
+
|
|
12
|
+
> **Confirm the route before Step 0.** You are the orchestrator. Run each step, verify its gate, and only then continue to the next step. This skill is for a **product being marketed, launched, promoted, or revealed**, including requests such as "promo for our site" when the purpose is promotional. Route other intents elsewhere: a general non-launch website tour -> `/website-to-video`; a topic explainer with no product -> `/faceless-explainer`; a GitHub PR -> `/pr-to-video`; captions on existing footage -> `/embedded-captions`; a short unnarrated motion graphic -> `/motion-graphics`. If the user says only "make a video" or the route is uncertain, read `/hyperframes` first.
|
|
13
|
+
|
|
14
|
+
You are the orchestrator. Work in `videos/<project>/`. Run steps in order and pass each gate before continuing. User-gated steps are Step 0, Step 3, and Step 6. Do every step yourself except Step 5, where you dispatch one sub-agent per frame. Do not put design or motion rules here; those live in the frame-worker sub-agent, `hyperframes-creative`, and `hyperframes-animation`.
|
|
15
|
+
|
|
16
|
+
Workflow: Step 0 setup -> `hyperframes.json`; Step 1 capture -> `capture/`; Step 2 design system -> `frame.md`; Step 3 storyboard/script -> `STORYBOARD.md` and `SCRIPT.md`; Step 3.1 audio -> `audio_meta.json`; Step 4 visual design -> enriched `STORYBOARD.md`; Step 5 frames -> `compositions/frames/NN-*.html` and `index.html`; Step 6 final render -> `renders/video.mp4`.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 0: Setup and Brief
|
|
21
|
+
|
|
22
|
+
Goal: Lock the core video brief and create the HyperFrames project if needed.
|
|
23
|
+
|
|
24
|
+
Initialize only if `hyperframes.json` is missing. Name `<project>` from the brand or domain in kebab-case, such as `acme-promo`; never use workspace name or timestamp.
|
|
25
|
+
|
|
26
|
+
`npx hyperframes init "videos/<project>" --non-interactive --skip-skills --example=blank`
|
|
27
|
+
|
|
28
|
+
**Show sign-in status before the brief** — run `npx hyperframes auth status` and **relay its output verbatim (don't paraphrase or rewrite it).** It reports whether voice/BGM will use HeyGen or local engines and, when not signed in, how to sign in. **If not signed in, STOP and wait for the user to choose — sign in, or say "go"/"offline" to continue with local engines — before asking the brief or anything else.** Treat it as a real decision point, not a passing note; don't fold the choice into the brief question, and 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.
|
|
29
|
+
|
|
30
|
+
**Gate:** `hyperframes.json` exists, and angle, length, aspect ratio, and language are locked; sign-in status was shown (signed in, or continuing offline).
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Step 1: Capture assets
|
|
35
|
+
|
|
36
|
+
Goal: Collect the source material, brand signals, and usable assets for the video.
|
|
37
|
+
|
|
38
|
+
Classify the input and choose the path. Explicit URL -> capture it and use the site for narration and assets. Pasted script/brief -> save verbatim as `user_script.txt`, ask once "use it verbatim or restructure?", store answer as `VO_MODE`, then resolve capture target: URL in text -> use it; brand name only -> `WebSearch`, confirm URL in one line, then crawl; no URL/site -> no-capture path.
|
|
39
|
+
|
|
40
|
+
Run capture with: `npx hyperframes capture "<URL>" -o ./capture`
|
|
41
|
+
|
|
42
|
+
If `GEMINI_API_KEY`, `GOOGLE_API_KEY`, or an OpenRouter key exists, capture auto-captions assets into `capture/extracted/asset-descriptions.md`. This is not a review gate. Without a vision key, use DOM context and continue.
|
|
43
|
+
|
|
44
|
+
No-capture path: create `capture/extracted/tokens.json`, `capture/extracted/visible-text.txt`, `capture/extracted/asset-descriptions.md`, and `capture/assets/` by hand. `tokens.json` should be `{ "title": "", "description": "", "colors": [], "fonts": [] }`; fill title/description from the brief when possible. `visible-text.txt` contains the full brief or script. `asset-descriptions.md` should say no assets were captured unless the user gave asset notes.
|
|
45
|
+
|
|
46
|
+
**Gate:** `capture/extracted/tokens.json`, `capture/extracted/visible-text.txt`, `capture/extracted/asset-descriptions.md`, and `capture/assets/` exist; you can state the brand in one clear sentence. Treat `asset-descriptions.md` as the main asset inventory. If it is missing after real capture, stop and report capture incomplete. If `capture/BLOCKED.md` exists, follow it.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Step 2: Design System
|
|
51
|
+
|
|
52
|
+
Goal: Choose one shipped frame preset; a script turns it into this video's `frame.md` + caption skin.
|
|
53
|
+
|
|
54
|
+
You make the one judgment call — **which preset**. Read `../hyperframes-creative/references/design-spec.md` and pick the preset whose look best fits the brand and brief. Then run:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
node <SKILL_DIR>/scripts/build-frame.mjs --preset <name> --hyperframes .
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The script does the rest deterministically: copies the preset's `FRAME.md` → `frame.md` and **remixes** it onto the brand tokens in `capture/extracted/tokens.json` (brand colors mapped onto the preset's color keys by role — ink, canvas, accents — keeping keys/structure/components; the preset's display + body fonts swapped for the brand's), copies the preset's caption skin to `.hyperframes/caption-skin.html`, and self-validates (exits 1 on a broken mapping). Proceed to the next step as soon as it exits 0 — no hand-editing of the spec.
|
|
61
|
+
|
|
62
|
+
`tokens.json` with no brand colors/fonts (e.g. no capture) → the script keeps the preset's own palette, a complete shippable design. If the brief names brand colors/fonts the capture missed, add them to `capture/extracted/tokens.json` before running (or use the user's `design.md` to populate it); only adjust `frame.md` by hand afterward if a mapping truly needs it.
|
|
63
|
+
|
|
64
|
+
**Gate:** `build-frame.mjs` exited 0 — `frame.md` exists from a named preset, and (when the preset ships one) `.hyperframes/caption-skin.html` exists as the caption skin source.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Step 3: Storyboard and Script
|
|
69
|
+
|
|
70
|
+
Goal: Turn the brief and captured material into an approved frame-by-frame story plan.
|
|
71
|
+
|
|
72
|
+
Read `references/story-design.md`, `../hyperframes-core/references/storyboard-format.md`, and `../hyperframes-core/references/script-format.md`. Use them to write `STORYBOARD.md` and, when narration is needed, `SCRIPT.md`.
|
|
73
|
+
|
|
74
|
+
Use `story-design.md` for story archetype, hook, persuasion logic, beats, `VO_MODE`, and asset choices. Choose each visual frame's `asset_candidates` from `capture/extracted/asset-descriptions.md` (the canonical inventory) — don't browse raw `capture/assets/`. Do not ask the user to pick assets unless that inventory is missing or unusable. Use the exact required fields from the storyboard and script references.
|
|
75
|
+
|
|
76
|
+
After drafting, show a frame-by-frame summary. In that same message ask the user two things: (a) to approve or request changes, and (b) whether they want a live preview of the storyboard scaffold (npx hyperframes preview) — open it only on a yes. Iterate until approved, and carry the preview choice to Step 6.
|
|
77
|
+
|
|
78
|
+
**Gate:** `STORYBOARD.md` exists, every visual frame has `asset_candidates`, `SCRIPT.md` exists when narration is needed, and the user approved the frame-by-frame plan.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Step 3.1: Audio
|
|
83
|
+
|
|
84
|
+
Goal: Generate narration, word timings, music, and audio metadata from the approved script.
|
|
85
|
+
|
|
86
|
+
Start audio after Step 3 approval. Run it in the background, then continue to Step 4.
|
|
87
|
+
|
|
88
|
+
`node <SKILL_DIR>/scripts/audio.mjs --script ./SCRIPT.md --storyboard ./STORYBOARD.md --hyperframes . --out ./audio_meta.json &`
|
|
89
|
+
|
|
90
|
+
The audio script handles narration, word timings, BGM lookup from HeyGen's music library, and timing metadata. BGM mood comes from the storyboard's `music:` field. This uses the HeyGen Audio API for retrieval, not generation, and uses the same `~/.heygen` credential as TTS. For provider details, read `../hyperframes-media/references/tts.md`.
|
|
91
|
+
|
|
92
|
+
If there is no narration and no `SCRIPT.md`, skip voice generation. BGM may still run if the storyboard has a music mood.
|
|
93
|
+
|
|
94
|
+
**Gate:** audio job has started, or the project is marked silent.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Step 4: Frame Visual Design
|
|
99
|
+
|
|
100
|
+
Goal: Add the visual direction, layout intent, and motion choices to each storyboard frame.
|
|
101
|
+
|
|
102
|
+
Edit `STORYBOARD.md` in place. Do not create another storyboard. Use `frame.md` as source of truth for color, type, layout feel, and style.
|
|
103
|
+
|
|
104
|
+
Read `references/visual-design.md`, `references/composition.md`, `references/motion-language.md`, and `../hyperframes-animation/`. Use `visual-design.md` for required frame fields and the required `## Video direction` block. Use `composition.md` for layout, hierarchy, focal points, and visual roles. Use `motion-language.md` and `../hyperframes-animation/` for valid effects and blueprint IDs. Do not invent effect names or blueprint IDs.
|
|
105
|
+
|
|
106
|
+
For every visual frame, add required visual and motion fields, including `effects` and `focal` and/or `roles`. Add one video-wide `## Video direction` block for overall visual direction, motion style, pacing, and design rules.
|
|
107
|
+
|
|
108
|
+
Do not change story, script, asset choices, `asset_candidates`, `transition_in`, or captured source material. Do not write HTML in this step.
|
|
109
|
+
|
|
110
|
+
Stage named assets after visual design is locked:
|
|
111
|
+
|
|
112
|
+
`node <SKILL_DIR>/scripts/stage-assets.mjs --storyboard ./STORYBOARD.md --hyperframes .`
|
|
113
|
+
|
|
114
|
+
**Gate:** every visual frame has `effects` plus `focal` and/or `roles`; `## Video direction` exists; `assets/` contains the named assets.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Step 5: Build Frames
|
|
119
|
+
|
|
120
|
+
Goal: Build every storyboard frame as an HTML composition and assemble the playable video.
|
|
121
|
+
|
|
122
|
+
Wait for Step 3.1 audio to finish if audio was started. Then sync durations and fetch SFX; skip both if silent.
|
|
123
|
+
|
|
124
|
+
`node <SKILL_DIR>/scripts/audio.mjs sync-durations --audio-meta ./audio_meta.json --storyboard ./STORYBOARD.md`
|
|
125
|
+
|
|
126
|
+
`node <SKILL_DIR>/scripts/audio.mjs fetch-sfx --storyboard ./STORYBOARD.md --hyperframes .`
|
|
127
|
+
|
|
128
|
+
Duration sync is mechanical: real voice duration wins; silent frames keep estimates; never hand-edit synced durations.
|
|
129
|
+
|
|
130
|
+
Before dispatch, read `sub-agents/frame-worker.md` and `../hyperframes-core/references/subagent-dispatch.md`. Dispatch one sub-agent per frame, in parallel if possible; otherwise run workers in waves. Each worker gets exactly one frame.
|
|
131
|
+
|
|
132
|
+
Each worker context must include `PROJECT_DIR`, `frame_id`, canvas size, caption status and keep-out band if captions are enabled, and `ANIM_DIR` as the absolute path to `../hyperframes-animation/`. Each worker reads `frame.md`, its own `## Frame N` block from `STORYBOARD.md`, and the recipe body for each cited effect or blueprint ID. Each worker writes only `compositions/frames/NN-*.html`. Workers must never edit `STORYBOARD.md`.
|
|
133
|
+
|
|
134
|
+
As each worker returns, the orchestrator marks that frame as `animated` in `STORYBOARD.md`.
|
|
135
|
+
|
|
136
|
+
After audio timings exist, build captions in the background and assemble the index:
|
|
137
|
+
|
|
138
|
+
`node <SKILL_DIR>/scripts/captions.mjs build --storyboard ./STORYBOARD.md --audio-meta ./audio_meta.json --hyperframes . --out ./caption_groups.json &`
|
|
139
|
+
|
|
140
|
+
`node <SKILL_DIR>/scripts/assemble-index.mjs --storyboard ./STORYBOARD.md --hyperframes .`
|
|
141
|
+
|
|
142
|
+
`captions.mjs` uses the project's `.hyperframes/caption-skin.html` (copied in Step 2) as the caption look, injecting brand tokens from `frame.md`; with no skin present it renders the built-in default pill. `captions: skipped (<reason>)` is valid. Continue without captions when explicitly skipped.
|
|
143
|
+
|
|
144
|
+
**Gate:** every frame is marked `animated`, `index.html` exists, and captions are built or explicitly skipped.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Step 6: Finalize
|
|
149
|
+
|
|
150
|
+
Goal: Verify the assembled video, get user approval, and render the final MP4.
|
|
151
|
+
|
|
152
|
+
Inject transitions, run checks, pause for review, then render.
|
|
153
|
+
|
|
154
|
+
`node <SKILL_DIR>/scripts/transitions.mjs inject --storyboard ./STORYBOARD.md --hyperframes .`
|
|
155
|
+
|
|
156
|
+
`node <SKILL_DIR>/scripts/transitions.mjs verify --storyboard ./STORYBOARD.md --index ./index.html`
|
|
157
|
+
|
|
158
|
+
`npx hyperframes lint`
|
|
159
|
+
|
|
160
|
+
`npx hyperframes validate`
|
|
161
|
+
|
|
162
|
+
`npx hyperframes inspect`
|
|
163
|
+
|
|
164
|
+
`npx hyperframes snapshot --at <frame-midpoints>`
|
|
165
|
+
|
|
166
|
+
`snapshot` stitches the captured frames into one contact sheet (`snapshots/contact-sheet.jpg`). Glance at it; if nothing is obviously broken, move on — don't linger here.
|
|
167
|
+
|
|
168
|
+
If a command fails, surface stderr and stop — don't pile on recovery commands. Fix it yourself: the cheapest safe edit to `compositions/frames/NN-*.html`, then rerun the failed check.
|
|
169
|
+
|
|
170
|
+
**Known false-positive — do not chase it.** `inspect` may report a handful of `text_box_overflow` errors of ~1–4px on the **caption** highlight words (selector `#caption-word-*` / `.caption-line`). The caption pill uses a deliberately snug `line-height` (set once in `scripts/captions.mjs`) and has **no `overflow:hidden`**, so a heavy display glyph's ink spills a few px into the pill's own padding — nothing is actually clipped. Treat these as expected and proceed. Do **not** inflate the caption `line-height` (it balloons the pill, which is worse). Only act on a `text_box_overflow` when it names a **frame** element (`#el-NN-*`), not a caption word.
|
|
171
|
+
|
|
172
|
+
After checks pass, pause for user review. The video is assembled, viewable, and editable in Studio. Manage preview only once across Step 3 and Step 6: open it if the user asked earlier, offer it if they declined earlier, and do not ask again if they are already reviewing in Studio.
|
|
173
|
+
|
|
174
|
+
Preview: `npx hyperframes preview`
|
|
175
|
+
|
|
176
|
+
Render only after user approval:
|
|
177
|
+
|
|
178
|
+
`npx hyperframes render --skill=product-launch-video --quality high --output renders/video.mp4`
|
|
179
|
+
|
|
180
|
+
Do not rerun `lint`, `validate`, `inspect`, or `snapshot` after rendering unless the user asks.
|
|
181
|
+
|
|
182
|
+
**Gate:** `lint`, `validate`, and `inspect` passed before render; user approved at the review pause; `renders/video.mp4` exists. Final reply states MP4 path and final duration.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Quick Reference
|
|
187
|
+
|
|
188
|
+
**Formats:** landscape `1920x1080` by default; portrait `1080x1920`; square `1080x1080`. Set the format once in the storyboard frontmatter.
|
|
189
|
+
|
|
190
|
+
**Background scripts:** the workflow ships only these scripts under `scripts/`: `build-frame` for adopting + brand-remixing a frame preset into `frame.md` (+ caption skin); `audio` for TTS, transcription, BGM, SFX, and duration syncing; `captions`; `transitions` for inject and verify; `stage-assets` for copying frame-named assets into `assets/`; and `assemble-index`. Everything else is handled by the `hyperframes` CLI.
|
|
191
|
+
|
|
192
|
+
| Read | When |
|
|
193
|
+
| ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- |
|
|
194
|
+
| `[../hyperframes-creative/frame-presets/](../hyperframes-creative/frame-presets/)` | Step 2: choose and adopt a frame preset. |
|
|
195
|
+
| `[../hyperframes-creative/references/design-spec.md](../hyperframes-creative/references/design-spec.md)` | Step 2: apply brand tokens correctly. |
|
|
196
|
+
| `[references/story-design.md](references/story-design.md)` | Step 3: plan the product-launch story. |
|
|
197
|
+
| `[../hyperframes-core/references/storyboard-format.md](../hyperframes-core/references/storyboard-format.md)` | Step 3: write `STORYBOARD.md`. |
|
|
198
|
+
| `[../hyperframes-core/references/script-format.md](../hyperframes-core/references/script-format.md)` | Step 3: write `SCRIPT.md`. |
|
|
199
|
+
| `[../hyperframes-media/references/tts.md](../hyperframes-media/references/tts.md)` | Step 3.1: choose or understand TTS providers and voices. |
|
|
200
|
+
| `[references/visual-design.md](references/visual-design.md)` | Step 4: enrich the storyboard visually. |
|
|
201
|
+
| `[references/composition.md](references/composition.md)` | Step 4: judge composition. |
|
|
202
|
+
| `[references/motion-language.md](references/motion-language.md)` | Step 4: judge motion language. |
|
|
203
|
+
| `[../hyperframes-animation/](../hyperframes-animation/)` | Step 4: cite effect and blueprint IDs. |
|
|
204
|
+
| `[sub-agents/frame-worker.md](sub-agents/frame-worker.md)` | Step 5: dispatch per-frame workers. |
|
|
205
|
+
| `[../hyperframes-core/references/subagent-dispatch.md](../hyperframes-core/references/subagent-dispatch.md)` | Step 5: dispatch sub-agents safely. |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: python-appservice-deploy
|
|
3
|
+
description: "Deploy Python (Flask/Django/FastAPI) code to Azure App Service Linux. WHEN: \"Flask App Service\", \"Django App Service\", \"FastAPI App Service\", \"deploy Python to App Service\". DO NOT USE FOR: Container Apps, Functions, non-Python, Terraform/Bicep/IaC, full infra — use azure-prepare."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: Microsoft
|
|
7
|
+
version: "1.0.1"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Python on Azure App Service — Code Deploy
|
|
11
|
+
|
|
12
|
+
Deploys Python (Flask, Django, FastAPI, generic) code to Azure App Service Linux (P0v3, Python 3.14). Creates RG + Plan + Web App if missing. Hand off to `azure-prepare` for VNet, Key Vault, databases, or IaC.
|
|
13
|
+
|
|
14
|
+
**MCP tools used**: `mcp_azure_mcp_subscription_list`, `mcp_azure_mcp_group_list`, `mcp_azure_mcp_appservice`, `mcp_azure_mcp_azd` (when `azure.yaml` is present).
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. **Resolve context — smart defaults, minimal prompts.** Only the app name is interactive; RG (`<app>-rg`), Plan (`<app>-plan`), region (current `az` default or `eastus2`), subscription are derived. [create-app.md](references/create-app.md) §1.
|
|
19
|
+
2. **Detect framework** (advisory, never blocks). [detect.md](references/detect.md).
|
|
20
|
+
3. **Choose path** — `azure.yaml` host: appservice → [deploy-azd.md](references/deploy-azd.md); else [deploy-azcli.md](references/deploy-azcli.md).
|
|
21
|
+
4. **Ensure RG → Plan (`P0v3 --is-linux`) → Web App (`--runtime "PYTHON:3.14"`)** exist. On transient ARM errors, follow [transient-retry.md](references/transient-retry.md). [create-app.md](references/create-app.md).
|
|
22
|
+
5. **Set startup** — Flask/Django: none (Oryx auto-detects). FastAPI: always `python -m uvicorn main:app --host 0.0.0.0`. Other: warn. [startup-commands.md](references/startup-commands.md).
|
|
23
|
+
6. **Set `SCM_DO_BUILD_DURING_DEPLOYMENT=true`**.
|
|
24
|
+
7. **Deploy** — `azd deploy` or `az webapp deploy --type zip --track-status false`.
|
|
25
|
+
8. **STOP. Print the post-deploy message** ([post-deploy-message.md](references/post-deploy-message.md)) and end the turn.
|
|
26
|
+
|
|
27
|
+
### Hard rules
|
|
28
|
+
|
|
29
|
+
- ⛔ **NO POST-DEPLOY VERIFICATION** — after deploy returns, do not run `az webapp log tail`, `curl`, `Invoke-WebRequest`, or any health probe. App Service needs 2–3 min to warm; a quiet log or early 5xx is not failure.
|
|
30
|
+
- ⛔ **SHELL SAFETY** — for `--runtime` always use `"PYTHON:3.14"` (colon). Never `"PYTHON|3.14"` (pipe is a shell operator).
|
|
31
|
+
- ⛔ **NEVER `az webapp up`** — deprecated. Use Step 7 commands.
|
|
32
|
+
- ✅ **URL FORMAT** — present endpoints as `https://...` URLs.
|
|
33
|
+
|
|
34
|
+
## Error Handling
|
|
35
|
+
|
|
36
|
+
See [errors.md](references/errors.md) for the full symptom → cause → fix matrix. Quick triage: missing plan/app → re-run Step 4; container ping timeout on 8000 → fix startup (Step 5); `ModuleNotFoundError` after deploy → ensure Step 6 ran, redeploy.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qa
|
|
3
|
+
description: Interactive QA session where user reports bugs or issues conversationally, and the agent files GitHub issues. Explores the codebase in the background for context and domain language. Use when user wants to report bugs, do QA, file issues conversationally, or mentions "QA session".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# QA Session
|
|
7
|
+
|
|
8
|
+
Run an interactive QA session. The user describes problems they're encountering. You clarify, explore the codebase for context, and file GitHub issues that are durable, user-focused, and use the project's domain language.
|
|
9
|
+
|
|
10
|
+
## For each issue the user raises
|
|
11
|
+
|
|
12
|
+
### 1. Listen and lightly clarify
|
|
13
|
+
|
|
14
|
+
Let the user describe the problem in their own words. Ask **at most 2-3 short clarifying questions** focused on:
|
|
15
|
+
|
|
16
|
+
- What they expected vs what actually happened
|
|
17
|
+
- Steps to reproduce (if not obvious)
|
|
18
|
+
- Whether it's consistent or intermittent
|
|
19
|
+
|
|
20
|
+
Do NOT over-interview. If the description is clear enough to file, move on.
|
|
21
|
+
|
|
22
|
+
### 2. Explore the codebase in the background
|
|
23
|
+
|
|
24
|
+
While talking to the user, kick off an Agent (subagent_type=Explore) in the background to understand the relevant area. The goal is NOT to find a fix — it's to:
|
|
25
|
+
|
|
26
|
+
- Learn the domain language used in that area (check UBIQUITOUS_LANGUAGE.md)
|
|
27
|
+
- Understand what the feature is supposed to do
|
|
28
|
+
- Identify the user-facing behavior boundary
|
|
29
|
+
|
|
30
|
+
This context helps you write a better issue — but the issue itself should NOT reference specific files, line numbers, or internal implementation details.
|
|
31
|
+
|
|
32
|
+
### 3. Assess scope: single issue or breakdown?
|
|
33
|
+
|
|
34
|
+
Before filing, decide whether this is a **single issue** or needs to be **broken down** into multiple issues.
|
|
35
|
+
|
|
36
|
+
Break down when:
|
|
37
|
+
|
|
38
|
+
- The fix spans multiple independent areas (e.g. "the form validation is wrong AND the success message is missing AND the redirect is broken")
|
|
39
|
+
- There are clearly separable concerns that different people could work on in parallel
|
|
40
|
+
- The user describes something that has multiple distinct failure modes or symptoms
|
|
41
|
+
|
|
42
|
+
Keep as a single issue when:
|
|
43
|
+
|
|
44
|
+
- It's one behavior that's wrong in one place
|
|
45
|
+
- The symptoms are all caused by the same root behavior
|
|
46
|
+
|
|
47
|
+
### 4. File the GitHub issue(s)
|
|
48
|
+
|
|
49
|
+
Create issues with `gh issue create`. Do NOT ask the user to review first — just file and share URLs.
|
|
50
|
+
|
|
51
|
+
Issues must be **durable** — they should still make sense after major refactors. Write from the user's perspective.
|
|
52
|
+
|
|
53
|
+
#### For a single issue
|
|
54
|
+
|
|
55
|
+
Use this template:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
## What happened
|
|
59
|
+
|
|
60
|
+
[Describe the actual behavior the user experienced, in plain language]
|
|
61
|
+
|
|
62
|
+
## What I expected
|
|
63
|
+
|
|
64
|
+
[Describe the expected behavior]
|
|
65
|
+
|
|
66
|
+
## Steps to reproduce
|
|
67
|
+
|
|
68
|
+
1. [Concrete, numbered steps a developer can follow]
|
|
69
|
+
2. [Use domain terms from the codebase, not internal module names]
|
|
70
|
+
3. [Include relevant inputs, flags, or configuration]
|
|
71
|
+
|
|
72
|
+
## Additional context
|
|
73
|
+
|
|
74
|
+
[Any extra observations from the user or from codebase exploration that help frame the issue — e.g. "this only happens when using the Docker layer, not the filesystem layer" — use domain language but don't cite files]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### For a breakdown (multiple issues)
|
|
78
|
+
|
|
79
|
+
Create issues in dependency order (blockers first) so you can reference real issue numbers.
|
|
80
|
+
|
|
81
|
+
Use this template for each sub-issue:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
## Parent issue
|
|
85
|
+
|
|
86
|
+
#<parent-issue-number> (if you created a tracking issue) or "Reported during QA session"
|
|
87
|
+
|
|
88
|
+
## What's wrong
|
|
89
|
+
|
|
90
|
+
[Describe this specific behavior problem — just this slice, not the whole report]
|
|
91
|
+
|
|
92
|
+
## What I expected
|
|
93
|
+
|
|
94
|
+
[Expected behavior for this specific slice]
|
|
95
|
+
|
|
96
|
+
## Steps to reproduce
|
|
97
|
+
|
|
98
|
+
1. [Steps specific to THIS issue]
|
|
99
|
+
|
|
100
|
+
## Blocked by
|
|
101
|
+
|
|
102
|
+
- #<issue-number> (if this issue can't be fixed until another is resolved)
|
|
103
|
+
|
|
104
|
+
Or "None — can start immediately" if no blockers.
|
|
105
|
+
|
|
106
|
+
## Additional context
|
|
107
|
+
|
|
108
|
+
[Any extra observations relevant to this slice]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
When creating a breakdown:
|
|
112
|
+
|
|
113
|
+
- **Prefer many thin issues over few thick ones** — each should be independently fixable and verifiable
|
|
114
|
+
- **Mark blocking relationships honestly** — if issue B genuinely can't be tested until issue A is fixed, say so. If they're independent, mark both as "None — can start immediately"
|
|
115
|
+
- **Create issues in dependency order** so you can reference real issue numbers in "Blocked by"
|
|
116
|
+
- **Maximize parallelism** — the goal is that multiple people (or agents) can grab different issues simultaneously
|
|
117
|
+
|
|
118
|
+
#### Rules for all issue bodies
|
|
119
|
+
|
|
120
|
+
- **No file paths or line numbers** — these go stale
|
|
121
|
+
- **Use the project's domain language** (check UBIQUITOUS_LANGUAGE.md if it exists)
|
|
122
|
+
- **Describe behaviors, not code** — "the sync service fails to apply the patch" not "applyPatch() throws on line 42"
|
|
123
|
+
- **Reproduction steps are mandatory** — if you can't determine them, ask the user
|
|
124
|
+
- **Keep it concise** — a developer should be able to read the issue in 30 seconds
|
|
125
|
+
|
|
126
|
+
After filing, print all issue URLs (with blocking relationships summarized) and ask: "Next issue, or are we done?"
|
|
127
|
+
|
|
128
|
+
### 5. Continue the session
|
|
129
|
+
|
|
130
|
+
Keep going until the user says they're done. Each issue is independent — don't batch them.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vercel-react-best-practices
|
|
3
|
+
description: React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: vercel
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Vercel React Best Practices
|
|
11
|
+
|
|
12
|
+
Comprehensive performance optimization guide for React and Next.js applications, maintained by Vercel. Contains 70 rules across 8 categories, prioritized by impact to guide automated refactoring and code generation.
|
|
13
|
+
|
|
14
|
+
## When to Apply
|
|
15
|
+
|
|
16
|
+
Reference these guidelines when:
|
|
17
|
+
- Writing new React components or Next.js pages
|
|
18
|
+
- Implementing data fetching (client or server-side)
|
|
19
|
+
- Reviewing code for performance issues
|
|
20
|
+
- Refactoring existing React/Next.js code
|
|
21
|
+
- Optimizing bundle size or load times
|
|
22
|
+
|
|
23
|
+
## Rule Categories by Priority
|
|
24
|
+
|
|
25
|
+
| Priority | Category | Impact | Prefix |
|
|
26
|
+
|----------|----------|--------|--------|
|
|
27
|
+
| 1 | Eliminating Waterfalls | CRITICAL | `async-` |
|
|
28
|
+
| 2 | Bundle Size Optimization | CRITICAL | `bundle-` |
|
|
29
|
+
| 3 | Server-Side Performance | HIGH | `server-` |
|
|
30
|
+
| 4 | Client-Side Data Fetching | MEDIUM-HIGH | `client-` |
|
|
31
|
+
| 5 | Re-render Optimization | MEDIUM | `rerender-` |
|
|
32
|
+
| 6 | Rendering Performance | MEDIUM | `rendering-` |
|
|
33
|
+
| 7 | JavaScript Performance | LOW-MEDIUM | `js-` |
|
|
34
|
+
| 8 | Advanced Patterns | LOW | `advanced-` |
|
|
35
|
+
|
|
36
|
+
## Quick Reference
|
|
37
|
+
|
|
38
|
+
### 1. Eliminating Waterfalls (CRITICAL)
|
|
39
|
+
|
|
40
|
+
- `async-cheap-condition-before-await` - Check cheap sync conditions before awaiting flags or remote values
|
|
41
|
+
- `async-defer-await` - Move await into branches where actually used
|
|
42
|
+
- `async-parallel` - Use Promise.all() for independent operations
|
|
43
|
+
- `async-dependencies` - Use better-all for partial dependencies
|
|
44
|
+
- `async-api-routes` - Start promises early, await late in API routes
|
|
45
|
+
- `async-suspense-boundaries` - Use Suspense to stream content
|
|
46
|
+
|
|
47
|
+
### 2. Bundle Size Optimization (CRITICAL)
|
|
48
|
+
|
|
49
|
+
- `bundle-barrel-imports` - Import directly, avoid barrel files
|
|
50
|
+
- `bundle-analyzable-paths` - Prefer statically analyzable import and file-system paths to avoid broad bundles and traces
|
|
51
|
+
- `bundle-dynamic-imports` - Use next/dynamic for heavy components
|
|
52
|
+
- `bundle-defer-third-party` - Load analytics/logging after hydration
|
|
53
|
+
- `bundle-conditional` - Load modules only when feature is activated
|
|
54
|
+
- `bundle-preload` - Preload on hover/focus for perceived speed
|
|
55
|
+
|
|
56
|
+
### 3. Server-Side Performance (HIGH)
|
|
57
|
+
|
|
58
|
+
- `server-auth-actions` - Authenticate server actions like API routes
|
|
59
|
+
- `server-cache-react` - Use React.cache() for per-request deduplication
|
|
60
|
+
- `server-cache-lru` - Use LRU cache for cross-request caching
|
|
61
|
+
- `server-dedup-props` - Avoid duplicate serialization in RSC props
|
|
62
|
+
- `server-hoist-static-io` - Hoist static I/O (fonts, logos) to module level
|
|
63
|
+
- `server-no-shared-module-state` - Avoid module-level mutable request state in RSC/SSR
|
|
64
|
+
- `server-serialization` - Minimize data passed to client components
|
|
65
|
+
- `server-parallel-fetching` - Restructure components to parallelize fetches
|
|
66
|
+
- `server-parallel-nested-fetching` - Chain nested fetches per item in Promise.all
|
|
67
|
+
- `server-after-nonblocking` - Use after() for non-blocking operations
|
|
68
|
+
|
|
69
|
+
### 4. Client-Side Data Fetching (MEDIUM-HIGH)
|
|
70
|
+
|
|
71
|
+
- `client-swr-dedup` - Use SWR for automatic request deduplication
|
|
72
|
+
- `client-event-listeners` - Deduplicate global event listeners
|
|
73
|
+
- `client-passive-event-listeners` - Use passive listeners for scroll
|
|
74
|
+
- `client-localstorage-schema` - Version and minimize localStorage data
|
|
75
|
+
|
|
76
|
+
### 5. Re-render Optimization (MEDIUM)
|
|
77
|
+
|
|
78
|
+
- `rerender-defer-reads` - Don't subscribe to state only used in callbacks
|
|
79
|
+
- `rerender-memo` - Extract expensive work into memoized components
|
|
80
|
+
- `rerender-memo-with-default-value` - Hoist default non-primitive props
|
|
81
|
+
- `rerender-dependencies` - Use primitive dependencies in effects
|
|
82
|
+
- `rerender-derived-state` - Subscribe to derived booleans, not raw values
|
|
83
|
+
- `rerender-derived-state-no-effect` - Derive state during render, not effects
|
|
84
|
+
- `rerender-functional-setstate` - Use functional setState for stable callbacks
|
|
85
|
+
- `rerender-lazy-state-init` - Pass function to useState for expensive values
|
|
86
|
+
- `rerender-simple-expression-in-memo` - Avoid memo for simple primitives
|
|
87
|
+
- `rerender-split-combined-hooks` - Split hooks with independent dependencies
|
|
88
|
+
- `rerender-move-effect-to-event` - Put interaction logic in event handlers
|
|
89
|
+
- `rerender-transitions` - Use startTransition for non-urgent updates
|
|
90
|
+
- `rerender-use-deferred-value` - Defer expensive renders to keep input responsive
|
|
91
|
+
- `rerender-use-ref-transient-values` - Use refs for transient frequent values
|
|
92
|
+
- `rerender-no-inline-components` - Don't define components inside components
|
|
93
|
+
|
|
94
|
+
### 6. Rendering Performance (MEDIUM)
|
|
95
|
+
|
|
96
|
+
- `rendering-animate-svg-wrapper` - Animate div wrapper, not SVG element
|
|
97
|
+
- `rendering-content-visibility` - Use content-visibility for long lists
|
|
98
|
+
- `rendering-hoist-jsx` - Extract static JSX outside components
|
|
99
|
+
- `rendering-svg-precision` - Reduce SVG coordinate precision
|
|
100
|
+
- `rendering-hydration-no-flicker` - Use inline script for client-only data
|
|
101
|
+
- `rendering-hydration-suppress-warning` - Suppress expected mismatches
|
|
102
|
+
- `rendering-activity` - Use Activity component for show/hide
|
|
103
|
+
- `rendering-conditional-render` - Use ternary, not && for conditionals
|
|
104
|
+
- `rendering-usetransition-loading` - Prefer useTransition for loading state
|
|
105
|
+
- `rendering-resource-hints` - Use React DOM resource hints for preloading
|
|
106
|
+
- `rendering-script-defer-async` - Use defer or async on script tags
|
|
107
|
+
|
|
108
|
+
### 7. JavaScript Performance (LOW-MEDIUM)
|
|
109
|
+
|
|
110
|
+
- `js-batch-dom-css` - Group CSS changes via classes or cssText
|
|
111
|
+
- `js-index-maps` - Build Map for repeated lookups
|
|
112
|
+
- `js-cache-property-access` - Cache object properties in loops
|
|
113
|
+
- `js-cache-function-results` - Cache function results in module-level Map
|
|
114
|
+
- `js-cache-storage` - Cache localStorage/sessionStorage reads
|
|
115
|
+
- `js-combine-iterations` - Combine multiple filter/map into one loop
|
|
116
|
+
- `js-length-check-first` - Check array length before expensive comparison
|
|
117
|
+
- `js-early-exit` - Return early from functions
|
|
118
|
+
- `js-hoist-regexp` - Hoist RegExp creation outside loops
|
|
119
|
+
- `js-min-max-loop` - Use loop for min/max instead of sort
|
|
120
|
+
- `js-set-map-lookups` - Use Set/Map for O(1) lookups
|
|
121
|
+
- `js-tosorted-immutable` - Use toSorted() for immutability
|
|
122
|
+
- `js-flatmap-filter` - Use flatMap to map and filter in one pass
|
|
123
|
+
- `js-request-idle-callback` - Defer non-critical work to browser idle time
|
|
124
|
+
|
|
125
|
+
### 8. Advanced Patterns (LOW)
|
|
126
|
+
|
|
127
|
+
- `advanced-effect-event-deps` - Don't put `useEffectEvent` results in effect deps
|
|
128
|
+
- `advanced-event-handler-refs` - Store event handlers in refs
|
|
129
|
+
- `advanced-init-once` - Initialize app once per app load
|
|
130
|
+
- `advanced-use-latest` - useLatest for stable callback refs
|
|
131
|
+
|
|
132
|
+
## How to Use
|
|
133
|
+
|
|
134
|
+
Read individual rule files for detailed explanations and code examples:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
rules/async-parallel.md
|
|
138
|
+
rules/bundle-barrel-imports.md
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Each rule file contains:
|
|
142
|
+
- Brief explanation of why it matters
|
|
143
|
+
- Incorrect code example with explanation
|
|
144
|
+
- Correct code example with explanation
|
|
145
|
+
- Additional context and references
|
|
146
|
+
|
|
147
|
+
## Full Compiled Document
|
|
148
|
+
|
|
149
|
+
For the complete guide with all rules expanded: `AGENTS.md`
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vercel-react-native-skills
|
|
3
|
+
description:
|
|
4
|
+
React Native and Expo best practices for building performant mobile apps. Use
|
|
5
|
+
when building React Native components, optimizing list performance,
|
|
6
|
+
implementing animations, or working with native modules. Triggers on tasks
|
|
7
|
+
involving React Native, Expo, mobile performance, or native platform APIs.
|
|
8
|
+
license: MIT
|
|
9
|
+
metadata:
|
|
10
|
+
author: vercel
|
|
11
|
+
version: '1.0.0'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# React Native Skills
|
|
15
|
+
|
|
16
|
+
Comprehensive best practices for React Native and Expo applications. Contains
|
|
17
|
+
rules across multiple categories covering performance, animations, UI patterns,
|
|
18
|
+
and platform-specific optimizations.
|
|
19
|
+
|
|
20
|
+
## When to Apply
|
|
21
|
+
|
|
22
|
+
Reference these guidelines when:
|
|
23
|
+
|
|
24
|
+
- Building React Native or Expo apps
|
|
25
|
+
- Optimizing list and scroll performance
|
|
26
|
+
- Implementing animations with Reanimated
|
|
27
|
+
- Working with images and media
|
|
28
|
+
- Configuring native modules or fonts
|
|
29
|
+
- Structuring monorepo projects with native dependencies
|
|
30
|
+
|
|
31
|
+
## Rule Categories by Priority
|
|
32
|
+
|
|
33
|
+
| Priority | Category | Impact | Prefix |
|
|
34
|
+
| -------- | ---------------- | -------- | -------------------- |
|
|
35
|
+
| 1 | List Performance | CRITICAL | `list-performance-` |
|
|
36
|
+
| 2 | Animation | HIGH | `animation-` |
|
|
37
|
+
| 3 | Navigation | HIGH | `navigation-` |
|
|
38
|
+
| 4 | UI Patterns | HIGH | `ui-` |
|
|
39
|
+
| 5 | State Management | MEDIUM | `react-state-` |
|
|
40
|
+
| 6 | Rendering | MEDIUM | `rendering-` |
|
|
41
|
+
| 7 | Monorepo | MEDIUM | `monorepo-` |
|
|
42
|
+
| 8 | Configuration | LOW | `fonts-`, `imports-` |
|
|
43
|
+
|
|
44
|
+
## Quick Reference
|
|
45
|
+
|
|
46
|
+
### 1. List Performance (CRITICAL)
|
|
47
|
+
|
|
48
|
+
- `list-performance-virtualize` - Use FlashList for large lists
|
|
49
|
+
- `list-performance-item-memo` - Memoize list item components
|
|
50
|
+
- `list-performance-callbacks` - Stabilize callback references
|
|
51
|
+
- `list-performance-inline-objects` - Avoid inline style objects
|
|
52
|
+
- `list-performance-function-references` - Extract functions outside render
|
|
53
|
+
- `list-performance-images` - Optimize images in lists
|
|
54
|
+
- `list-performance-item-expensive` - Move expensive work outside items
|
|
55
|
+
- `list-performance-item-types` - Use item types for heterogeneous lists
|
|
56
|
+
|
|
57
|
+
### 2. Animation (HIGH)
|
|
58
|
+
|
|
59
|
+
- `animation-gpu-properties` - Animate only transform and opacity
|
|
60
|
+
- `animation-derived-value` - Use useDerivedValue for computed animations
|
|
61
|
+
- `animation-gesture-detector-press` - Use Gesture.Tap instead of Pressable
|
|
62
|
+
|
|
63
|
+
### 3. Navigation (HIGH)
|
|
64
|
+
|
|
65
|
+
- `navigation-native-navigators` - Use native stack and native tabs over JS navigators
|
|
66
|
+
|
|
67
|
+
### 4. UI Patterns (HIGH)
|
|
68
|
+
|
|
69
|
+
- `ui-expo-image` - Use expo-image for all images
|
|
70
|
+
- `ui-image-gallery` - Use Galeria for image lightboxes
|
|
71
|
+
- `ui-pressable` - Use Pressable over TouchableOpacity
|
|
72
|
+
- `ui-safe-area-scroll` - Handle safe areas in ScrollViews
|
|
73
|
+
- `ui-scrollview-content-inset` - Use contentInset for headers
|
|
74
|
+
- `ui-menus` - Use native context menus
|
|
75
|
+
- `ui-native-modals` - Use native modals when possible
|
|
76
|
+
- `ui-measure-views` - Use onLayout, not measure()
|
|
77
|
+
- `ui-styling` - Use StyleSheet.create or Nativewind
|
|
78
|
+
|
|
79
|
+
### 5. State Management (MEDIUM)
|
|
80
|
+
|
|
81
|
+
- `react-state-minimize` - Minimize state subscriptions
|
|
82
|
+
- `react-state-dispatcher` - Use dispatcher pattern for callbacks
|
|
83
|
+
- `react-state-fallback` - Show fallback on first render
|
|
84
|
+
- `react-compiler-destructure-functions` - Destructure for React Compiler
|
|
85
|
+
- `react-compiler-reanimated-shared-values` - Handle shared values with compiler
|
|
86
|
+
|
|
87
|
+
### 6. Rendering (MEDIUM)
|
|
88
|
+
|
|
89
|
+
- `rendering-text-in-text-component` - Wrap text in Text components
|
|
90
|
+
- `rendering-no-falsy-and` - Avoid falsy && for conditional rendering
|
|
91
|
+
|
|
92
|
+
### 7. Monorepo (MEDIUM)
|
|
93
|
+
|
|
94
|
+
- `monorepo-native-deps-in-app` - Keep native dependencies in app package
|
|
95
|
+
- `monorepo-single-dependency-versions` - Use single versions across packages
|
|
96
|
+
|
|
97
|
+
### 8. Configuration (LOW)
|
|
98
|
+
|
|
99
|
+
- `fonts-config-plugin` - Use config plugins for custom fonts
|
|
100
|
+
- `imports-design-system-folder` - Organize design system imports
|
|
101
|
+
- `js-hoist-intl` - Hoist Intl object creation
|
|
102
|
+
|
|
103
|
+
## How to Use
|
|
104
|
+
|
|
105
|
+
Read individual rule files for detailed explanations and code examples:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
rules/list-performance-virtualize.md
|
|
109
|
+
rules/animation-gpu-properties.md
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Each rule file contains:
|
|
113
|
+
|
|
114
|
+
- Brief explanation of why it matters
|
|
115
|
+
- Incorrect code example with explanation
|
|
116
|
+
- Correct code example with explanation
|
|
117
|
+
- Additional context and references
|
|
118
|
+
|
|
119
|
+
## Full Compiled Document
|
|
120
|
+
|
|
121
|
+
For the complete guide with all rules expanded: `AGENTS.md`
|