Skip to main content

Command reference

Every command is a command_<name> function in src/skillgen/cli.py, registered in HANDLERS. This page lists every command and flag. For each command's --json output see JSON output.

Shared options​

Every command accepts:

OptionEffect
--jsonPrint JSON, validated against src/skillgen/schema/cli/<command>.schema.json before it is printed
--root FOLDERRepository root (default: the current folder, or the nearest parent holding .skillgen/)
-v, -vvMore output on the console: info, then debug. The log file always gets everything

skillgen --version prints the version.

Exit codes​

CodeNameMeaning
0EXIT_OKThe command ran and everything passed
1EXIT_FAILEDThe command ran but something failed (a check, a stale skill, a missing tool)
2EXIT_ERRORAn expected error stopped it (a SkillgenError: bad config, unknown route, export refused…)
3EXIT_NEEDSThe run stopped at a next step for the agent or developer; see next

Set up​

init​

Create .skillgen/ with its config.json, routes.json, rules/, pages/ and a .gitignore for secrets/, cache/ and logs/.

FlagEffect
--app-name "My App"The app's display name; also the default skill-name prefix
--url URLBase URL of a running dev or staging copy, for --xy
--environment dev|staging|productionWhat --url points at. The probe refuses production
--name PREFIXPrefix for every skill name
--analyzer claude-code|file|replayWho performs the analysis step
skillgen init --app-name "My App" --url http://localhost:3000

install​

Add /skillgen, the route-analyzer subagent and the driver skill to Claude Code, and download Chromium for --xy when the probe extra is installed.

FlagEffect
--target FOLDERClaude folder (default ~/.claude; use ./.claude for one project)
--no-chromiumSkip the Chromium download

doctor​

Check Python, Graphify, Claude Code, ast-grep and Playwright, and where skillgen runs from. Exits 1 when a required check fails.

FlagEffect
--fixDownload Chromium for the probe

login​

Open a browser window so you can log in to your dev copy once. The session is saved in .skillgen/secrets/storage-state.json for probing. Needs the probe extra.

FlagEffect
--url URLLogin page (default: the app URL)

Find pages​

routes​

Find routes from every source and write .skillgen/routes.json. See Route discovery.

FlagEffect
--allEvery route (the default)
--route /xAdd a route by hand; repeatable
--include GLOBRoute glob to keep, such as 'campaigns/*'; repeatable
--exclude GLOBRoute glob to drop; repeatable
--name PREFIXPrefix for every skill name
--no-graphDo not build the code graph
--ask-claudeAlso let Claude Code list routes from the code graph's likely router files
--no-claudeNever call Claude Code, even when no route is found

Make skills​

generate​

Generate one skill per route. Exits 3 when a route waits for a next step. See Generating skills.

FlagEffect
--route /xOne route, a concrete page, or its skill name. Exclusive with --all
--allEvery route in routes.json
--name NAMEWith --route: the exact skill name. With --all: the prefix for every skill
--xyAlso measure where each field sits on the dev copy; only adds
--url URLBase URL of a running dev or staging copy; implies --xy
--open STEPWith --route: what to click before the form shows, a CSS selector or text:Label; repeat for several; saved to routes.json
--code-onlyNever open a browser (the default)
--analyzer claude-code|file|replayWho performs the analysis
--replay-dir FOLDERRecorded analyses for --analyzer replay
--concurrency NRoutes analysed at once
--description "…"Use this skill description instead of the generated one
--include GLOB, --exclude GLOBKeep or drop routes; repeatable
--forceAlso retry routes marked as having no form
--overwriteRecreate skills that already exist; without it they are left as they are and reported
--no-graphSkip the code graph; slice entry files only
skillgen generate --route /campaigns/new --name new-campaign
skillgen generate --all --name myapp --xy
skillgen generate --route /ads/manager --name ad-budget --xy --open "text:Ad sets" --open "text:Edit budget"

prepare​

Write the slice and the analysis prompt for one route, so Claude Code can analyse it in your session. /skillgen runs it for you.

FlagEffect
--route /xThe route (required)
--name NAMEThe skill name for this route
--no-graphSkip the code graph

Answer and refine​

questions​

List facts skillgen needs you to confirm.

FlagEffect
--skill NAMEOnly this skill's questions
--allInclude answered questions

answer <id> <answer>​

Record an answer: yes, no, code, page, or a value. It applies on the next generate. See Questions and rules.

skillgen answer q1a2b3c "text:Audience settings"

add-rule [skill] "<rule>"​

Add a rule to one skill's user block, or to every skill with --global.

FlagEffect
--check "KEY CONDITION"A machine check compiled into fill.js, such as 'utm_campaign ^[a-z0-9_]+$' or 'daily_budget min 10'
--globalAdd to .skillgen/rules/global.md for every skill
skillgen add-rule new-campaign "Daily budget must be at least 10" --check "daily_budget min 10"
skillgen add-rule "Never launch a campaign without a UTM tag" --global

Check and share​

validate [skill…]​

Check skill folders against the Agent Skills spec and skillgen's rules, and scan them for secrets. With no names, every skill is checked. Size notes are reported but never fail.

index​

Write skills-index.html (graph and skill cards) and skills-index.json at the repository root.

check​

List skills made stale by code changes. Exits 1 when something is stale. See Keeping skills current.

FlagEffect
--since REFGit reference to compare with (default HEAD~1)
--regenerateRegenerate the stale skills
--replay-dir FOLDERRecorded analyses, when the analyzer is replay
--no-graphMatch changed files against slices only

export​

Copy skills out for sharing, after checks and a secret scan, with MANIFEST.sha256. See Exporting.

FlagEffect
--zipWrite one zip file
--one-skillBundle every page into one skill with one SKILL.md, for an upload; written to dist/skill/<name>
--pluginLay out as a Claude Code plugin
--name NAMEPlugin or skill name (default: the app's prefix)
--out FOLDERDestination (default dist/<name>)

export-chatgpt​

Pack every page into one ChatGPT skill (one SKILL.md plus a file per page, with plugin.json and an icon), after the same checks and scan.

FlagEffect
--zipWrite one zip file, ready to upload
--name NAMEPlugin and skill name (default: the skill prefix)
--out FOLDERDestination (default dist/chatgpt/<name>)

When something goes wrong​

logs​

Show the latest run log, or a list. Every command writes one to .skillgen/logs/.

FlagEffect
--listList recent logs instead
--lines NLines of the latest log to show (default 60)
--count NLogs to list (default 10)

probe​

Probe one route on a running dev copy and save what it saw. Only for looking; it does not change a skill. Needs the probe extra.

FlagEffect
--route /xThe route (required)
--url URLConcrete page URL, for routes with parameters