sync-slay-skill
Read CLI command source files and regenerate the slay SKILL.md + init.ts command reference to match
- License 许可
- GPL-3.0
- 最近更新
- 2026-04-17
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- sync-slay-skill
- trigger
- none
- description
- Read CLI command source files and regenerate the slay SKILL.md + init.ts command reference to match
03 SKILL.md 正文
Synchronize the slay CLI reference documentation with the actual CLI source code.
Targets
The CLI reference lives in one place:
.claude/skills/slay/SKILL.md— dev-facing, includes--devreminder and environment variables table
Step 1: Read CLI source files
Read these files in full to extract the command tree:
packages/apps/cli/src/index.ts— root program, global flagspackages/apps/cli/src/commands/tasks.ts— tasks, subtasks, tag; nests browser + assetspackages/apps/cli/src/commands/browser.ts— browser subcommands (nested undertasks)packages/apps/cli/src/commands/projects.tspackages/apps/cli/src/commands/tags.tspackages/apps/cli/src/commands/templates.tspackages/apps/cli/src/commands/automations.tspackages/apps/cli/src/commands/processes.tspackages/apps/cli/src/commands/pty.tspackages/apps/cli/src/commands/panels.ts
Skip completions.ts and init.ts — internal/meta commands, not documented.
Also read both targets to understand current state:
.claude/skills/slay/SKILL.mdpackages/apps/cli/src/commands/init.ts
Step 2: Extract command tree
Parse Commander.js patterns to build the full command tree:
| Pattern | Meaning |
|---|---|
.command('name <req> [opt]') |
Command with positional args |
.description('text') |
Command description |
.option('--flag', 'desc') |
Optional boolean flag |
.option('--name <value>', 'desc') |
Optional value option |
.option('-s, --long <value>', 'desc') |
Short + long option |
.requiredOption('--name <value>', 'desc') |
Required option |
Nesting to track:
browserCommand()is added totasksviacmd.addCommand(browserCommand())assetsSubcommand()is added totasksviacmd.addCommand(assetsSubcommand())- Parent-level options (like
--panel <state>onbrowser) are inherited by all subcommands — include them on each subcommand line
Step 3: Regenerate the Commands section
Group commands into these categories (preserve this ordering):
| Section | Commands from |
|---|---|
| Task lifecycle | tasks view, tasks update, tasks done, tasks create |
| Subtasks | tasks subtasks, tasks subtask-add |
| Task management | tasks list, tasks search, tasks open, tasks archive, tasks delete |
| Tags | tasks tag (all variants), tags list, tags create, tags delete |
| Templates | all templates subcommands |
| Browser panel | all tasks browser subcommands |
| Assets | all tasks assets subcommands |
| Projects | all projects subcommands |
| Automations | all automations subcommands |
| Processes | all processes subcommands |
| PTY sessions | all pty subcommands |
| Web panels | all panels subcommands |
Format each line as:
- `slay <command-path> <positional-args> <required-opts> [optional-opts]` — <description>
Rules:
- Required options (
.requiredOption): bare syntax--project <name> - Optional options (
.option): bracket syntax[--json],[--limit <n>] - Short flags: use the short form only when conventionally expected (
-o,-n,-s) tasks tag: document as multiple lines — one per usage pattern (show,--set,--add,--remove,--clear)- Preserve command ordering within each group (most common first)
- Do NOT include option defaults in the signature
Step 4: Update SKILL.md
In .claude/skills/slay/SKILL.md, replace ONLY the content between ## Commands and ## Notes.
Preserve verbatim:
- YAML frontmatter
- Intro paragraph (with
--devreminder) - HTML comment about canonical source
## Global flagssection## Environment variablestable## Notessection (unless a note references a removed command — update it)
Step 5: Report changes
After updating, summarize:
- Added: commands in source but not previously documented
- Removed: commands previously documented but no longer in source
- Changed: options added/removed/renamed vs previous docs
- Preserved: confirm non-Commands sections unchanged
Tell user to review with git diff.
Edge cases
- New command file imported in
index.tsbut not in the file list above → read it, ask user which category heading to use - Missing
.description()→ use command name as placeholder, flag for review - Ignore option default values (third arg to
.option())
04 同仓库更多 Skills
sustainable-solution-question
Asks if the implementation is a sustainable solution
slay
Full CLI reference for slay — orchestrates all slay domain skills
slay-tasks
Manage tasks, subtasks, tags, and templates via the slay CLI
slay-pty
Interact with PTY terminal sessions via the slay CLI
slay-projects
Manage projects via the slay CLI
slay-processes
List and manage running processes via the slay CLI