@lukstei/curtain
v0.2.0
Published
Minimal multi-act instruction runner for AI agents
Readme
curtain
Nobody likes spoilers, especially agents.
Show them the ending and they skip the plot. Curtain keeps the script backstage until the curtain rises.
When you give an AI coding agent a multi-phase task in a single prompt or file, it attempts to execute the entire plan at once: skipping tests, hallucinating downstream phases, cutting corners, and blowing past human review gates.
Prompting does not fix this. If tokens exist in the context window, the model can and will attend to them.
Curtain solves this by physically withholding future instructions from the context window:
- Works directly with your existing skills: divide any
SKILL.mdor markdown playbook into Acts. - The agent only ever receives the text for the current Act.
- Between Acts hangs a curtain.
- An agent physically cannot skip ahead because downstream tokens do not exist in its prompt window.
Works across Google Antigravity, Claude Code, and OpenAI Codex.
Installation
agy plugin install https://github.com/lukstei/curtainFrom your terminal:
claude plugin marketplace add lukstei/curtain
claude plugin install curtain@curtain-marketplaceOr inside an active session:
/plugin marketplace add lukstei/curtain
/plugin install curtain@curtain-marketplacecodex plugin marketplace add lukstei/curtain
codex plugin add curtain@curtainQuickstart
1. Create a skill directory
Organize your workflow inside a skill directory with SKILL.md for metadata and PLAYBOOK.md for instructions:
.agents/skills/db-migrate/ (or .claude/skills/db-migrate/)
├── SKILL.md # Public skill manifest
└── PLAYBOOK.md # Backstage multi-act scriptIn PLAYBOOK.md, separate your acts using GitHub-style callouts:
# Database Migration
## Act 1: Schema Audit & Draft Migration
Audit existing tables in `src/db/schema.ts`. Write a non-destructive migration script in `migrations/002_user_prefs.sql`.
Do not apply the migration yet.
> [!INTERMISSION] Review migration SQL
> Ensure all columns have default values and no destructive DROP operations exist.
## Act 2: Local Verification
Run the migration script against local test Postgres container. Run existing test suite to check for regressions.
> [!CURTAIN] Continue automatically to cleanup
## Act 3: Cleanup & Documentation
Update the ORM models and export types. Update schema docs in `docs/db.md`.2. Run in chat
Invoke the skill directly via its natural command:
- Claude Code & AGY:
/db-migrate - Codex:
$db-migrate
When paused at an intermission, resume with /next (Codex: $curtain:next).
[!NOTE]
- Antigravity: Antigravity executes skills by instructing the agent to read
SKILL.mdviaview_file. Curtain intercepts anyview_filecall on a skill backed by aPLAYBOOK.mdto begin Act 1. To view or edit a CurtainSKILL.mdin Antigravity without triggering playbook execution, inspect or modify the file directly in your editor rather than asking the agent to view it.- Codex: Hook output is visible in chat until openai/codex#25403 is resolved.
Syntax & Delimiters
Skills and playbooks are standard Markdown files separated by GitHub-style callout alert blockquotes:
| Delimiter | Type | Behavior |
| :--- | :--- | :--- |
| > [!CURTAIN] | Automatic | Delimiter concluding the active Act. Intercepts turn completion via the Stop hook, raises the curtain, and feeds the next Act immediately. |
| > [!INTERMISSION] | Intermission Gate | Intermission concluding the active Act. Pauses execution and yields control to the developer for review. Feedback messages replay the intermission criteria. Resume with /next. |
Delimiters support optional instructions:
> [!INTERMISSION] Criteriaformats as[INTERMISSION CRITERIA]and replays as[INTERMISSION REVIEW]during review turns.> [!CURTAIN] Criteriaformats as[TRANSITION CRITERIA].
Commands & Controls
| Command (Claude / AGY) | Command (Codex CLI) | Description |
| :--- | :--- | :--- |
| /<skill-name> | $<skill-name> | Start execution of a multi-act skill. |
| /next | $curtain:next | Advance to the next Act when paused at an intermission. |
| /curtain-adopt <skill> | $curtain-adopt <skill> | Convert an existing skill into a multi-act Curtain playbook. |
| /curtain-eject <skill> | $curtain-eject <skill> | Reverse an adopted playbook back into a standard single-file skill. |
Adopting & Ejecting Skills
Curtain includes built-in skills to migrate existing skills into playbooks and back:
Adopting a Skill (/curtain-adopt)
Convert an existing single-file skill (SKILL.md) into a multi-act playbook:
/curtain-adopt <skill-name-or-path>- Preserves original prose and headings verbatim without inventing artificial phase titles.
- Prunes redundant wait instructions, forward context leaks, and Tables of Contents.
- Inserts bare
> [!INTERMISSION]delimiters where the skill explicitly pauses for approval or plans; inserts> [!CURTAIN]at other section boundaries. - Previews the proposed playbook and delimiter quick-reference card in the review sidebar before writing
PLAYBOOK.mdand wrappingSKILL.md.
Ejecting a Playbook (/curtain-eject)
Restore an adopted playbook back to a standard single-file skill:
/curtain-eject <skill-name-or-path>- Recombines the preserved YAML frontmatter in
SKILL.mdwith the body fromPLAYBOOK.md. - Strips all
> [!CURTAIN]and> [!INTERMISSION]callouts. - Previews the restored
SKILL.mdin the review sidebar, then deletesPLAYBOOK.mdupon confirmation.
Development
npm install
npm run verify # runs tests, linter, and typecheck
npm run build # builds dist/curtain.mjs
npm run test:watch # test watcherChangelog
See CHANGELOG for release history and notable changes.
License
MIT © 2026 Lukas Steinbrecher
