New stage
Skill tanker327/agent-skill-analysis/.claude/skills/new-stage
Scaffold a pipeline stage for the SkillAnalysis analyzer — src module, mirrored test file, diagnostic registry entries, fixtures, and wiring into analyze.tsFrom its SKILL.md
npx -y skills add tanker327/agent-skill-analysis --skill new-stageAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.9 KB, 662 tokens by cl100k_base, as published. Nobody here has run it
Scaffold a new pipeline stage named $1 (kebab-case → src/$1.ts), following the
conventions from global_ignore/skl-skill-analysis-plan.md §2–§3 and
.claude/rules/testing.md. Any further arguments are diagnostic codes the stage
will emit.
Preconditions — verify before doing anything
src/schema.ts,src/diagnostics.ts, andsrc/analyze.tsexist (P0 has landed). If not, STOP and tell the user this skill needs the P0 skeleton first.src/$1.tsdoes not already exist. If it does, STOP — this skill scaffolds, it does not overwrite.
Steps
-
Create
src/$1.ts— a pure function module:- One exported function taking plain inputs (never a
SkillSource— IO stays inanalyze.ts) and returning{ <result fields>, diagnostics: Diagnostic[] }. - No clock, no randomness, no locale-dependent calls, no
node:imports. - Any array it returns must have a fixed, documented sort order.
- Match the style of the closest existing stage module.
- One exported function taking plain inputs (never a
-
Register diagnostic codes — for each code passed as an argument, add an entry to the registry in
src/diagnostics.ts: code, default severity (error|warning), message template, optional hint. Codes are kebab-case, noE_/W_prefixes (e.g.readme-missing). -
Create
tests/$1.test.ts— mirrored test file:- Table-driven unit tests over the pure function: happy path, empty input,
and one case per diagnostic code (the vocabulary meta-test in
tests/contract.test.tsfails CI if a registered code has no fixture). - Zero mocks. Use plain values or the
fromFilesmemory source viatests/helpers.tsfor full-pipeline cases.
- Table-driven unit tests over the pure function: happy path, empty input,
and one case per diagnostic code (the vocabulary meta-test in
-
Wire into the pipeline — call the stage from
src/analyze.tsat the right point in the flow (see the pipeline order inglobal_ignore/skl-skill-analysis-flow.md§1, or the stage sequence already inanalyze.ts). If the stage adds output fields, updateSkillAnalysisSchemainsrc/schema.tsin this same change and extend the full-output fixtures. -
Run the gate —
npm run lint && npm run typecheck && npm test. All green, including the contract meta-tests (determinism, schema conformance, diagnostic coverage). -
Report — list created/modified files, the registered codes, and remind the user this should be committed per
.claude/rules/commit-message.md(scope = the stage name;archtype if the schema changed, otherwisefeat).
Stay within the current build-plan phase: if $1 belongs to a later phase than
the one in progress, point that out and ask before proceeding.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.