Add a skill or a Design pack graphic
How to write a bundled director skill as a SKILL.md, add a hand-made graphic to the Design pack, and run the checks that gate both.
Two kinds of content ship with Cutscript and need no changes to the app's code. A skill is a short craft guide that the AI director reads before it plans a graphic. A Design pack graphic is a hand-made design that anyone can add to a video. Both live in resources/ and both have automatic checks.
If you only want a skill for yourself, you do not need the repository. Write it in the app, where it is saved on your Mac and gets the same lint. See Write your own skill. This page is for adding one to the set that ships to everyone.
Before you start
- A working checkout that builds. See Build from source.
- The authoring guide
resources/director-skills/README.md. It holds the full rules, and this page is the short route through it. - Only your own words, or text from a source whose licence allows it. Skills name no third-party source. Adapted text may come only from MIT, Apache-2.0, ISC, BSD or CC0 sources, declared in
adapted_fromand listed inTHIRD-PARTY-NOTICES.md.
Add a bundled skill
- Pick a family and a name. The skill lives at
resources/director-skills/<family>/<name>/SKILL.md. The family is one of 24, such ascompare,data,map,title,quote,socialorlook. The name is 3 to 48 characters ofa-z,0-9and-. Read the neighbouring skills first, because a close neighbour needs a "use … instead" line. - Copy the template. Copy
resources/director-skills/_templateto<family>/<name>/and replace every sentence. - Fill the front matter. The main fields:
Field Rule name,familyMatch the folder titleAt most 40 characters kind,prioritystructure,treatment,lookordirection;P0,P1orP2versionSemver. Every change to the folder's text bumps it summaryAt most 100 characters description80 to 360 characters, third person, ending in "Not for …" when conflictsis not emptytriggersphrases,wordsandnot, with at least three positive termsrequires,optionalEngine parts E1toE24checksIds from the skill-check registry in src/shared/director/skillbook/checks.tslicenseoriginal, oradaptedwithadapted_from - Write the thirteen sections, in order.
## When to use,## Concept and variations,## Storyboard,## Composition,## Motion,## Assets,## Style,## Do,## Don't,## Checks,## Examples,## Engine partsand## Cost. Most have a word limit. A structure skill may send up to 6,000 characters to the model, and a treatment, look or direction skill 2,500. - Follow the writing rules. Write guidance, not a template, and offer at least two variations. Put only scene-language words in backticks. Never give pixels, coordinates, percentages from a frame edge or hex colours. Show numbers only when they trace back to the person's data. Use fictional brands in examples, such as "Northwind" and "Solace".
- Add worked examples. Each lives in
tests/fixtures/director/skills/<family>/<name>/<slug>/asbrief.json,storyboard.jsonandscene.json. A P0 skill needs two with different structural fingerprints, and a P1 or P2 skill needs one.tests/fixtures/director/skills/_format/make-examples.mjsbuilds a complete set to start from. Add router prompts intests/fixtures/director/skills/<family>/router.json. - Format the folder.
npx prettier --write resources/director-skills/<family>/<name>
Check a skill
npm run check:skills
npm run check:skills -- --family compare
node scripts/check-skill-routing.mjsnpm run check:skills runs the conformance runner over every bundled skill, then the design guidance check. The conformance runner lints each skill and builds each worked example the way a real turn does: storyboard, style bible, normalise, compile, lint, then the skill's own checks. It also applies the P0 fingerprint rule, the hash gate and the family's router prompts. --family limits the run to one family. The routing script reports how the whole library routes. node scripts/check-skill-copying.mjs is the standalone copy check, which check:skills does not run.
Once a skill passes, record it:
npm run check:skills -- --record <family>/<name>This stores the folder's hash. From then on, any change to the folder needs a version bump, and a changed skill at the same version fails. Format the folder first, because the hash covers the exact bytes.
Add a Design pack graphic
The Design pack is the set of hand-made graphics in Graphics › Saved › Design pack. Each one is an exemplar, and the AI director also reads one or two as examples of good work.
- Make a folder at
resources/design-exemplars/<family>/<name>/. Start from a neighbour in the same family, such astitle/chapter-card. It holdsDesign.tsx,exemplar.jsonandposter.jpg, plus anassets/folder for sample pictures. - Write
Design.tsx. It is a React design built on Remotion's authoring API and Cutscript's design kit, described inresources/design-kit/REFERENCE.md. It exports its zodschema,defaultPropsand anexport const meta = { … } as constwith itsbeats. It may import only what the design import map allows (src/shared/design/importMap.ts), and it must draw the same pixels for the same frame. - Write
exemplar.json. It needs:idequal to<family>/<name>, andfamilyequal to the folder;- a
titleand asummary; skills, a non-empty list of skills that exist;beats, equal to the ids inmeta.beats, in order;- a
posterframe inside the design's length; - any
assets(kindsimage,svg,lottieorfont, each named inDesign.tsxand present underassets/) anddata(kindsplaces,route,table,seriesorjson, each under 32,000 characters).
- Map its group.
src/shared/design/pack.tsmaps a family to a pack group, such as Titles, Maps, Charts or Versus. A family that no group names lands in More. - Build the kit, then the poster.
The poster script rendersposter.jpgat the exemplar's poster frame, one third of the design's size.npm run build:design-kit && npm run build:design-host node scripts/build-design-pack-posters.mjs --out /path/to/scratch-folder <family>/<name> - Regenerate the index.
resources/design-exemplars/index.jsonis generated, and the check fails when it is stale.node scripts/check-design-guidance.mjs --write-index
Check a graphic
node scripts/check-design-guidance.mjs
npx tsc --noEmit -p resources/design-exemplars/tsconfig.json
node tests/e2e/design-director/check-exemplars.mjs <family>/<name> --out /path/to/scratch-folderThe first command checks that the folder and the JSON agree, that the skills exist, that sample assets exist and are used, that the data is small, and that the static design lint passes. npm run check:skills runs it too. The second type-checks the design modules against the kit's frozen API, in their own project. Read it for errors under resources/design-exemplars only. The third puts your exemplar through the full design checks, in an isolated Electron process with no network. It needs the design kit built first, and without a name it checks every exemplar. They test that the design compiles, that every frame is the same however it is reached, that nothing is cut off or outside the safe area, that text is readable over what is behind it, and that nothing reaches the network.
Related
Was this page helpful?
Comments
Longer questions go better in the forum.
No comments yet. Ask a question or add what you found.
Sign in with GitHub or Google to comment.
Sign in to comment