claude-dev-env 1.16.1 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/prompt-generator/SKILL.md +2 -0
- package/skills/prompt-generator/templates/skill-from-ground-up.md +104 -0
- package/skills/prompt-generator/templates/skill-refinement-package.md +109 -0
- package/skills/skill-builder/SKILL.md +20 -0
- package/skills/skill-builder/references/delegation-map.md +2 -0
- package/skills/skill-builder/workflows/improve-skill.md +9 -0
- package/skills/skill-builder/workflows/new-skill.md +12 -0
- package/skills/skill-builder/workflows/polish-skill.md +9 -0
- package/skills/skill-writer/SKILL.md +18 -0
package/package.json
CHANGED
|
@@ -23,6 +23,8 @@ description: >-
|
|
|
23
23
|
|
|
24
24
|
**Eval contract:** The user-visible behavior this skill must satisfy is defined in `packages/claude-dev-env/skills/prompt-generator/TARGET_OUTPUT.md`. Automated evals live in `packages/claude-dev-env/skills/prompt-generator/evals/prompt-generator.json`.
|
|
25
25
|
|
|
26
|
+
**Templates:** Under `packages/claude-dev-env/skills/prompt-generator/templates/`, `skill-from-ground-up.md` is the collaborative prompt for **net-new** checkpointed Agent Skill packages; `skill-refinement-package.md` is the sibling prompt for **existing-skill** multi-file refinements and package-aware polish. Skill-builder and skill-writer in this repo require implementers to use the matching template before checkpointed package work.
|
|
27
|
+
|
|
26
28
|
**Terminology:** **Prompt artifact** — the full XML inside the single user-facing `xml` fence (the paste-ready handoff). **Scope block** — the five-key contract in §3A that grounds instructions. **Default refinement pipeline** — §10: base draft → section refine → merge → 15-row compliance audit → capped fixes (subagent-internal unless draft-only). **Light self-check** — §8: fast pre-return sanity pass (shape, tools, scope, patterns); *not* the compliance audit. **Compliance audit (15-row)** — §11: hook-keyed rows that set the `Audit: pass|fail` numerator. **Execution handoff** — `/agent-prompt` after explicit user intent to run work.
|
|
27
29
|
|
|
28
30
|
**Hook-survival invariant (read first):** The fenced XML artifact is the primary deliverable and MUST survive Stop-hook retries. If a Stop hook rejects the response, only the surrounding audit summary and runtime signal scaffolding may change between retries—the XML inside the fence MUST be re-emitted in full on every retry. Recovery pattern: re-emit the complete fenced XML first, then adjust the audit line. Trimming, summarizing, or deferring the prompt artifact to satisfy a hook gate is forbidden.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Template: ground-up skill build (collaborative)
|
|
2
|
+
|
|
3
|
+
Use this artifact when you want a **new** Agent Skill package built **architecture-first**, then **implementation in layers**, with **human checkpoints** and **evaluation rows tied to real evidence** (pasted threads or explicit user approval), aligned with [Agent Skills best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices).
|
|
4
|
+
|
|
5
|
+
## Before you paste
|
|
6
|
+
|
|
7
|
+
Replace every `[[TOKEN]]` below (keep the brackets off in the final prompt you paste into a session, or substitute literal values).
|
|
8
|
+
|
|
9
|
+
| Token | Meaning |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `[[SKILL_PURPOSE]]` | Two to five sentences: capability, user pain, success shape. |
|
|
12
|
+
| `[[WORKSPACE_ROOT]]` | Repo-relative folder for all Phase A–B files (e.g. `my-skill-workspace/`). |
|
|
13
|
+
| `[[DESIGN_INPUT_GLOB]]` | Hypothesis or gap doc path (e.g. `my-skill-workspace/gap-analysis.md`), or `None` carried into `ARCHITECTURE.md` `Design inputs`. If `None`, omit the trailing `, plus \`[[DESIGN_INPUT_GLOB]]\`` fragment from `target_file_globs` in the XML you paste. |
|
|
14
|
+
| `[[OPTIONAL_PACKAGE_TARGET]]` | Future install path (e.g. `packages/claude-dev-env/skills/my-skill/`) or `deferred until the user requests packaging`. |
|
|
15
|
+
| `[[SKILL_SLUG]]` | Short kebab-case id for eval filename and metadata (e.g. `my-skill`). |
|
|
16
|
+
| `[[DESCRIPTION_TRIGGERS]]` | Comma-separated phrases for third-person `description` triggers (user says, user asks, …). |
|
|
17
|
+
| `[[EVIDENCE_RULE]]` | One sentence: what counts as authorized eval material (e.g. pasted excerpts only). |
|
|
18
|
+
|
|
19
|
+
Optional: run `/prompt-generator` with this template as the brief so **AskUserQuestion** can lock scope before drafting.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Paste-ready XML (after substitution)
|
|
24
|
+
|
|
25
|
+
```xml
|
|
26
|
+
<role>
|
|
27
|
+
You are a skill architect and implementer for Claude Agent Skills. You build a skill package under human review. You follow Anthropic Agent Skills best practices for structure, progressive disclosure, workflows, examples, and evaluation-driven iteration. You treat the user as the sole authority for real evaluation evidence.
|
|
28
|
+
</role>
|
|
29
|
+
|
|
30
|
+
<background>
|
|
31
|
+
Motivation: [[SKILL_PURPOSE]] The user builds collaboratively: evaluation scenarios must trace to material the user pasted or explicitly approved in thread. Work proceeds architecture-first (full end-state inventory), then implementation from foundation upward, with a full stop for review after each new or materially rewritten file.
|
|
32
|
+
|
|
33
|
+
Scope block (ground every instruction here):
|
|
34
|
+
- target_local_roots: `[[WORKSPACE_ROOT]]` at the repository root of this project (primary drafting and documentation area).
|
|
35
|
+
- target_canonical_roots: Optional future install under `[[OPTIONAL_PACKAGE_TARGET]]`; until packaging is requested, keep all writes inside `[[WORKSPACE_ROOT]]`.
|
|
36
|
+
- target_file_globs: `[[WORKSPACE_ROOT]]ARCHITECTURE.md`, `[[WORKSPACE_ROOT]]SKILL.md`, `[[WORKSPACE_ROOT]]REFERENCE.md`, `[[WORKSPACE_ROOT]]EXAMPLES.md`, `[[WORKSPACE_ROOT]]WORKFLOWS.md`, `[[WORKSPACE_ROOT]]evals/*.json`, `[[WORKSPACE_ROOT]]scripts/**` when present, plus `[[DESIGN_INPUT_GLOB]]` when it names a real path.
|
|
37
|
+
- comparison_basis: Anthropic Agent Skills best practices for concise metadata, third-person descriptions, progressive disclosure (SKILL.md as table of contents, linked files one level deep, table of contents atop references over one hundred lines), copy-paste checklists for complex flows, template plus example pairs, evaluation JSON with expected_behavior arrays, and iterative testing across models the user cares about.
|
|
38
|
+
- completion_boundary: Phase A delivers `[[WORKSPACE_ROOT]]ARCHITECTURE.md` listing every end-state file, its purpose, load order, eval evidence policy, and optional hook milestones; the user approves or edits that architecture in chat. Phase B creates or updates exactly one primary file per user checkpoint; each checkpoint ends with a short summary naming the next file queued. Phase C closes when SKILL.md plus linked references exist, `evals/` contains JSON whose populated rows include evidence references, and a final inventory table lists every path with a one-line purpose.
|
|
39
|
+
|
|
40
|
+
Hypothesis note: When `[[DESIGN_INPUT_GLOB]]` names a file, treat that file as design input; each eval row still needs a matching pasted thread excerpt or explicit user approval before it counts as grounded behavior truth.
|
|
41
|
+
|
|
42
|
+
Source priority for structure and quality bars: Anthropic Agent Skills documentation and prompting best practices first; user pasted materials for behavioral truth; repository AGENTS.md or package README when they touch path layout.
|
|
43
|
+
|
|
44
|
+
Citation policy: Quote user-pasted excerpts inside evaluation records or EXAMPLES.md when illustrating a scenario; paraphrase only when the user labels a paste as approved summary material. Ground structural claims about Anthropic guidance in links recorded in REFERENCE.md.
|
|
45
|
+
|
|
46
|
+
Evaluation evidence rule: [[EVIDENCE_RULE]]
|
|
47
|
+
</background>
|
|
48
|
+
|
|
49
|
+
<instructions>
|
|
50
|
+
1. Phase A — Architecture inventory: Create or replace `[[WORKSPACE_ROOT]]ARCHITECTURE.md` with an end-state map: a `Design inputs` line carrying either the path `[[DESIGN_INPUT_GLOB]]` or the literal `None`; required YAML frontmatter fields for SKILL.md; third-person description triggers covering [[DESCRIPTION_TRIGGERS]]; planned progressive disclosure files (each linked one level deep from SKILL.md); workflow checklist locations; EXAMPLES.md plan (input and output pairs aligned to user-provided threads when available); `evals/` JSON filename, schema fields (`query`, `expected_behavior`, optional `files`, `evidence_ref` pointing to paste ids or approved labels); optional future hook integration as a separate milestone requiring explicit user activation; forward-slash paths only. Close Phase A with a brief chat summary listing deliverables and ask the user to approve or edit `ARCHITECTURE.md` before Phase B begins.
|
|
51
|
+
2. Phase B — Ground-up implementation after approval: (a) Pull vocabulary and pain language from the design source path recorded in `ARCHITECTURE.md` under `Design inputs` when that section lists a path; reuse stable terms across new files. When `Design inputs` lists `None`, rely on repository conventions plus stated chat goals for terminology. (b) Draft `[[WORKSPACE_ROOT]]SKILL.md` with valid `name` (lowercase, hyphens, within length limits) and a rich third-person `description` covering what the skill does and exact triggers. (c) Add `REFERENCE.md` for terminology, links to Anthropic docs, and eval evidence rules. (d) Add `EXAMPLES.md` with template openings; pair each example with a user-supplied or user-approved excerpt when available; leave labeled slots where pastes are still outstanding. (e) Add `WORKFLOWS.md` containing copy-paste checklists for the main user journeys. (f) Create `evals/[[SKILL_SLUG]].json` using the schema from ARCHITECTURE.md; keep `expected_behavior` empty or placeholder only until matching pasted excerpts arrive; each populated row includes `evidence_ref` to the user paste or approval line. (g) Keep SKILL.md body under five hundred lines; push depth into linked files; add a table of contents at the top of any reference file expected to exceed one hundred lines.
|
|
52
|
+
3. Collaboration gate: After every new file or material rewrite in Phase B, pause the thread for user review; continue only after explicit user approval naming the next file to tackle.
|
|
53
|
+
4. Evaluation hygiene: Add or tighten evaluation rows solely from text the user pasted or explicitly approved in chat; when coverage gaps remain, document the gap inside REFERENCE.md under a heading such as “Pending approved excerpts” with positive wording about what artifact will unlock each slot.
|
|
54
|
+
5. Quality pass before each handoff: Verify third-person description, consistent terminology, one-level-deep links from SKILL.md, forward-slash paths, and checklist presence for multi-step flows.
|
|
55
|
+
6. Optional Phase C — Distribution: Copy or adapt the approved package into the package skill path only when the user requests packaging; mirror the same file set; update cross-links.
|
|
56
|
+
</instructions>
|
|
57
|
+
|
|
58
|
+
<constraints>
|
|
59
|
+
- Keep writes primarily inside `[[WORKSPACE_ROOT]]` until the user expands scope in chat.
|
|
60
|
+
- Limit each checkpoint to one primary file (plus tiny cross-link tweaks the user OKs in the same message).
|
|
61
|
+
- Prefer additive edits: create new files listed in ARCHITECTURE.md before renaming or collapsing documents; describe planned moves in the checkpoint summary.
|
|
62
|
+
- Defer hook installation, Stop-hook changes, or clipboard automation to an explicit milestone the user starts later.
|
|
63
|
+
- Align naming with Anthropic guidance: gerund or action-oriented skill names; descriptive file names; ship only path segments that name the skill domain clearly (for example `reference/`, `evals/`, `EXAMPLES.md`).
|
|
64
|
+
</constraints>
|
|
65
|
+
|
|
66
|
+
<output_format>
|
|
67
|
+
Every assistant milestone message uses this shape:
|
|
68
|
+
1. `## Summary` — bullets for files touched, decisions made, and the single filename queued for the next review.
|
|
69
|
+
2. `## Checkpoint` — one paragraph restating what the user should verify before the next file starts.
|
|
70
|
+
3. When showing draft bodies inline, use fenced code blocks with language tags (`markdown`, `json`) matching the destination file.
|
|
71
|
+
4. Phase A exit criterion: user approves `ARCHITECTURE.md` content in chat or edits it and signals approval.
|
|
72
|
+
5. Phase B exit criterion: SKILL.md, REFERENCE.md, EXAMPLES.md, WORKFLOWS.md, and `evals/*.json` exist; eval JSON lists only user-pasted or user-approved evidence references in populated rows; REFERENCE.md lists any still-empty slots.
|
|
73
|
+
6. Ship a closing `## Inventory` table: path, one-line purpose, progressive disclosure load order.
|
|
74
|
+
|
|
75
|
+
Light self-check the implementer runs silently before sending each milestone: scope paths remain under `[[WORKSPACE_ROOT]]` while Phase C stays inactive; when Phase C is active, allow writes under the package target too; collaboration gate honored; evaluation rows tied to approved evidence only; links one level deep from SKILL.md; forward slashes throughout.
|
|
76
|
+
</output_format>
|
|
77
|
+
|
|
78
|
+
<illustrations>
|
|
79
|
+
Phase A summary template (markdown):
|
|
80
|
+
|
|
81
|
+
## Architecture ready for review
|
|
82
|
+
- End-state files: [list]
|
|
83
|
+
- Eval evidence policy: [restated in one line]
|
|
84
|
+
- Next action after your OK: create `SKILL.md` skeleton
|
|
85
|
+
|
|
86
|
+
Eval row stub (JSON shape):
|
|
87
|
+
|
|
88
|
+
{
|
|
89
|
+
"skills": ["[[SKILL_SLUG]]"],
|
|
90
|
+
"query": "[paste user question text here]",
|
|
91
|
+
"files": [],
|
|
92
|
+
"expected_behavior": [],
|
|
93
|
+
"evidence_ref": "[chat message id or user approval line]"
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
Checkpoint paragraph pattern:
|
|
97
|
+
|
|
98
|
+
Please review `REFERENCE.md`. When ready, reply with approval to proceed to `EXAMPLES.md`.
|
|
99
|
+
</illustrations>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
Notation: The claude-dev-env **skill-builder** and **skill-writer** skills reference this file as a required step for **net-new** full skill packages. For refinements anchored to an existing skill directory, use the sibling template `skill-refinement-package.md` in this folder. Keep this file self-contained and token-driven so it stays paste-ready for `/prompt-generator`.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Template: skill package refinement (collaborative)
|
|
2
|
+
|
|
3
|
+
Use this artifact when you are **refining an existing** Agent Skill package **architecture-first**, then **applying changes in layers**, with **human checkpoints** and **evaluation rows tied to real evidence** (observation transcripts, pasted threads, or explicit user approval). Same orchestration shape as `skill-from-ground-up.md`; this variant anchors every plan to a **baseline skill directory** and a **delta** (observations, gap analysis), and favors **surgical edits** over wholesale rewrite.
|
|
4
|
+
|
|
5
|
+
Source layout mirrors: [Agent Skills best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices).
|
|
6
|
+
|
|
7
|
+
## Before you paste
|
|
8
|
+
|
|
9
|
+
Replace every `[[TOKEN]]` below (drop brackets in the final prompt, or substitute literals).
|
|
10
|
+
|
|
11
|
+
| Token | Meaning |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| `[[REFINEMENT_PURPOSE]]` | Two to five sentences: what must improve, what must stay stable, success shape for the refined package. |
|
|
14
|
+
| `[[BASELINE_SKILL_ROOT]]` | Repo-relative path to the **current** skill package root (the live `SKILL.md` directory you read first). |
|
|
15
|
+
| `[[WORKSPACE_ROOT]]` | Repo-relative folder for `ARCHITECTURE.md`, iteration notes, evals, and optional draft copies (can match `[[BASELINE_SKILL_ROOT]]` for in-place work, or a dedicated `[name]-workspace/` when using a snapshot workflow). |
|
|
16
|
+
| `[[DESIGN_INPUT_GLOB]]` | Observation or gap doc path (e.g. `[name]-workspace/gap-analysis.md`). Carry into `ARCHITECTURE.md` under `Observation inputs`. If truly absent, set `Design inputs` to `None` in `ARCHITECTURE.md` and omit the trailing `plus \`[[DESIGN_INPUT_GLOB]]\`` fragment from `target_file_globs` in the pasted XML. |
|
|
17
|
+
| `[[OPTIONAL_PACKAGE_TARGET]]` | Future install path (e.g. `packages/claude-dev-env/skills/my-skill/`) or `deferred until the user requests packaging`. |
|
|
18
|
+
| `[[SKILL_SLUG]]` | Short kebab-case id for eval filename and metadata (usually matches existing skill `name`). |
|
|
19
|
+
| `[[DESCRIPTION_TRIGGERS]]` | Comma-separated phrases for third-person `description` triggers after refinement (retain strong triggers; add any new ones). |
|
|
20
|
+
| `[[EVIDENCE_RULE]]` | One sentence: authorized eval material (e.g. observation transcripts plus pasted or explicitly approved thread excerpts only). |
|
|
21
|
+
|
|
22
|
+
Optional: run `/prompt-generator` with this template as the brief so **AskUserQuestion** can lock scope before drafting.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Paste-ready XML (after substitution)
|
|
27
|
+
|
|
28
|
+
```xml
|
|
29
|
+
<role>
|
|
30
|
+
You are a skill architect and implementer for Claude Agent Skills. You refine an existing skill package under human review. You follow Anthropic Agent Skills best practices for structure, progressive disclosure, workflows, examples, and evaluation-driven iteration. You treat the user and observation artifacts as the sole authority for behavioral truth; you treat the baseline skill tree as the anchor for what already works.
|
|
31
|
+
</role>
|
|
32
|
+
|
|
33
|
+
<background>
|
|
34
|
+
Motivation: [[REFINEMENT_PURPOSE]] The user refines collaboratively: evaluation scenarios must trace to observation transcripts, pasted material, or explicitly approved thread lines. Work proceeds architecture-first (inventory baseline plus planned delta), then implementation in controlled layers, with a full stop for review after each materially touched file.
|
|
35
|
+
|
|
36
|
+
Scope block (ground every instruction here):
|
|
37
|
+
- target_local_roots: `[[WORKSPACE_ROOT]]` at the repository root of this project (planning, evals, optional drafts). Baseline read source: `[[BASELINE_SKILL_ROOT]]` (always list both in ARCHITECTURE.md).
|
|
38
|
+
- target_canonical_roots: Optional future install under `[[OPTIONAL_PACKAGE_TARGET]]`; until packaging is requested, keep planning and agreed writes scoped per ARCHITECTURE.md checkpoints.
|
|
39
|
+
- target_file_globs: `[[WORKSPACE_ROOT]]ARCHITECTURE.md`, files under `[[BASELINE_SKILL_ROOT]]**` that ARCHITECTURE.md lists as in scope, `[[WORKSPACE_ROOT]]evals/*.json`, `[[WORKSPACE_ROOT]]scripts/**` when present, plus `[[DESIGN_INPUT_GLOB]]` when it names a real path.
|
|
40
|
+
- comparison_basis: Anthropic Agent Skills best practices for concise metadata, third-person descriptions, progressive disclosure (SKILL.md as table of contents, linked files one level deep, table of contents atop references over one hundred lines), copy-paste checklists, template plus example pairs, evaluation JSON with expected_behavior arrays, and iterative testing across models the user cares about; plus **delta discipline**: preserve sections the observation record marks as still effective; change only what observations or approved gaps demand.
|
|
41
|
+
- completion_boundary: Phase A delivers or updates `[[WORKSPACE_ROOT]]ARCHITECTURE.md` with sections `Baseline inventory` (paths under `[[BASELINE_SKILL_ROOT]]`), `Observation inputs` (link to `[[DESIGN_INPUT_GLOB]]` or `None`), `Planned deltas` (bullet list tied to observations), `Files unchanged this pass` (explicit list), eval evidence policy, optional hook milestones; the user approves or edits in chat. Phase B updates exactly one primary file per user checkpoint (baseline path or workspace draft per ARCHITECTURE.md); each checkpoint ends naming the next file. Phase C closes when planned deltas are implemented, eval JSON populated rows carry evidence references per [[EVIDENCE_RULE]], and a final `## Inventory` table lists every touched path with one-line purpose.
|
|
42
|
+
|
|
43
|
+
Hypothesis note: `[[DESIGN_INPUT_GLOB]]` when present carries observation-grounded gaps; each new or tightened eval row still needs a matching transcript excerpt, paste, or explicit user approval before it counts as grounded behavior truth.
|
|
44
|
+
|
|
45
|
+
Source priority for structure and quality bars: Anthropic Agent Skills documentation and prompting best practices first; observation transcripts and user pasted materials for behavioral truth; repository AGENTS.md or package README when they touch path layout.
|
|
46
|
+
|
|
47
|
+
Citation policy: Quote observation snippets and user-pasted excerpts inside evaluation records or EXAMPLES.md when illustrating a scenario; ground structural claims about Anthropic guidance in links recorded in REFERENCE.md.
|
|
48
|
+
|
|
49
|
+
Evaluation evidence rule: [[EVIDENCE_RULE]]
|
|
50
|
+
</background>
|
|
51
|
+
|
|
52
|
+
<instructions>
|
|
53
|
+
1. Phase A — Refinement architecture: Create or replace `[[WORKSPACE_ROOT]]ARCHITECTURE.md` with: `Baseline inventory` listing every file under `[[BASELINE_SKILL_ROOT]]` that stays in scope; `Observation inputs` with path `[[DESIGN_INPUT_GLOB]]` or `None`; `Planned deltas` as bullets each referencing an observation or approved gap; `Files unchanged this pass` listing files explicitly left alone; required YAML frontmatter fields for SKILL.md after refinement; third-person description triggers covering [[DESCRIPTION_TRIGGERS]]; progressive disclosure plan (links one level deep from SKILL.md); workflow checklist touchpoints; EXAMPLES.md delta plan; `evals/` JSON filename and schema fields (`query`, `expected_behavior`, optional `files`, `evidence_ref`); optional hook milestone flagged for explicit user activation; forward-slash paths only. Close Phase A with a brief chat summary and obtain user approval on `ARCHITECTURE.md` before Phase B.
|
|
54
|
+
2. Phase B — Layered implementation after approval: (a) Before editing any file, read the current version from `[[BASELINE_SKILL_ROOT]]` (or from the approved snapshot path recorded in ARCHITECTURE.md when using a copy workflow). (b) Apply only the deltas listed in `Planned deltas`; retain prose and structure the observation record marks as still working. (c) Update `[[BASELINE_SKILL_ROOT]]SKILL.md` or workspace draft per ARCHITECTURE.md with valid `name` and refined third-person `description`. (d) Update REFERENCE.md, EXAMPLES.md, WORKFLOWS.md only when ARCHITECTURE.md lists them in scope for this pass. (e) Update or create `evals/[[SKILL_SLUG]].json` per ARCHITECTURE.md; new or tightened rows include `evidence_ref` to observation transcript ids, pastes, or approval lines. (f) Keep SKILL.md body under five hundred lines; push new depth into linked files; add a table of contents at the top of any reference file expected to exceed one hundred lines.
|
|
55
|
+
3. Collaboration gate: After every materially touched file in Phase B, pause for user review; continue only after explicit user approval naming the next file.
|
|
56
|
+
4. Evaluation hygiene: Add or tighten evaluation rows solely from observation artifacts or text the user pasted or explicitly approved; document remaining coverage needs under REFERENCE.md in a “Pending approved excerpts” style section with positive wording about what artifact unlocks each slot.
|
|
57
|
+
5. Quality pass before each handoff: Verify third-person description, consistent terminology, one-level-deep links from SKILL.md, forward-slash paths, checklist presence for multi-step flows, and that unchanged files match the `Files unchanged this pass` list; when the user approves a scope change, update that list in `ARCHITECTURE.md` in the same checkpoint before touching additional files.
|
|
58
|
+
6. Optional Phase C — Distribution: Copy or adapt the approved package into the package skill path only when the user requests packaging; mirror the agreed file set; update cross-links.
|
|
59
|
+
</instructions>
|
|
60
|
+
|
|
61
|
+
<constraints>
|
|
62
|
+
- Read baseline files from `[[BASELINE_SKILL_ROOT]]` before drafting replacements; prefer minimal diffs aligned to ARCHITECTURE.md.
|
|
63
|
+
- Limit each checkpoint to one primary file (plus tiny cross-link tweaks the user OKs in the same message).
|
|
64
|
+
- Prefer additive edits and explicit rename plans recorded in the checkpoint summary before broad moves.
|
|
65
|
+
- Defer hook installation, Stop-hook changes, or clipboard automation to an explicit milestone the user starts later.
|
|
66
|
+
- Align naming with Anthropic guidance; ship only path segments that name the skill domain clearly (for example `reference/`, `evals/`, `EXAMPLES.md`).
|
|
67
|
+
</constraints>
|
|
68
|
+
|
|
69
|
+
<output_format>
|
|
70
|
+
Every assistant milestone message uses this shape:
|
|
71
|
+
1. `## Summary` — bullets for files touched, decisions made, baseline subsection preserved or changed, single filename queued for next review.
|
|
72
|
+
2. `## Checkpoint` — one paragraph restating what the user should verify before the next file starts.
|
|
73
|
+
3. When showing draft bodies inline, use fenced code blocks with language tags (`markdown`, `json`) matching the destination file.
|
|
74
|
+
4. Phase A exit criterion: user approves `ARCHITECTURE.md` in chat or edits it and signals approval.
|
|
75
|
+
5. Phase B exit criterion: planned deltas from ARCHITECTURE.md are implemented; eval JSON populated rows reference evidence per [[EVIDENCE_RULE]]; REFERENCE.md lists any still-empty eval slots.
|
|
76
|
+
6. Ship a closing `## Inventory` table: path, one-line purpose, progressive disclosure load order, note whether each path was baseline-updated or newly added.
|
|
77
|
+
|
|
78
|
+
Light self-check before each milestone: scope matches ARCHITECTURE.md; collaboration gate honored; evaluation rows tied to approved evidence only; links one level deep from SKILL.md; forward slashes throughout; baseline sections marked stable stay intact until the user approves an explicit change to them.
|
|
79
|
+
</output_format>
|
|
80
|
+
|
|
81
|
+
<illustrations>
|
|
82
|
+
Phase A summary template (markdown):
|
|
83
|
+
|
|
84
|
+
## Refinement architecture ready for review
|
|
85
|
+
- Baseline root: [[BASELINE_SKILL_ROOT]]
|
|
86
|
+
- Observation inputs: [[DESIGN_INPUT_GLOB]]
|
|
87
|
+
- Planned deltas: [bullets tied to observations]
|
|
88
|
+
- Unchanged this pass: [file list]
|
|
89
|
+
- Next action after your OK: edit [single file name]
|
|
90
|
+
|
|
91
|
+
Eval row stub (JSON shape):
|
|
92
|
+
|
|
93
|
+
{
|
|
94
|
+
"skills": ["[[SKILL_SLUG]]"],
|
|
95
|
+
"query": "[task that failed under old skill]",
|
|
96
|
+
"files": [],
|
|
97
|
+
"expected_behavior": [],
|
|
98
|
+
"evidence_ref": "[observation transcript id or user approval line]"
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
Checkpoint paragraph pattern:
|
|
102
|
+
|
|
103
|
+
Please review the updated `SKILL.md` delta against baseline. When ready, reply with approval to proceed to `REFERENCE.md`.
|
|
104
|
+
</illustrations>
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
Notation: Derived from `skill-from-ground-up.md` in this folder; use **that** template for **net-new** packages, **this** template when a baseline skill directory exists. The claude-dev-env **skill-builder** workflows (`improve-skill`, `polish-skill`) and **skill-writer** reference this file for checkpointed, multi-file refinements.
|
|
@@ -58,6 +58,24 @@ The feedback loop: observe Claude B's behavior, bring insights back, refine the
|
|
|
58
58
|
| 5. Iterate | Review results, refine, re-test | This skill + `/skill-writer` + Phase 4 |
|
|
59
59
|
| 6. Polish | Description optimization, trigger eval, final check | `skill-creator` description optimizer |
|
|
60
60
|
|
|
61
|
+
## Ground-up skill package (required reference)
|
|
62
|
+
|
|
63
|
+
When building a **new** skill as a **full package** (architecture inventory, progressive disclosure files, `evals/`, **human checkpoint after each file**), treat the following as **mandatory** before implementation:
|
|
64
|
+
|
|
65
|
+
- **Read:** `prompt-generator/templates/skill-from-ground-up.md` inside the claude-dev-env `skills/` directory (repository path: `packages/claude-dev-env/skills/prompt-generator/templates/skill-from-ground-up.md`).
|
|
66
|
+
- **Do:** Run `/prompt-generator` with that file’s token table filled so the downstream session follows architecture-first sequencing, per-file review gates, and eval rows tied only to user-pasted or explicitly approved evidence.
|
|
67
|
+
|
|
68
|
+
Use this **together with** gap-analysis and eval-scenario templates in this package; the ground-up template supplies the **orchestration contract** for the multi-file layout Anthropic recommends.
|
|
69
|
+
|
|
70
|
+
## Refinement skill package (required reference)
|
|
71
|
+
|
|
72
|
+
When **improving** an existing skill as a **multi-file** or **checkpointed** package (baseline directory plus planned deltas, observation-grounded evals), treat the following as **mandatory** before Phase 2–6 file work in `improve-skill.md` or package-aware steps in `polish-skill.md`:
|
|
73
|
+
|
|
74
|
+
- **Read:** `prompt-generator/templates/skill-refinement-package.md` (repository path: `packages/claude-dev-env/skills/prompt-generator/templates/skill-refinement-package.md`).
|
|
75
|
+
- **Do:** Run `/prompt-generator` with that file’s token table filled (`[[BASELINE_SKILL_ROOT]]`, `[[WORKSPACE_ROOT]]`, observation gap path, evidence rule) so rollout stays architecture-first, delta-focused, and tied to real observation or approved excerpts.
|
|
76
|
+
|
|
77
|
+
Net-new packages without a baseline skill directory use `skill-from-ground-up.md` instead.
|
|
78
|
+
|
|
61
79
|
## Principles (apply across all phases)
|
|
62
80
|
|
|
63
81
|
1. **Evals before documentation.** Never write extensive skill content without evaluation scenarios to validate it.
|
|
@@ -85,3 +103,5 @@ See `${CLAUDE_SKILL_DIR}/references/delegation-map.md` for exact invocation patt
|
|
|
85
103
|
| `references/delegation-map.md` | Integration map for skill-writer and skill-creator |
|
|
86
104
|
| `templates/gap-analysis.md` | Template for Phase 1 gap documentation |
|
|
87
105
|
| `templates/eval-scenario.json` | Eval template matching skill-creator schema |
|
|
106
|
+
| `../prompt-generator/templates/skill-from-ground-up.md` | Required orchestration template for **net-new** full skill packages (architecture-first, checkpoints, evidence-backed evals) |
|
|
107
|
+
| `../prompt-generator/templates/skill-refinement-package.md` | Required orchestration template for **existing-skill** multi-file refinements and package-aware polish (baseline + delta, checkpoints, evidence-backed evals) |
|
|
@@ -18,6 +18,8 @@ No external delegation. The orchestrator helps the user transform gaps into eval
|
|
|
18
18
|
|
|
19
19
|
## Phase 3: Write Skill -- Delegate to `/skill-writer`
|
|
20
20
|
|
|
21
|
+
**Full package path:** If the user approved a package plan from `prompt-generator/templates/skill-from-ground-up.md` (net-new) or `prompt-generator/templates/skill-refinement-package.md` (existing baseline), paste the approved architecture summary, baseline inventory, planned deltas, and checkpoint list into the skill-writer handoff so file order and scope stay aligned.
|
|
22
|
+
|
|
21
23
|
Invoke `/skill-writer` with the following context in your prompt:
|
|
22
24
|
|
|
23
25
|
```
|
|
@@ -51,6 +51,15 @@ Observation-first flow for iterating on an existing skill.
|
|
|
51
51
|
|
|
52
52
|
From here, follow the same phases as `${CLAUDE_SKILL_DIR}/workflows/new-skill.md`, starting at Phase 2 (Build Evals).
|
|
53
53
|
|
|
54
|
+
### Collaborative package orchestration (Phases 2–6)
|
|
55
|
+
|
|
56
|
+
Whenever Phases 2–6 will touch **multiple files**, **progressive disclosure layout**, or use **checkpointed file-by-file rollout**, treat this as **required** before expanding or rewriting the tree:
|
|
57
|
+
|
|
58
|
+
1. Read `prompt-generator/templates/skill-refinement-package.md` from the claude-dev-env `skills/` tree (repository path: `packages/claude-dev-env/skills/prompt-generator/templates/skill-refinement-package.md`).
|
|
59
|
+
2. Run `/prompt-generator` with that template’s token table filled: set `[[BASELINE_SKILL_ROOT]]` to the existing skill directory, `[[WORKSPACE_ROOT]]` to your iteration workspace (in-place or snapshot per user preference), and `[[DESIGN_INPUT_GLOB]]` to this workflow’s observation-based `gap-analysis.md` when it exists.
|
|
60
|
+
|
|
61
|
+
Use `skill-from-ground-up.md` **only** for **greenfield** packages where no baseline skill directory exists yet; use `skill-refinement-package.md` for every refinement anchored to an existing skill.
|
|
62
|
+
|
|
54
63
|
Key differences from the new-skill flow:
|
|
55
64
|
|
|
56
65
|
- **Phase 2 (Build Evals):** Evals should test the specific issues observed in Phase 1, not hypothetical gaps.
|
|
@@ -7,6 +7,18 @@ Full evaluation-driven lifecycle for building a new skill from scratch.
|
|
|
7
7
|
- The user has a task or domain they want to capture as a skill
|
|
8
8
|
- No existing skill for this capability (or intentionally starting fresh)
|
|
9
9
|
|
|
10
|
+
### Ground-up package layout (required before multi-file implementation)
|
|
11
|
+
|
|
12
|
+
When the outcome includes **ARCHITECTURE.md**, **REFERENCE / EXAMPLES / WORKFLOWS**, and **`evals/*.json`** under a workspace (Anthropic-style progressive disclosure plus checkpointed rollout):
|
|
13
|
+
|
|
14
|
+
1. Read `prompt-generator/templates/skill-from-ground-up.md` from the claude-dev-env `skills/` tree (repository path: `packages/claude-dev-env/skills/prompt-generator/templates/skill-from-ground-up.md`).
|
|
15
|
+
2. Run `/prompt-generator` using that template (substitute tokens per its table) **before** Phase 3 expands the repo; align the XML scope block with this workflow’s workspace and evidence rules.
|
|
16
|
+
3. Keep Phase 1–2 artifacts honest: eval prompts and expectations stay grounded in **real** user scenarios; the template reinforces eval rows that reference pasted or explicitly approved evidence only.
|
|
17
|
+
|
|
18
|
+
Skip this block only when the user explicitly wants a **single-file** SKILL.md with no staged package plan.
|
|
19
|
+
|
|
20
|
+
Refinements to an **existing** skill package use `prompt-generator/templates/skill-refinement-package.md` instead (see `improve-skill.md`).
|
|
21
|
+
|
|
10
22
|
---
|
|
11
23
|
|
|
12
24
|
## Phase 1: Identify Gaps
|
|
@@ -8,6 +8,15 @@ Final optimization pass for a skill that is functionally complete.
|
|
|
8
8
|
- The user is satisfied with output quality
|
|
9
9
|
- This is the final step before the skill is considered done
|
|
10
10
|
|
|
11
|
+
### Package-aware polish (recommended)
|
|
12
|
+
|
|
13
|
+
When the polish pass will touch **more than frontmatter alone** (for example `REFERENCE.md`, `EXAMPLES.md`, `WORKFLOWS.md`, link structure, or eval JSON), or the user wants **checkpointed** multi-file updates alongside description work:
|
|
14
|
+
|
|
15
|
+
1. Read `prompt-generator/templates/skill-refinement-package.md` (repository path: `packages/claude-dev-env/skills/prompt-generator/templates/skill-refinement-package.md`).
|
|
16
|
+
2. Run `/prompt-generator` with tokens filled so `ARCHITECTURE.md` records baseline inventory, planned deltas for polish, and evidence rules for any new trigger or behavior evals.
|
|
17
|
+
|
|
18
|
+
Purely **single-field** `description` edits with no structural package changes can skip this block.
|
|
19
|
+
|
|
11
20
|
---
|
|
12
21
|
|
|
13
22
|
## Step 1: Description Optimization
|
|
@@ -32,6 +32,24 @@ Use this skill when the user needs a structured skill artifact; for quick answer
|
|
|
32
32
|
|
|
33
33
|
When invoked with arguments (e.g. `/skill-writer improve this: [paste]`), treat `$ARGUMENTS` as the skill content to refine.
|
|
34
34
|
|
|
35
|
+
### Ground-up multi-file packages (required)
|
|
36
|
+
|
|
37
|
+
When the user is creating a **new** skill as a **package** (workspace with `ARCHITECTURE.md`, `REFERENCE.md`, `EXAMPLES.md`, `WORKFLOWS.md`, `evals/*.json`, per-file human review), **before** drafting `SKILL.md`:
|
|
38
|
+
|
|
39
|
+
1. Read `packages/claude-dev-env/skills/prompt-generator/templates/skill-from-ground-up.md` (installed layout: sibling folder `prompt-generator/templates/skill-from-ground-up.md` under the same `skills/` parent).
|
|
40
|
+
2. Ensure `/prompt-generator` has run with that template filled so architecture-first steps, checkpoint gates, and eval evidence rules are already agreed.
|
|
41
|
+
|
|
42
|
+
If the task is **only** editing an existing `SKILL.md` or a small single-file tweak, this subsection does not apply.
|
|
43
|
+
|
|
44
|
+
### Refinement multi-file packages (required)
|
|
45
|
+
|
|
46
|
+
When the user is **refining** an existing skill as a **package** (baseline skill directory, `ARCHITECTURE.md` with planned deltas, checkpointed updates to REFERENCE / EXAMPLES / WORKFLOWS / `evals/`), **before** rewriting multiple files:
|
|
47
|
+
|
|
48
|
+
1. Read `packages/claude-dev-env/skills/prompt-generator/templates/skill-refinement-package.md` (installed layout: `prompt-generator/templates/skill-refinement-package.md` under the same `skills/` parent).
|
|
49
|
+
2. Ensure `/prompt-generator` has run with that template filled so baseline root, workspace root, observation inputs, and evidence rules are fixed before edits proceed.
|
|
50
|
+
|
|
51
|
+
If the change set is a **small single-file** tweak, this subsection does not apply.
|
|
52
|
+
|
|
35
53
|
## Workflow (run in order)
|
|
36
54
|
|
|
37
55
|
### 1. Classify the skill type
|