Skip to content
Back to skills

Specs

ASecurity

Status: proposed. Branch `feat/bundled-director-skill`. Base: yamlreel 0.3.6.

  • 5 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 29, 2026
ai-agentspythongoshellbashdebugginggit

Works with

  • claude code
  • cli
  • mcp

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 15 files and shows the line behind each finding

Scanned November 29, 2026

npx -y skills add nsijwali/yamlreel --skill specs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Specs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Specs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nsijwali-specs/badge)](https://www.skillsdirectory.com/skills/nsijwali-specs)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Bundled agent skill: `yamlreel-video-skills` ships inside yamlreel

Status: proposed. Branch `feat/bundled-director-skill`. Base: yamlreel 0.3.6.

## 1. Problem and requirements
The agent skill lives in a separate repo (`nsijwali/yamlreel-video-skills`), so it drifts from the tool. Its
`scene-types.md` is missing `grid`, `lineart` and `motion`, and SKILL.md offers 3 of the 5 themes. It also says nothing
about directing: hooks, cueing, pace, truth. This change ships one skill inside the package and the repo, and adds a
short directing method mapped onto spec fields.

Functional
- F1 `pip install yamlreel` puts the skill on disk. `yamlreel skill path` prints where it is, and `yamlreel skill install`
  copies it to where an agent looks. pip never installs it into an agent folder by itself (wheels have no post-install hook).
- F2 `npx skills add nsijwali/yamlreel` and Claude Code `/plugin marketplace add nsijwali/yamlreel` find the same folder.
  The repo has no second copy.
- F3 The workflow adds a treatment-lite step, ask-first or autonomous mode, FACTS.md, and one critic pass followed by
  exactly one fix round. Every directing rule names a spec field to set and an existing yamlreel command to check it with.
- F4 Tests fail when a registered scene type, theme or music style is missing from the skill's references, when a snippet
  stops validating, or when the wheel does not contain the skill.

Quality: SKILL.md stays at 150 lines or fewer. Scripts use only the stdlib. No personal data: no voice IDs, no
VoiceStudio requirement, no mascots, music titles or channel names. Renders default to `--no-voice`. Directing text is
written in our own words, with credit.

## 2. Constraints and assumptions
- `[tool.setuptools.packages.find] include = ["yamlreel*"]`, so only files under `yamlreel/` ship. `yamlreel/lineart/` is
  the precedent: a folder with no `__init__.py`, shipped through `package-data`.
- The folder name `yamlreel-video-skills` must equal the frontmatter `name`. It is already listed on MCP Market from the
  standalone repo, so it keeps that name. The hyphen also means setuptools never sees the folder as an importable package.
- vercel-labs/skills searches only container folders (root, `skills/`, `.claude/skills/`, ...) up to 3 levels deep. It
  also reads `.claude-plugin/marketplace.json`, where a plugin lists `"skills": ["./path"]`.
  **Assumption (verified in acceptance):** the anthropics/skills layout works in both tools: `source: "./"`,
  `strict: false`, and skill paths relative to the repo root, with no `plugin.json`.
- `importlib.resources.as_file()` on a folder needs Python 3.12, and we support 3.10. The bundled folder is reached through
  `Path(__file__)`. yamlreel is never imported from a zip.
- pip users get ffmpeg from `imageio-ffmpeg`, which has no ffprobe. So video-director's `qa_video.py`, `check_timeline.py`
  and `timeline.json` are not ported. **The yamlreel spec is the timeline.**
- `yamlreel story` opens with the `lineart` presenter by default. That needs Chromium. Without it the scene falls back to
  typed text with a warning (`lineart_scene.py`), and `render.py` exits 3 on any preview warning. So the skill always
  passes `--no-lineart` unless the user has `yamlreel[capture]`.
- `sfx:` is an error without a top-level `mix:` (`specs._check_sound`). The mix path handles at most 600 s
  (`MAX_MIX_SECONDS`).
- `yamlreel audit` measures loudness, true peak, the loop and the short-form format. It does not measure where the loudest
  moment falls or whether there is silence before it.
- `docs/choreography/` depends on a `shorts/` pipeline (`framecheck.py`, `voicedeliver.py`, `audiomeasure.py`) that is not
  in this repo, and `docs/` is not in the wheel. The skill folds a summary into `directing.md` and does not link to it.

## 3. Proposed design

### 3.1 File tree
```
.claude-plugin/marketplace.json                       NEW  discovery for npx skills / Claude Code plugins
ci/check_wheel_skill.py                               NEW  wheel entries == git ls-files yamlreel/skills
yamlreel/skillbundle.py                               NEW  SKILL_NAME, skill_dir(), install()
yamlreel/cli.py                                       CHG  `skill` subcommand
yamlreel/skills/yamlreel-video-skills/
  SKILL.md                                            CHG  rewritten workflow (3.3)
  references/directing.md                             NEW  principles, treatment, FACTS, critic (3.4)
  references/sources.md                               NEW  credits + win4r MIT notice
  references/scene-types.md                           CHG  + grid, lineart, motion; "## Spec-level keys" (Themes:/Music styles: lines, mix, sfx)
  references/writing-guide.md                         CHG  personal cover layout removed; one hold rule; version notes dropped
  references/polish.md                                CHG  "only if audit exists" removed; in-spec sfx preferred
  references/troubleshooting.md                       CHG  + lineart-fallback row; version rows updated
  references/voiceover.md                             same
  scripts/render.py                                   same behaviour (docstring only)
  scripts/check_setup.py                              CHG  (3.6)
  examples/{system-design-rate-limiter,code-tip-python,product-launch}.yaml   same
pyproject.toml                                        CHG  package-data
.github/workflows/ci.yml                              CHG  wheel check step
README.md                                             CHG  "Make videos with an AI agent", Commands row
tests/test_skill_bundle.py                            NEW
tests/test_skill_cli.py                               NEW
tests/test_skill_scripts.py                           NEW  port of the standalone tests/e2e.py
```
The starting content is the standalone repo's `main`; record the commit sha in the PR body. These parts of the
standalone repo do not move: `tests/e2e.py` (ported to pytest), `README.md`, `LICENSE`, `assets/` and `docs/`.

**Line contracts in the references.** The tests parse these exactly:
- In `scene-types.md`, each scene type is a `## <type>` heading with a single word. Any other heading contains a space or
  hyphen (`## Common fields`, `## Spec-level keys`).
- `SKILL.md` and `scene-types.md` each hold a bare line `Themes: editorial, midnight, studio, sumi, washi` (no bullet, no
  backticks, nothing after the list). Theme descriptions go on separate lines below it.
- `scene-types.md` holds a bare line `Music styles: ambient, drive, koto, lofi, none, piano, pulse`.

### 3.2 Packaging
```toml
[tool.setuptools.package-data]
yamlreel = ["templates/*.yaml", "lineart/*.js", "lineart/LICENSE-*",
            "skills/yamlreel-video-skills/*.md", "skills/yamlreel-video-skills/references/*.md",
            "skills/yamlreel-video-skills/scripts/*.py", "skills/yamlreel-video-skills/examples/*.yaml"]
```
Each pattern names an extension, deliberately, instead of `**/*`. Running `render.py` in tests writes
`scripts/__pycache__/`, and a recursive glob would ship it. The wheel grows by about 60 KB.

`.claude-plugin/marketplace.json` (no `plugin.json`):
```json
{
  "name": "yamlreel",
  "owner": {"name": "Nitin Sijwali"},
  "plugins": [{
    "name": "yamlreel-video-skills",
    "description": "Write a YAML spec, direct it, render it locally with yamlreel: Shorts, explainers, code tips.",
    "source": "./",
    "strict": false,
    "skills": ["./yamlreel/skills/yamlreel-video-skills"]
  }]
}
```
Fallback, used only if acceptance shows a tool resolving paths differently: set `source: "./yamlreel"` and
`skills: ["./skills/yamlreel-video-skills"]`. That plugin root also matches Claude Code's default `skills/` discovery.

### 3.3 SKILL.md outline (target 120-145 lines)
Frontmatter:
- `name: yamlreel-video-skills`.
- `description`: the current one plus "plans the hook, pacing and facts like a director". At most 1024 characters.
- `license: MIT`.
- `compatibility: Python 3.10+, yamlreel>=0.3.6 (this skill ships inside it; `yamlreel skill path`), DejaVu fonts; macOS or Linux.`

Sections:
1. **What this does** (3 lines). `<skill>` means this folder. `yamlreel` means the binary that `check_setup.py` reports.
   If that binary is not on PATH, call it by its full path.
2. **Modes.**
   - Ask-first is the default when the user is present. Ask one round of at most 6 questions: the one thing it must say,
     audience, format (default vertical), length (default 30 s), theme, and voice (default none). Each question offers
     the recommended answer first. Skip anything the user already said. Stop once, for treatment approval.
   - Autonomous applies when the user says "just make it", gives a complete brief, or is away. Make every call yourself,
     log `DECISION: ... because ...` in `treatment.md`, and list the decisions in the report.
   - Both modes ask at most one round of questions.
3. **Workflow** (numbered):
   1. Setup: `python3 <skill>/scripts/check_setup.py`. On failure, show the fixes. Run `--install` only with the user's yes.
   2. Intake (as in Modes).
   3. Treatment: write `videos/<slug>/treatment.md` from the template in `references/directing.md`. That is the idea in one
      sentence, the hook, 1-3 terms, a benchmark, 3 structures with 1 chosen, the constant and the hero moment, then the
      beat script in the `writing-guide.md` format. Add `videos/<slug>/FACTS.md` if any number or comparison appears on
      screen. In ask-first mode, show both files and wait for a go.
   4. Outline and draft: `yamlreel story outline.yaml --out spec.yaml --format F --theme T --no-lineart`. Pass
      `--force` only on files you created yourself.
   5. Edit the spec by the principles in `directing.md`: hook in scene 0, `at` cues, read-time `seconds`, terms shown,
      the accent, the hero at 60-90%. Replace every `TODO` and set `meta.*` and `music.seed`.
   6. Read-through: `yamlreel script spec.yaml`. Check that each term is in both narration and on-screen text, that
      every number has a FACTS row, and that each hold passes the read-time rule.
   7. Preview: `render.py spec.yaml --stage preview --format F --out videos/<slug>/out`. Render one format at a time on
      low-memory machines. Retry an error at most 3 times.
   8. Inspect (mandatory): open `poster.jpg` and every `contact*.png` listed in RESULT. Look for overlap, clipped or shrunk
      text, reveals progressing across the stills, and the hook legible in the first still. Run at most 3 preview loops.
   9. Critic: one pass, then exactly one fix round (rubric in `directing.md`). Re-preview and inspect once. If the fix
      broke something, revert that change.
   10. Final: `render.py ... --stage final`.
   11. Audit: `yamlreel audit` on each final `video.mp4` (music is on by default). Report its `warn` lines. Use
       `references/polish.md` only when asked.
   12. Voice, only when the user names a local server: `--voice-url`. Run `yamlreel check-voice` if `[verify]` is installed.
   13. Report: the paths, the share copy, the DECISIONs, the weakest scene, and what was measured, looked at, or not
       checked (for example "loudest moment on the payoff: placed, not measured").
4. **render.py exit codes and RESULT line** (unchanged text).
5. **Defaults and facts**:
   - the bare `Themes:` line (3.1 contract), then one line per theme describing it; default midnight;
   - formats;
   - `--no-voice` by default;
   - `--no-lineart` by default;
   - output folders;
   - a fixed `music.seed`;
   - no `watermark` unless asked;
   - one format per render on 8 GB machines.
6. **References**: a table of each file and when to read it.
7. **Safety rules** (unchanged from the standalone skill).

### 3.4 `references/directing.md`
The page is short: a treatment template of at most 15 lines, a FACTS.md template, 13 principles, the critic rubric and a
list of what is not checked. Each principle gives a rule, how to do it in yamlreel, and how to check it, written fresh
rather than paraphrased line by line.

Hold rule, chosen once for the whole skill: **hold = max(2 s, 1 s + 0.3 s x words)**. The count starts when the text has
finished arriving: the last typed character, the last staggered item. This replaces choreography's `letters/15+1.5` and
the writing guide's bare 2 s.

| # | Principle | Do in yamlreel | Check with |
|---|---|---|---|
| 1 | One idea, one sentence | The treatment's idea line. 15 s = 1 idea; 30-45 s = 1 idea + at most 3 steps; Shorts at most 60 s | `yamlreel script` read top to bottom restates it; the critic restates it from the stills |
| 2 | Hook readable by 3 s, sound off | Scene 0 is `type` (at most about 50 chars) or `title` (+`eyebrow`, `kicker`), at most 3 s. It names the subject in the audience's words. Frame 0 is the poster, so the hook is on it. No intro or logo first | `poster.jpg` and the first contact still alone say what this is. No shrink warning on scene 0 |
| 3 | Say and show the key terms (1-3) | The subject's name goes in the hook. Each other term is spoken in `narration` and shown verbatim in that scene's `title`, `kicker`, `caption` or `label`. Voiced renders also get `keywords:` | The `script` sheet shows each term in both the Narration and the Kicker/Title/Caption columns of one row |
| 4 | Reads set scene length | `seconds` is at least the sum of the holds for the scene's reads. Defaults by type come from the writing guide. With a voice, narration stretches the scene | The `script` sheet's seconds column; the last still of each contact row shows the text complete |
| 5 | Cue every reveal | Every edge, flash, step, row highlight and motion element gets an explicit `at`. With a voice, `at` = 0.3 + words before / 2.5 s (exact with `narration_words`); silent, `at` follows the previous read. At most 2 cues per beat. Nothing arrives in a scene's last second. Motion elements never rely on the default auto-stagger | Stills show progress across each row; no "cue before its row" warning |
| 6 | Vary the pace | No 3 scenes of one type in a row; something new every 2-4 s; one acceleration (step gaps halving, for example 1.0, 0.5, 0.25 s) and one breath (a held `stat` or a quiet scene before the turn); `energy: low/mid/high` (with `music: {style: drive}`, layers follow energy) | The `script` sheet's type and seconds columns |
| 7 | One constant, one hero moment at 60-90% | Keep one layout across beats (the same diagram, `transition: cut`). The hero scene starts at 60-90% of the total. It carries the one emphatic device: a `stat` with `count: true`, a `flash`, or a motion `pop`/`pulse`. The `cta` question answers the hook | Cumulative seconds in `script`; the critic names the constant and the hero time |
| 8 | One accent, one meaning | Pick a theme. `accent` = the finding or hero; `accent2` = errors, "down", refused. The schema allows only `accent`, `accent2`, `fg` and `muted`, so no new colours are possible | Contact sheet: the accent appears only where its meaning applies |
| 9 | Legible on a phone | Stat values about 8 chars, bullets about 40, a type line about 50. Every "shrunk to fit" warning is a failure (render.py exit 3). Motion elements in vertical sit at `y <= 0.69` | No preview warnings; the contact still is readable when zoomed out |
| 10 | Motion with restraint (folded from choreography) | `pop` only on the payoff, at most 1 per scene; one `pulse` per video; exits shorter than entrances; `kicker` and labels do not animate; camera zoom at most 1.1 (a focus push up to 1.35); something already moving from `at: 0` | Contact stills; the critic's Look axis |
| 11 | Sound accents, not narrates (optional, `mix: true`) | Give each sound one meaning. About half the reveals get no cue, and there is never a whoosh on every cut. Payoff = `hush` 0.4-0.8 s, an optional `riser`, then `hit` on the payoff reveal. With a voice, the hit sits in a pause. This replaces choreography's "a cue on every move" | `yamlreel audit`: loudness within 2 of -14 LUFS, true peak at most -1 dBTP. Loudest moment and silence: placed, not measured |
| 12 | Tell the truth on screen | Each on-screen number, comparison or "first/best/only" gets a FACTS.md row: claim, screen text, source, quoted wording, date. With no row, remove the number or caption it "Example data" or "Illustration". A `count: true` stat ends on the FACTS value. `shot` only from user-supplied URLs or local images. Timing is not cause | Every digit in the `script` output maps to a FACTS row |
| 13 | Escape the default | A benchmark of 1-2 works (learn the grammar, not the content). Write 3 structures and kill 2. Banned: an opening centred title or logo, "In this video", 3 `bullets` scenes, everything fading in on auto-stagger, a generic end card | The treatment names the benchmark and the two rejected structures |

**Critic rubric** (in directing.md).
- When the host has subagents, spawn a fresh one with no build context. Give it `contact*.png`, `poster.jpg`, the
  `yamlreel script` output, `treatment.md` and `FACTS.md`. Otherwise self-review against the same rubric after
  re-opening `contact.png`.
- Step 1: before reading `treatment.md`, write the message in one sentence from the stills and the script alone.
- Step 2: score Hook, Clarity, Readability, Pace, Truth and Look from 1 to 5, citing a scene number.
- Step 3: list the must-fix items, each with a scene number and a measurable fix.
- Step 4: give a verdict of "ship" or "one more pass". The critic defaults to "one more pass".
- An item is must-fix when an axis scores 2 or less, a number is untraced, or the hook is unreadable.
- The fix round fixes the must-fix items and any axis at 3 or below, and leaves scenes the critic praised alone. There is
  no second critic. Whatever is left goes in the report.

**Not checked by tools** (listed in directing.md and below as future yamlreel features, never as skill scripts):
- rendered hook text size and contrast by 3 s;
- the loudest moment's time and the silence before it, in `audit`;
- a read-time warning in `validate`;
- a `--terms` check in `script`.

`references/sources.md`:
- "Directing principles adapted from video-director (github.com/win4r/video-director), MIT License, Copyright (c) 2026
  win4r", followed by the full MIT permission notice;
- one line saying video-director's own sources are listed in its repo;
- a statement that the yamlreel mapping and the wording are ours.
- visual-skills is not mentioned.

### 3.5 CLI: `yamlreel skill`
`config` is the pattern:
```python
sk = sub.add_parser("skill", help="the bundled agent skill: print its folder, or copy it where your agent looks")
sk.add_argument("action", choices=["path", "install"])
sk.add_argument("--dest", default="~/.claude/skills", help="with install: the skills folder to install into")
sk.add_argument("--force", action="store_true", help="with install: replace an existing copy")
sk.set_defaults(fn=cmd_skill)
```
`yamlreel/skillbundle.py`:
- `SKILL_NAME = "yamlreel-video-skills"`.
- `skill_dir() -> Path` returns `Path(__file__).resolve().parent / "skills" / SKILL_NAME`. It raises
  `SkillError(RuntimeError)` when `SKILL.md` is missing.
- `install(dest: Path, force: bool) -> Path`.

Behaviour:
- `path` prints the absolute folder (exit 0). With a broken install it prints
  `error: the bundled skill is missing (<dir>); reinstall yamlreel` (exit 1).
- `install` always writes `<dest>/yamlreel-video-skills`. `--dest` is the parent folder, so the folder name always equals
  `name` and `--force` can only touch that one folder. `~` is expanded, and `dest` is created with its parents. The copy
  skips `__pycache__` and `*.pyc`, goes to a temporary sibling `.yamlreel-video-skills.<random>.part`, and is moved into
  place with `os.replace`. When a copy already exists, it is renamed aside first, then removed after the replace. On any
  failure the temporary folder is removed and the old copy is restored.
- When the target exists without `--force`: `<target> exists; pass --force to overwrite` (exit 2, the `_copy_template`
  wording).
- What `--force` replaces:
  - a symlink: only the link is unlinked, never what it points to;
  - a folder whose `SKILL.md` frontmatter `name` is `yamlreel-video-skills`.
- What `--force` refuses (exit 2):
  - a folder containing `.git`: `<target> is a git checkout; update it with git or remove it yourself`;
  - any other folder: `<target> is not a yamlreel-video-skills folder; remove it yourself`.
- On success it prints `installed <target>` and then `start a new agent session to load it` (exit 0).
- An `OSError` prints `error: ...` (exit 1).
- `--dest` and `--force` are ignored by `path`, as `config show` ignores `--user`.
- Examples: `--dest .claude/skills` installs for one project; `--dest ~/.agents/skills` installs for other agents.

### 3.6 `scripts/check_setup.py`
The script still has four jobs:
- locate yamlreel;
- gate on a version floor plus a feature probe;
- run the font and ffmpeg pre-checks;
- run the smoke render, which is authoritative.

The skill can arrive inside the wheel, copied by `skill install`, or from GitHub with no yamlreel installed. It cannot read
the enclosing `__init__.py`, so:
- **Version.** `MIN_VERSION = (0, 3, 6)` is the oldest release with every feature the references use. There is no
  ceiling: the copy inside yamlreel 0.4 must not reject 0.4. `VERSION_SPEC = ">=0.3.6"` and `PIN = "yamlreel[ffmpeg]>=0.3.6"`.
  A yamlreel test asserts `MIN_VERSION <= __version__`.
- **Probe.** `PROBE_SPEC` validates `grid`, `motion`, `mix: true` with `sfx` `hush`/`hit`, and `theme: studio`. `story`
  is still required. The "unreleased build" branch is removed.
- **Candidate order.** `$YAMLREEL_BIN`, then PATH, then `~/.yamlreel/venv`. PATH now comes before the venv. A pip user
  ran `skill install` from the PATH yamlreel, so that one must win over a stale venv left by the standalone skill. The
  venv stays as the fallback for GitHub installs that ran `--install`.
- **New `skill-copy` check** (a warning, never a failure). Run `<yamlreel> skill path` and compare a digest of both
  folders: sorted relative paths plus bytes, skipping `__pycache__`.
  - Same folder or same digest: `ok`.
  - Different: `warn skill-copy: this copy differs from the one in yamlreel X (<path>) [fix: yamlreel skill install --force --dest <parent>]`.
  - No `skill` command: `ok skill-copy: skipped (this yamlreel has no skill command)`.
- **Kept:** `--install`, `--json`, `YAMLREEL_SPEC` (the pip requirement override for dev and tests), the resolution check,
  and the smoke render that turns font and ffmpeg misses into warnings when it passes.

`render.py` behaviour is unchanged.

## 4. Alternatives considered
- **A top-level `skills/` folder.** It is not packaged, so pip users would not get it. A copy in both places drifts.
- **A recursive `**/*` package-data glob.** It ships `__pycache__` created by tests.
- **Auto-install on pip install or first run.** Wheels cannot run hooks, and writing into `~/.claude` silently is a
  consent problem.
- **Porting `check_timeline.py` / `qa_video.py`.** They need ffprobe and a second timeline file. The spec already holds
  every time, and gaps become future yamlreel features.
- **Linking `docs/choreography/`.** It is not in the wheel and depends on files that are not in the repo.
- **A version ceiling `<0.4`.** The copy inside 0.4 would reject the yamlreel it ships with.
- **Keeping a skill version constant in sync with `__version__`.** Every release would have to edit the skill. The digest
  comparison catches stale copies without that.

## 5. Rollout and compatibility
- The change is additive: no spec, schema or render change. Existing CLI commands are untouched, and `skill` is new.
- The next yamlreel release carries the skill. Release notes say "Make videos with an AI agent".
- Standalone clone users keep working. The README says to keep one copy, because two folders with the same name load
  twice. `skill install --force` replaces a non-git copy and refuses a git checkout.
- Follow-up (not in this PR): turn `nsijwali/yamlreel-video-skills` into a mirror. Each release copies `yamlreel skill path`
  into it, so the MCP Market listing stays current. Its README points to `pip install yamlreel` plus `yamlreel skill install`.
- Follow-up: remove `shorts/` pipeline references from `docs/choreography/`.

## 6. Risks, failure modes, edge cases, observability
- **A discovery tool resolves `skills` paths differently.** The acceptance step runs both commands against the pushed
  branch; if one fails, use the `source: "./yamlreel"` fallback.
- **The Claude Code plugin copies the whole repo** (source `./`, a few MB of gifs). It is acceptable; the fallback source
  also fixes it.
- **A stale copy after `pip install -U`.** The `skill-copy` warning in check_setup catches it.
- **Agents running raw `yamlreel story` without `--no-lineart`.** This leads to a fallback warning and exit 3. The
  troubleshooting row names the fix.
- **`sfx` without `mix`.** This is a SpecError that names the fix. directing.md always pairs the two.
- **Copied director wording.** Acceptance includes a manual shingle check: no 8-word run shared with video-director.
- **A prompt-sized SKILL.md.** The 150-line test caps it.
- **Low RAM (8 GB).** The skill renders one format per call and previews first.
- **Observability:** `render-log.txt`, the `RESULT {json}` line, `check_setup.py --json`, and the report's
  measured/seen/unchecked list.

## 7. Test plan
Targeted tests during development; run the full `pytest -q` once at the milestone. There are no `browser` markers
(`test_the_browser_tests_are_marked` expects exactly 7). Shell fakes skip on Windows. Snippets and examples validate
in-process. Real renders happen only in `test_skill_scripts.py` (1-2 s title or stat at preview size).

`tests/test_skill_bundle.py` (no renders):
1. `test_frontmatter_name_equals_folder`: parse the frontmatter with `yaml.safe_load`. Assert `name == SKILL_NAME ==`
   the folder name, `^[a-z0-9-]{1,64}$`, a description of at most 1024 chars, `license: MIT`, and at most 150 lines.
2. `test_skill_md_paths_exist`: every `references/`, `scripts/` and `examples/` path named in SKILL.md exists.
3. `test_scene_type_headings_equal_registry`: the set of `^## (\w+)$` headings in scene-types.md `==`
   `set(SCENE_TYPES)`. It compares exact sets, not substrings; headings with a space or hyphen are not scene types (3.1).
4. `test_themes_and_music_lines_equal_registry`: the bare line `^Themes: (.+)$` in SKILL.md and in scene-types.md, split
   on `", "`, each equal `set(THEMES)`. `^Music styles: (.+)$` in scene-types.md equals `set(MUSIC_STYLES)`. Each line
   appears exactly once per file.
5. `test_each_scene_section_has_a_matching_snippet`: every `## <type>` section has a yaml block whose scene type is `<type>`.
6. `test_reference_snippets_validate`: every yaml block in `references/*.md` passes `yamlreel.specs.validate`.
   - A list is a scene list, wrapped as `{theme: midnight, formats: [square], mix: {}, scenes: <list>}`. `mix: {}` is
     always present, as in `test_choreography_docs.as_spec`, so `sfx` examples validate.
   - A mapping with `scenes` is a full spec. Missing `theme` and `formats` are filled the same way, and `mix: {}` is added
     only if the block has `sfx` and no `mix`.
   - A mapping without `scenes` is skipped. That is the polish events file in `polish.md`, whose `kind:` vocabulary is
     polish's, not the spec's. `test_polish.py` owns that format.
   - The fixture is the isolated config from `test_choreography_docs.py`.
7. `test_examples_validate_and_are_clean`: each example validates. It has `meta.title`, a fixed `music.seed`, no
   `watermark`, no `TODO`, and no `lineart` or `shot`.
8. `test_bundle_hygiene`: the folder (excluding `__pycache__`) has no `/Users/`, `/home/`, `profile id`, `VoiceStudio`,
   `:3900`, and no `.wav`, `.mp3` or `.png` files.
9. `test_package_data_covers_the_skill`: read the package-data list from pyproject with a regex using `re.S`, since the
   list spans lines (the `test_ci_constraints.py` style). Glob each pattern under `yamlreel/`. Every skill file (no caches)
   is matched, and no `.pyc` is matched.
10. `test_check_setup_floor_within_version`: `check_setup.MIN_VERSION <= __version__`, and SKILL.md `compatibility`
    contains `yamlreel>=` + the floor.
11. `test_sources_credit`: `sources.md` contains `Copyright (c) 2026 win4r`, the MIT permission sentence, and
    `github.com/win4r/video-director`.

`tests/test_skill_cli.py`:

12. `test_skill_path`: exit 0; stdout is `skill_dir()`, which holds `SKILL.md`.
13. `test_install_into_named_folder`: `--dest tmp` creates `tmp/yamlreel-video-skills` with the bundle's file set (minus caches).
14. `test_install_default_dest`: with HOME monkeypatched, the target is `~/.claude/skills/yamlreel-video-skills`.
15. `test_install_refuses_existing_without_force`: exit 2, the exact message, and the folder byte-unchanged.
16. `test_force_replaces_own_copy`: a stale extra file is gone after `--force`.
17. `test_force_refuses_git_checkout_and_foreign_folder`: exit 2 with each exact message; nothing is deleted.
18. `test_force_replaces_symlink_not_its_target`: the link target is intact, and the target is now a real folder.
19. `test_failed_copy_leaves_old_copy_and_no_part_dirs`: `copytree` is monkeypatched to raise `OSError`. Exit 1, the
    old copy is intact, and no `*.part` folder remains.

`tests/test_skill_scripts.py` (port of the standalone `e2e.py`):
- The real yamlreel is a shim `#!/bin/sh exec <sys.executable> -m yamlreel "$@"` in `YAMLREEL_BIN`, with `YAMLREEL_VENV`
  pointing at a missing folder.
- Bundled scripts are imported with `sys.dont_write_bytecode = True`. Every subprocess gets `PYTHONDONTWRITEBYTECODE=1`
  in its env, so `python render.py` never writes `scripts/__pycache__/` into the source tree.
- The standalone cases port with the same assertions:
  - preflight (outside cwd, TODO, TODO in a comment passes, out dir outside cwd, symlink and `..` escapes, home and root);
  - all `secret_cases`, the prose list and the code list;
  - usage errors (exit 4);
  - voice URL credential cases;
  - warning blocks final (exit 3; `--allow-warnings` gives 0);
  - default out next to the spec;
  - timeouts and OS errors.
- `test_check_setup_passes`: the smoke render and features are ok, and `--json` stdout is pure JSON on an install failure.
- `test_candidate_order`: `$YAMLREEL_BIN`, then PATH, then the venv; versions below the floor are skipped; the resolution
  check flags a mismatch.
- `test_version_floor_without_ceiling`: 0.3.5 is rejected and 0.4.0 is accepted, when the probe passes.
- `test_skill_copy_check`: an identical copy is ok; a changed byte gives `warn`; a fake yamlreel without `skill` gives
  the skipped line.

CI: after `python -m build`, run `python ci/check_wheel_skill.py dist/*.whl`. It asserts that the set of wheel entries
under `yamlreel/skills/` equals `git ls-files yamlreel/skills`. Exact equality also catches `.pyc`.

## 8. Implementation steps
Keep `handoff.md` up to date. Review once, after step 6.
1. Copy the standalone skill into `yamlreel/skills/yamlreel-video-skills/` (record the sha). Add the package-data
   patterns and `ci/check_wheel_skill.py`. Tests 1, 9.
2. Fix the drift: add grid/lineart/motion sections, `## Spec-level keys` with the `Themes:` and `Music styles:` lines,
   and the mix/sfx fields to scene-types.md. Scrub writing-guide.md (cover layout, version notes, the hold rule),
   polish.md and troubleshooting.md. Tests 3-8.
3. Update check_setup.py (floor, probe, order, skill-copy) and port e2e.py to `tests/test_skill_scripts.py`. Test 10.
4. Add `skillbundle.py` and the CLI `skill` command. Tests 12-19.
5. Write `directing.md` and `sources.md`, and rewrite SKILL.md (3.3). Tests 2, 4, 6, 11; re-run 1.
6. Add `.claude-plugin/marketplace.json`, the README section and the Commands row, and the CI step. Then the integrated
   review (blockers and majors only).
7. Acceptance (below).

README "Make videos with an AI agent" goes after Quick start, with shell commands and agent commands in separate fences:
```bash
pip install "yamlreel[ffmpeg]"
yamlreel skill install                          # Claude Code: ~/.claude/skills/yamlreel-video-skills
yamlreel skill install --dest .claude/skills    # this project only
yamlreel skill install --dest ~/.agents/skills  # other agents
npx skills add nsijwali/yamlreel                # without pip: any skills-compatible agent
```
The Claude Code plugin route goes in a `text` fence, typed inside Claude Code and not in a shell:
```text
/plugin marketplace add nsijwali/yamlreel
/plugin install yamlreel-video-skills@yamlreel
```
After the blocks come three lines:
- what the skill does;
- keep one copy;
- `yamlreel skill install --force` after upgrading yamlreel.

The Commands table gains `yamlreel skill path|install [--dest DIR] [--force]`.

## Out of scope
- Changing the standalone repo or the MCP Market entry.
- Hook-size, audio-arc, read-time and term checks in yamlreel (future features, listed in 3.4).
- Cleaning `docs/choreography/`.
- visual-skills.
- Windows support for the skill.
- A version bump or release.

## Acceptance checklist
- [ ] `pytest -q` green on the branch (milestone run).
- [ ] `python -m build && unzip -l dist/yamlreel-*.whl | grep skills/yamlreel-video-skills` lists exactly: SKILL.md,
      7 references, 2 scripts, 3 examples; no `__pycache__`. `ci/check_wheel_skill.py` passes.
- [ ] Fresh venv, `pip install dist/*.whl`:
  - [ ] `yamlreel skill path` prints a site-packages path.
  - [ ] `yamlreel skill install --dest <tmp>` creates `<tmp>/yamlreel-video-skills/SKILL.md`.
  - [ ] Re-running gives exit 2; `--force` gives exit 0.
- [ ] `python3 <tmp>/yamlreel-video-skills/scripts/check_setup.py` prints all `ok`, including `skill-copy`.
- [ ] Smoke, one format only (8 GB machine), from a scratch project folder (not home):
      `python3 <tmp>/yamlreel-video-skills/scripts/render.py <tmp>/yamlreel-video-skills/examples/code-tip-python.yaml --stage preview --format vertical --out out`
      exits 0 with `RESULT {"ok": true ...}`. This runs `render --preview --no-voice`. Open `out/preview/vertical/contact.png` and look at it.
- [ ] After pushing the branch, `npx skills add` against it, and Claude Code `/plugin marketplace add` plus install
      against it, each show exactly one `yamlreel-video-skills`. Confirm the exact invocation for a branch from each
      tool's help. If either fails, apply the `source: "./yamlreel"` fallback and repeat.
- [ ] Manual: no 8-word run of directing.md or SKILL.md also appears in video-director's SKILL.md or references.
- [ ] Manual: in Claude Code, "make a 15 second Short about Python f-string debugging" triggers the skill. It asks one
      question round, writes `treatment.md`, and stops for approval.

Files in this skill

  • 2026-11-03-richer-animation-story-music.md31.6 KB
  • 2026-11-08-voice-speed-trim-editorial-theme.md4.7 KB
  • 2026-11-09-error-line-numbers.md6.8 KB
  • 2026-11-09-grid-scene.md8.5 KB
  • 2026-11-09-render-only.md5.8 KB
  • 2026-11-09-scene-kicker.md4.5 KB
  • 2026-11-09-voice-check-and-story-events.md11.5 KB
  • 2026-11-12-polish-addon.md2.6 KB
  • 2026-11-29-bundled-skill.md34.1 KB
  • batch1-trust-the-input.md27.3 KB
  • hardening.md9.1 KB
  • motion-layer.md53.6 KB
  • rename-to-yamlreel.md13 KB
  • sound-design.md2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.