@ia-ccun/code-agent-cli 0.0.14 → 0.0.16
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/bin/cli.js +153 -84
- package/config/agent/extensions/working-msg.ts +33 -15
- package/config/agent/models.json +41 -11
- package/config/agent/prompts/code-simplifier.md +52 -0
- package/config/agent/skills/brainstorming/SKILL.md +165 -0
- package/config/agent/skills/brainstorming/scripts/frame-template.html +214 -0
- package/config/agent/skills/brainstorming/scripts/helper.js +88 -0
- package/config/agent/skills/brainstorming/scripts/server.cjs +338 -0
- package/config/agent/skills/brainstorming/scripts/start-server.sh +153 -0
- package/config/agent/skills/brainstorming/scripts/stop-server.sh +55 -0
- package/config/agent/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/config/agent/skills/brainstorming/visual-companion.md +286 -0
- package/config/agent/skills/dispatching-parallel-agents/SKILL.md +183 -0
- package/config/agent/skills/executing-plans/SKILL.md +71 -0
- package/config/agent/skills/finishing-a-development-branch/SKILL.md +201 -0
- package/config/agent/skills/owasp-security/SKILL.md +537 -0
- package/config/agent/skills/receiving-code-review/SKILL.md +214 -0
- package/config/agent/skills/requesting-code-review/SKILL.md +106 -0
- package/config/agent/skills/requesting-code-review/code-reviewer.md +146 -0
- package/config/agent/skills/skill-creator/SKILL.md +337 -213
- package/config/agent/skills/skill-creator/agents/analyzer.md +274 -0
- package/config/agent/skills/skill-creator/agents/comparator.md +202 -0
- package/config/agent/skills/skill-creator/agents/grader.md +223 -0
- package/config/agent/skills/skill-creator/assets/eval_review.html +146 -0
- package/config/agent/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/config/agent/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/config/agent/skills/skill-creator/references/schemas.md +430 -0
- package/config/agent/skills/skill-creator/scripts/__init__.py +0 -0
- package/config/agent/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/config/agent/skills/skill-creator/scripts/generate_report.py +326 -0
- package/config/agent/skills/skill-creator/scripts/improve_description.py +248 -0
- package/config/agent/skills/skill-creator/scripts/package_skill.py +33 -7
- package/config/agent/skills/skill-creator/scripts/quick_validate.py +11 -3
- package/config/agent/skills/skill-creator/scripts/run_eval.py +310 -0
- package/config/agent/skills/skill-creator/scripts/run_loop.py +332 -0
- package/config/agent/skills/skill-creator/scripts/utils.py +47 -0
- package/config/agent/skills/subagent-driven-development/SKILL.md +278 -0
- package/config/agent/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/config/agent/skills/subagent-driven-development/implementer-prompt.md +113 -0
- package/config/agent/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/config/agent/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/config/agent/skills/systematic-debugging/SKILL.md +297 -0
- package/config/agent/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/config/agent/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/config/agent/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/config/agent/skills/systematic-debugging/find-polluter.sh +63 -0
- package/config/agent/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/config/agent/skills/systematic-debugging/test-academic.md +14 -0
- package/config/agent/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/config/agent/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/config/agent/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/config/agent/skills/test-driven-development/SKILL.md +372 -0
- package/config/agent/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/config/agent/skills/using-git-worktrees/SKILL.md +219 -0
- package/config/agent/skills/using-superpowers/SKILL.md +116 -0
- package/config/agent/skills/using-superpowers/references/codex-tools.md +25 -0
- package/config/agent/skills/using-superpowers/references/gemini-tools.md +33 -0
- package/config/agent/skills/verification-before-completion/SKILL.md +140 -0
- package/config/agent/skills/writing-plans/SKILL.md +146 -0
- package/config/agent/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/config/agent/skills/writing-skills/SKILL.md +667 -0
- package/config/agent/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/config/agent/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/config/agent/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/config/agent/skills/writing-skills/persuasion-principles.md +187 -0
- package/config/agent/skills/writing-skills/render-graphs.js +168 -0
- package/config/agent/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/package.json +14 -7
- package/config/agent/skills/github/SKILL.md +0 -47
- package/config/agent/skills/owasp/SKILL.md +0 -169
- package/config/agent/skills/pua/SKILL.md +0 -364
- package/config/agent/skills/skill-creator/references/output-patterns.md +0 -82
- package/config/agent/skills/skill-creator/references/workflows.md +0 -28
- package/config/agent/skills/skill-creator/scripts/init_skill.py +0 -303
|
@@ -1,356 +1,480 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill-creator
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
author: xujianjiang
|
|
4
|
+
description: Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Skill Creator
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
A skill for creating new skills and iteratively improving them.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
At a high level, the process of creating a skill goes like this:
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
- Decide what you want the skill to do and roughly how it should do it
|
|
14
|
+
- Write a draft of the skill
|
|
15
|
+
- Create a few test prompts and run claude-with-access-to-the-skill on them
|
|
16
|
+
- Help the user evaluate the results both qualitatively and quantitatively
|
|
17
|
+
- While the runs happen in the background, draft some quantitative evals if there aren't any (if there are some, you can either use as is or modify if you feel something needs to change about them). Then explain them to the user (or if they already existed, explain the ones that already exist)
|
|
18
|
+
- Use the `eval-viewer/generate_review.py` script to show the user the results for them to look at, and also let them look at the quantitative metrics
|
|
19
|
+
- Rewrite the skill based on feedback from the user's evaluation of the results (and also if there are any glaring flaws that become apparent from the quantitative benchmarks)
|
|
20
|
+
- Repeat until you're satisfied
|
|
21
|
+
- Expand the test set and try again at larger scale
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
Your job when using this skill is to figure out where the user is in this process and then jump in and help them progress through these stages. So for instance, maybe they're like "I want to make a skill for X". You can help narrow down what they mean, write a draft, write the test cases, figure out how they want to evaluate, run all the prompts, and repeat.
|
|
19
24
|
|
|
20
|
-
|
|
21
|
-
2. Tool integrations - Instructions for working with specific file formats or APIs
|
|
22
|
-
3. Domain expertise - Company-specific knowledge, schemas, business logic
|
|
23
|
-
4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks
|
|
25
|
+
On the other hand, maybe they already have a draft of the skill. In this case you can go straight to the eval/iterate part of the loop.
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
Of course, you should always be flexible and if the user is like "I don't need to run a bunch of evaluations, just vibe with me", you can do that instead.
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
Then after the skill is done (but again, the order is flexible), you can also run the skill description improver, which we have a whole separate script for, to optimize the triggering of the skill.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
Cool? Cool.
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
## Communicating with the user
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
The skill creator is liable to be used by people across a wide range of familiarity with coding jargon. If you haven't heard (and how could you, it's only very recently that it started), there's a trend now where the power of Claude is inspiring plumbers to open up their terminals, parents and grandparents to google "how to install npm". On the other hand, the bulk of users are probably fairly computer-literate.
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
So please pay attention to context cues to understand how to phrase your communication! In the default case, just to give you some idea:
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
- "evaluation" and "benchmark" are borderline, but OK
|
|
40
|
+
- for "JSON" and "assertion" you want to see serious cues from the user that they know what those things are before using them without explaining them
|
|
38
41
|
|
|
39
|
-
|
|
42
|
+
It's OK to briefly explain terms if you're in doubt, and feel free to clarify terms with a short definition if you're unsure if the user will get it.
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Creating a skill
|
|
47
|
+
|
|
48
|
+
### Capture Intent
|
|
49
|
+
|
|
50
|
+
Start by understanding the user's intent. The current conversation might already contain a workflow the user wants to capture (e.g., they say "turn this into a skill"). If so, extract answers from the conversation history first — the tools used, the sequence of steps, corrections the user made, input/output formats observed. The user may need to fill the gaps, and should confirm before proceeding to the next step.
|
|
51
|
+
|
|
52
|
+
1. What should this skill enable Claude to do?
|
|
53
|
+
2. When should this skill trigger? (what user phrases/contexts)
|
|
54
|
+
3. What's the expected output format?
|
|
55
|
+
4. Should we set up test cases to verify the skill works? Skills with objectively verifiable outputs (file transforms, data extraction, code generation, fixed workflow steps) benefit from test cases. Skills with subjective outputs (writing style, art) often don't need them. Suggest the appropriate default based on the skill type, but let the user decide.
|
|
56
|
+
|
|
57
|
+
### Interview and Research
|
|
58
|
+
|
|
59
|
+
Proactively ask questions about edge cases, input/output formats, example files, success criteria, and dependencies. Wait to write test prompts until you've got this part ironed out.
|
|
60
|
+
|
|
61
|
+
Check available MCPs - if useful for research (searching docs, finding similar skills, looking up best practices), research in parallel via subagents if available, otherwise inline. Come prepared with context to reduce burden on the user.
|
|
62
|
+
|
|
63
|
+
### Write the SKILL.md
|
|
42
64
|
|
|
43
|
-
|
|
65
|
+
Based on the user interview, fill in these components:
|
|
44
66
|
|
|
45
|
-
|
|
67
|
+
- **name**: Skill identifier
|
|
68
|
+
- **description**: When to trigger, what it does. This is the primary triggering mechanism - include both what the skill does AND specific contexts for when to use it. All "when to use" info goes here, not in the body. Note: currently Claude has a tendency to "undertrigger" skills -- to not use them when they'd be useful. To combat this, please make the skill descriptions a little bit "pushy". So for instance, instead of "How to build a simple fast dashboard to display internal Anthropic data.", you might write "How to build a simple fast dashboard to display internal Anthropic data. Make sure to use this skill whenever the user mentions dashboards, data visualization, internal metrics, or wants to display any kind of company data, even if they don't explicitly ask for a 'dashboard.'"
|
|
69
|
+
- **compatibility**: Required tools, dependencies (optional, rarely needed)
|
|
70
|
+
- **the rest of the skill :)**
|
|
46
71
|
|
|
47
|
-
###
|
|
72
|
+
### Skill Writing Guide
|
|
48
73
|
|
|
49
|
-
|
|
74
|
+
#### Anatomy of a Skill
|
|
50
75
|
|
|
51
76
|
```
|
|
52
77
|
skill-name/
|
|
53
78
|
├── SKILL.md (required)
|
|
54
|
-
│ ├── YAML frontmatter
|
|
55
|
-
│
|
|
56
|
-
│ │ └── description: (required)
|
|
57
|
-
│ └── Markdown instructions (required)
|
|
79
|
+
│ ├── YAML frontmatter (name, description required)
|
|
80
|
+
│ └── Markdown instructions
|
|
58
81
|
└── Bundled Resources (optional)
|
|
59
|
-
├── scripts/
|
|
60
|
-
├── references/
|
|
61
|
-
└── assets/
|
|
82
|
+
├── scripts/ - Executable code for deterministic/repetitive tasks
|
|
83
|
+
├── references/ - Docs loaded into context as needed
|
|
84
|
+
└── assets/ - Files used in output (templates, icons, fonts)
|
|
62
85
|
```
|
|
63
86
|
|
|
64
|
-
####
|
|
87
|
+
#### Progressive Disclosure
|
|
65
88
|
|
|
66
|
-
|
|
89
|
+
Skills use a three-level loading system:
|
|
90
|
+
1. **Metadata** (name + description) - Always in context (~100 words)
|
|
91
|
+
2. **SKILL.md body** - In context whenever skill triggers (<500 lines ideal)
|
|
92
|
+
3. **Bundled resources** - As needed (unlimited, scripts can execute without loading)
|
|
67
93
|
|
|
68
|
-
|
|
69
|
-
- **Body** (Markdown): Instructions and guidance for using the skill. Only loaded AFTER the skill triggers (if at all).
|
|
94
|
+
These word counts are approximate and you can feel free to go longer if needed.
|
|
70
95
|
|
|
71
|
-
|
|
96
|
+
**Key patterns:**
|
|
97
|
+
- Keep SKILL.md under 500 lines; if you're approaching this limit, add an additional layer of hierarchy along with clear pointers about where the model using the skill should go next to follow up.
|
|
98
|
+
- Reference files clearly from SKILL.md with guidance on when to read them
|
|
99
|
+
- For large reference files (>300 lines), include a table of contents
|
|
72
100
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
101
|
+
**Domain organization**: When a skill supports multiple domains/frameworks, organize by variant:
|
|
102
|
+
```
|
|
103
|
+
cloud-deploy/
|
|
104
|
+
├── SKILL.md (workflow + selection)
|
|
105
|
+
└── references/
|
|
106
|
+
├── aws.md
|
|
107
|
+
├── gcp.md
|
|
108
|
+
└── azure.md
|
|
109
|
+
```
|
|
110
|
+
Claude reads only the relevant reference file.
|
|
76
111
|
|
|
77
|
-
|
|
78
|
-
- **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks
|
|
79
|
-
- **Benefits**: Token efficient, deterministic, may be executed without loading into context
|
|
80
|
-
- **Note**: Scripts may still need to be read by Claude for patching or environment-specific adjustments
|
|
112
|
+
#### Principle of Lack of Surprise
|
|
81
113
|
|
|
82
|
-
|
|
114
|
+
This goes without saying, but skills must not contain malware, exploit code, or any content that could compromise system security. A skill's contents should not surprise the user in their intent if described. Don't go along with requests to create misleading skills or skills designed to facilitate unauthorized access, data exfiltration, or other malicious activities. Things like a "roleplay as an XYZ" are OK though.
|
|
83
115
|
|
|
84
|
-
|
|
116
|
+
#### Writing Patterns
|
|
85
117
|
|
|
86
|
-
|
|
87
|
-
- **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications
|
|
88
|
-
- **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides
|
|
89
|
-
- **Benefits**: Keeps SKILL.md lean, loaded only when Claude determines it's needed
|
|
90
|
-
- **Best practice**: If files are large (>10k words), include grep search patterns in SKILL.md
|
|
91
|
-
- **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.
|
|
118
|
+
Prefer using the imperative form in instructions.
|
|
92
119
|
|
|
93
|
-
|
|
120
|
+
**Defining output formats** - You can do it like this:
|
|
121
|
+
```markdown
|
|
122
|
+
## Report structure
|
|
123
|
+
ALWAYS use this exact template:
|
|
124
|
+
# [Title]
|
|
125
|
+
## Executive summary
|
|
126
|
+
## Key findings
|
|
127
|
+
## Recommendations
|
|
128
|
+
```
|
|
94
129
|
|
|
95
|
-
|
|
130
|
+
**Examples pattern** - It's useful to include examples. You can format them like this (but if "Input" and "Output" are in the examples you might want to deviate a little):
|
|
131
|
+
```markdown
|
|
132
|
+
## Commit message format
|
|
133
|
+
**Example 1:**
|
|
134
|
+
Input: Added user authentication with JWT tokens
|
|
135
|
+
Output: feat(auth): implement JWT-based authentication
|
|
136
|
+
```
|
|
96
137
|
|
|
97
|
-
|
|
98
|
-
- **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography
|
|
99
|
-
- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified
|
|
100
|
-
- **Benefits**: Separates output resources from documentation, enables Claude to use files without loading them into context
|
|
138
|
+
### Writing Style
|
|
101
139
|
|
|
102
|
-
|
|
140
|
+
Try to explain to the model why things are important in lieu of heavy-handed musty MUSTs. Use theory of mind and try to make the skill general and not super-narrow to specific examples. Start by writing a draft and then look at it with fresh eyes and improve it.
|
|
103
141
|
|
|
104
|
-
|
|
142
|
+
### Test Cases
|
|
105
143
|
|
|
106
|
-
-
|
|
107
|
-
- INSTALLATION_GUIDE.md
|
|
108
|
-
- QUICK_REFERENCE.md
|
|
109
|
-
- CHANGELOG.md
|
|
110
|
-
- etc.
|
|
144
|
+
After writing the skill draft, come up with 2-3 realistic test prompts — the kind of thing a real user would actually say. Share them with the user: [you don't have to use this exact language] "Here are a few test cases I'd like to try. Do these look right, or do you want to add more?" Then run them.
|
|
111
145
|
|
|
112
|
-
|
|
146
|
+
Save test cases to `evals/evals.json`. Don't write assertions yet — just the prompts. You'll draft assertions in the next step while the runs are in progress.
|
|
113
147
|
|
|
114
|
-
|
|
148
|
+
```json
|
|
149
|
+
{
|
|
150
|
+
"skill_name": "example-skill",
|
|
151
|
+
"evals": [
|
|
152
|
+
{
|
|
153
|
+
"id": 1,
|
|
154
|
+
"prompt": "User's task prompt",
|
|
155
|
+
"expected_output": "Description of expected result",
|
|
156
|
+
"files": []
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
```
|
|
115
161
|
|
|
116
|
-
|
|
162
|
+
See `references/schemas.md` for the full schema (including the `assertions` field, which you'll add later).
|
|
117
163
|
|
|
118
|
-
|
|
119
|
-
2. **SKILL.md body** - When skill triggers (<5k words)
|
|
120
|
-
3. **Bundled resources** - As needed by Claude (Unlimited because scripts can be executed without reading into context window)
|
|
164
|
+
## Running and evaluating test cases
|
|
121
165
|
|
|
122
|
-
|
|
166
|
+
This section is one continuous sequence — don't stop partway through. Do NOT use `/skill-test` or any other testing skill.
|
|
123
167
|
|
|
124
|
-
|
|
168
|
+
Put results in `<skill-name>-workspace/` as a sibling to the skill directory. Within the workspace, organize results by iteration (`iteration-1/`, `iteration-2/`, etc.) and within that, each test case gets a directory (`eval-0/`, `eval-1/`, etc.). Don't create all of this upfront — just create directories as you go.
|
|
125
169
|
|
|
126
|
-
|
|
170
|
+
### Step 1: Spawn all runs (with-skill AND baseline) in the same turn
|
|
127
171
|
|
|
128
|
-
|
|
172
|
+
For each test case, spawn two subagents in the same turn — one with the skill, one without. This is important: don't spawn the with-skill runs first and then come back for baselines later. Launch everything at once so it all finishes around the same time.
|
|
129
173
|
|
|
130
|
-
|
|
131
|
-
# PDF Processing
|
|
174
|
+
**With-skill run:**
|
|
132
175
|
|
|
133
|
-
|
|
176
|
+
```
|
|
177
|
+
Execute this task:
|
|
178
|
+
- Skill path: <path-to-skill>
|
|
179
|
+
- Task: <eval prompt>
|
|
180
|
+
- Input files: <eval files if any, or "none">
|
|
181
|
+
- Save outputs to: <workspace>/iteration-<N>/eval-<ID>/with_skill/outputs/
|
|
182
|
+
- Outputs to save: <what the user cares about — e.g., "the .docx file", "the final CSV">
|
|
183
|
+
```
|
|
134
184
|
|
|
135
|
-
|
|
136
|
-
|
|
185
|
+
**Baseline run** (same prompt, but the baseline depends on context):
|
|
186
|
+
- **Creating a new skill**: no skill at all. Same prompt, no skill path, save to `without_skill/outputs/`.
|
|
187
|
+
- **Improving an existing skill**: the old version. Before editing, snapshot the skill (`cp -r <skill-path> <workspace>/skill-snapshot/`), then point the baseline subagent at the snapshot. Save to `old_skill/outputs/`.
|
|
137
188
|
|
|
138
|
-
|
|
189
|
+
Write an `eval_metadata.json` for each test case (assertions can be empty for now). Give each eval a descriptive name based on what it's testing — not just "eval-0". Use this name for the directory too. If this iteration uses new or modified eval prompts, create these files for each new eval directory — don't assume they carry over from previous iterations.
|
|
139
190
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
191
|
+
```json
|
|
192
|
+
{
|
|
193
|
+
"eval_id": 0,
|
|
194
|
+
"eval_name": "descriptive-name-here",
|
|
195
|
+
"prompt": "The user's task prompt",
|
|
196
|
+
"assertions": []
|
|
197
|
+
}
|
|
143
198
|
```
|
|
144
199
|
|
|
145
|
-
|
|
200
|
+
### Step 2: While runs are in progress, draft assertions
|
|
146
201
|
|
|
147
|
-
|
|
202
|
+
Don't just wait for the runs to finish — you can use this time productively. Draft quantitative assertions for each test case and explain them to the user. If assertions already exist in `evals/evals.json`, review them and explain what they check.
|
|
148
203
|
|
|
149
|
-
|
|
204
|
+
Good assertions are objectively verifiable and have descriptive names — they should read clearly in the benchmark viewer so someone glancing at the results immediately understands what each one checks. Subjective skills (writing style, design quality) are better evaluated qualitatively — don't force assertions onto things that need human judgment.
|
|
150
205
|
|
|
151
|
-
|
|
152
|
-
bigquery-skill/
|
|
153
|
-
├── SKILL.md (overview and navigation)
|
|
154
|
-
└── reference/
|
|
155
|
-
├── finance.md (revenue, billing metrics)
|
|
156
|
-
├── sales.md (opportunities, pipeline)
|
|
157
|
-
├── product.md (API usage, features)
|
|
158
|
-
└── marketing.md (campaigns, attribution)
|
|
159
|
-
```
|
|
206
|
+
Update the `eval_metadata.json` files and `evals/evals.json` with the assertions once drafted. Also explain to the user what they'll see in the viewer — both the qualitative outputs and the quantitative benchmark.
|
|
160
207
|
|
|
161
|
-
|
|
208
|
+
### Step 3: As runs complete, capture timing data
|
|
162
209
|
|
|
163
|
-
|
|
210
|
+
When each subagent task completes, you receive a notification containing `total_tokens` and `duration_ms`. Save this data immediately to `timing.json` in the run directory:
|
|
164
211
|
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
└── azure.md (Azure deployment patterns)
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"total_tokens": 84852,
|
|
215
|
+
"duration_ms": 23332,
|
|
216
|
+
"total_duration_seconds": 23.3
|
|
217
|
+
}
|
|
172
218
|
```
|
|
173
219
|
|
|
174
|
-
|
|
220
|
+
This is the only opportunity to capture this data — it comes through the task notification and isn't persisted elsewhere. Process each notification as it arrives rather than trying to batch them.
|
|
175
221
|
|
|
176
|
-
|
|
222
|
+
### Step 4: Grade, aggregate, and launch the viewer
|
|
177
223
|
|
|
178
|
-
|
|
224
|
+
Once all runs are done:
|
|
179
225
|
|
|
180
|
-
|
|
181
|
-
# DOCX Processing
|
|
226
|
+
1. **Grade each run** — spawn a grader subagent (or grade inline) that reads `agents/grader.md` and evaluates each assertion against the outputs. Save results to `grading.json` in each run directory. The grading.json expectations array must use the fields `text`, `passed`, and `evidence` (not `name`/`met`/`details` or other variants) — the viewer depends on these exact field names. For assertions that can be checked programmatically, write and run a script rather than eyeballing it — scripts are faster, more reliable, and can be reused across iterations.
|
|
182
227
|
|
|
183
|
-
|
|
228
|
+
2. **Aggregate into benchmark** — run the aggregation script from the skill-creator directory:
|
|
229
|
+
```bash
|
|
230
|
+
python -m scripts.aggregate_benchmark <workspace>/iteration-N --skill-name <name>
|
|
231
|
+
```
|
|
232
|
+
This produces `benchmark.json` and `benchmark.md` with pass_rate, time, and tokens for each configuration, with mean ± stddev and the delta. If generating benchmark.json manually, see `references/schemas.md` for the exact schema the viewer expects.
|
|
233
|
+
Put each with_skill version before its baseline counterpart.
|
|
184
234
|
|
|
185
|
-
|
|
235
|
+
3. **Do an analyst pass** — read the benchmark data and surface patterns the aggregate stats might hide. See `agents/analyzer.md` (the "Analyzing Benchmark Results" section) for what to look for — things like assertions that always pass regardless of skill (non-discriminating), high-variance evals (possibly flaky), and time/token tradeoffs.
|
|
186
236
|
|
|
187
|
-
|
|
237
|
+
4. **Launch the viewer** with both qualitative outputs and quantitative data:
|
|
238
|
+
```bash
|
|
239
|
+
nohup python <skill-creator-path>/eval-viewer/generate_review.py \
|
|
240
|
+
<workspace>/iteration-N \
|
|
241
|
+
--skill-name "my-skill" \
|
|
242
|
+
--benchmark <workspace>/iteration-N/benchmark.json \
|
|
243
|
+
> /dev/null 2>&1 &
|
|
244
|
+
VIEWER_PID=$!
|
|
245
|
+
```
|
|
246
|
+
For iteration 2+, also pass `--previous-workspace <workspace>/iteration-<N-1>`.
|
|
188
247
|
|
|
189
|
-
|
|
248
|
+
**Cowork / headless environments:** If `webbrowser.open()` is not available or the environment has no display, use `--static <output_path>` to write a standalone HTML file instead of starting a server. Feedback will be downloaded as a `feedback.json` file when the user clicks "Submit All Reviews". After download, copy `feedback.json` into the workspace directory for the next iteration to pick up.
|
|
190
249
|
|
|
191
|
-
|
|
192
|
-
**For OOXML details**: See [OOXML.md](OOXML.md)
|
|
193
|
-
```
|
|
250
|
+
Note: please use generate_review.py to create the viewer; there's no need to write custom HTML.
|
|
194
251
|
|
|
195
|
-
|
|
252
|
+
5. **Tell the user** something like: "I've opened the results in your browser. There are two tabs — 'Outputs' lets you click through each test case and leave feedback, 'Benchmark' shows the quantitative comparison. When you're done, come back here and let me know."
|
|
196
253
|
|
|
197
|
-
|
|
254
|
+
### What the user sees in the viewer
|
|
198
255
|
|
|
199
|
-
|
|
200
|
-
- **
|
|
256
|
+
The "Outputs" tab shows one test case at a time:
|
|
257
|
+
- **Prompt**: the task that was given
|
|
258
|
+
- **Output**: the files the skill produced, rendered inline where possible
|
|
259
|
+
- **Previous Output** (iteration 2+): collapsed section showing last iteration's output
|
|
260
|
+
- **Formal Grades** (if grading was run): collapsed section showing assertion pass/fail
|
|
261
|
+
- **Feedback**: a textbox that auto-saves as they type
|
|
262
|
+
- **Previous Feedback** (iteration 2+): their comments from last time, shown below the textbox
|
|
201
263
|
|
|
202
|
-
|
|
264
|
+
The "Benchmark" tab shows the stats summary: pass rates, timing, and token usage for each configuration, with per-eval breakdowns and analyst observations.
|
|
203
265
|
|
|
204
|
-
|
|
266
|
+
Navigation is via prev/next buttons or arrow keys. When done, they click "Submit All Reviews" which saves all feedback to `feedback.json`.
|
|
205
267
|
|
|
206
|
-
|
|
207
|
-
2. Plan reusable skill contents (scripts, references, assets)
|
|
208
|
-
3. Initialize the skill (run init_skill.py)
|
|
209
|
-
4. Edit the skill (implement resources and write SKILL.md)
|
|
210
|
-
5. Package the skill (run package_skill.py)
|
|
211
|
-
6. Iterate based on real usage
|
|
268
|
+
### Step 5: Read the feedback
|
|
212
269
|
|
|
213
|
-
|
|
270
|
+
When the user tells you they're done, read `feedback.json`:
|
|
214
271
|
|
|
215
|
-
|
|
272
|
+
```json
|
|
273
|
+
{
|
|
274
|
+
"reviews": [
|
|
275
|
+
{"run_id": "eval-0-with_skill", "feedback": "the chart is missing axis labels", "timestamp": "..."},
|
|
276
|
+
{"run_id": "eval-1-with_skill", "feedback": "", "timestamp": "..."},
|
|
277
|
+
{"run_id": "eval-2-with_skill", "feedback": "perfect, love this", "timestamp": "..."}
|
|
278
|
+
],
|
|
279
|
+
"status": "complete"
|
|
280
|
+
}
|
|
281
|
+
```
|
|
216
282
|
|
|
217
|
-
|
|
283
|
+
Empty feedback means the user thought it was fine. Focus your improvements on the test cases where the user had specific complaints.
|
|
218
284
|
|
|
219
|
-
|
|
285
|
+
Kill the viewer server when you're done with it:
|
|
220
286
|
|
|
221
|
-
|
|
287
|
+
```bash
|
|
288
|
+
kill $VIEWER_PID 2>/dev/null
|
|
289
|
+
```
|
|
222
290
|
|
|
223
|
-
|
|
224
|
-
- "Can you give some examples of how this skill would be used?"
|
|
225
|
-
- "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?"
|
|
226
|
-
- "What would a user say that should trigger this skill?"
|
|
291
|
+
---
|
|
227
292
|
|
|
228
|
-
|
|
293
|
+
## Improving the skill
|
|
229
294
|
|
|
230
|
-
|
|
295
|
+
This is the heart of the loop. You've run the test cases, the user has reviewed the results, and now you need to make the skill better based on their feedback.
|
|
231
296
|
|
|
232
|
-
###
|
|
297
|
+
### How to think about improvements
|
|
233
298
|
|
|
234
|
-
|
|
299
|
+
1. **Generalize from the feedback.** The big picture thing that's happening here is that we're trying to create skills that can be used a million times (maybe literally, maybe even more who knows) across many different prompts. Here you and the user are iterating on only a few examples over and over again because it helps move faster. The user knows these examples in and out and it's quick for them to assess new outputs. But if the skill you and the user are codeveloping works only for those examples, it's useless. Rather than put in fiddly overfitty changes, or oppressively constrictive MUSTs, if there's some stubborn issue, you might try branching out and using different metaphors, or recommending different patterns of working. It's relatively cheap to try and maybe you'll land on something great.
|
|
235
300
|
|
|
236
|
-
|
|
237
|
-
2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
|
|
301
|
+
2. **Keep the prompt lean.** Remove things that aren't pulling their weight. Make sure to read the transcripts, not just the final outputs — if it looks like the skill is making the model waste a bunch of time doing things that are unproductive, you can try getting rid of the parts of the skill that are making it do that and seeing what happens.
|
|
238
302
|
|
|
239
|
-
|
|
303
|
+
3. **Explain the why.** Try hard to explain the **why** behind everything you're asking the model to do. Today's LLMs are *smart*. They have good theory of mind and when given a good harness can go beyond rote instructions and really make things happen. Even if the feedback from the user is terse or frustrated, try to actually understand the task and why the user is writing what they wrote, and what they actually wrote, and then transmit this understanding into the instructions. If you find yourself writing ALWAYS or NEVER in all caps, or using super rigid structures, that's a yellow flag — if possible, reframe and explain the reasoning so that the model understands why the thing you're asking for is important. That's a more humane, powerful, and effective approach.
|
|
240
304
|
|
|
241
|
-
|
|
242
|
-
2. A `scripts/rotate_pdf.py` script would be helpful to store in the skill
|
|
305
|
+
4. **Look for repeated work across test cases.** Read the transcripts from the test runs and notice if the subagents all independently wrote similar helper scripts or took the same multi-step approach to something. If all 3 test cases resulted in the subagent writing a `create_docx.py` or a `build_chart.py`, that's a strong signal the skill should bundle that script. Write it once, put it in `scripts/`, and tell the skill to use it. This saves every future invocation from reinventing the wheel.
|
|
243
306
|
|
|
244
|
-
|
|
307
|
+
This task is pretty important (we are trying to create billions a year in economic value here!) and your thinking time is not the blocker; take your time and really mull things over. I'd suggest writing a draft revision and then looking at it anew and making improvements. Really do your best to get into the head of the user and understand what they want and need.
|
|
245
308
|
|
|
246
|
-
|
|
247
|
-
2. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill
|
|
309
|
+
### The iteration loop
|
|
248
310
|
|
|
249
|
-
|
|
311
|
+
After improving the skill:
|
|
250
312
|
|
|
251
|
-
1.
|
|
252
|
-
2.
|
|
313
|
+
1. Apply your improvements to the skill
|
|
314
|
+
2. Rerun all test cases into a new `iteration-<N+1>/` directory, including baseline runs. If you're creating a new skill, the baseline is always `without_skill` (no skill) — that stays the same across iterations. If you're improving an existing skill, use your judgment on what makes sense as the baseline: the original version the user came in with, or the previous iteration.
|
|
315
|
+
3. Launch the reviewer with `--previous-workspace` pointing at the previous iteration
|
|
316
|
+
4. Wait for the user to review and tell you they're done
|
|
317
|
+
5. Read the new feedback, improve again, repeat
|
|
253
318
|
|
|
254
|
-
|
|
319
|
+
Keep going until:
|
|
320
|
+
- The user says they're happy
|
|
321
|
+
- The feedback is all empty (everything looks good)
|
|
322
|
+
- You're not making meaningful progress
|
|
255
323
|
|
|
256
|
-
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## Advanced: Blind comparison
|
|
257
327
|
|
|
258
|
-
|
|
328
|
+
For situations where you want a more rigorous comparison between two versions of a skill (e.g., the user asks "is the new version actually better?"), there's a blind comparison system. Read `agents/comparator.md` and `agents/analyzer.md` for the details. The basic idea is: give two outputs to an independent agent without telling it which is which, and let it judge quality. Then analyze why the winner won.
|
|
259
329
|
|
|
260
|
-
|
|
330
|
+
This is optional, requires subagents, and most users won't need it. The human review loop is usually sufficient.
|
|
261
331
|
|
|
262
|
-
|
|
332
|
+
---
|
|
263
333
|
|
|
264
|
-
|
|
334
|
+
## Description Optimization
|
|
265
335
|
|
|
266
|
-
|
|
267
|
-
|
|
336
|
+
The description field in SKILL.md frontmatter is the primary mechanism that determines whether Claude invokes a skill. After creating or improving a skill, offer to optimize the description for better triggering accuracy.
|
|
337
|
+
|
|
338
|
+
### Step 1: Generate trigger eval queries
|
|
339
|
+
|
|
340
|
+
Create 20 eval queries — a mix of should-trigger and should-not-trigger. Save as JSON:
|
|
341
|
+
|
|
342
|
+
```json
|
|
343
|
+
[
|
|
344
|
+
{"query": "the user prompt", "should_trigger": true},
|
|
345
|
+
{"query": "another prompt", "should_trigger": false}
|
|
346
|
+
]
|
|
268
347
|
```
|
|
269
348
|
|
|
270
|
-
The
|
|
349
|
+
The queries must be realistic and something a Claude Code or Claude.ai user would actually type. Not abstract requests, but requests that are concrete and specific and have a good amount of detail. For instance, file paths, personal context about the user's job or situation, column names and values, company names, URLs. A little bit of backstory. Some might be in lowercase or contain abbreviations or typos or casual speech. Use a mix of different lengths, and focus on edge cases rather than making them clear-cut (the user will get a chance to sign off on them).
|
|
350
|
+
|
|
351
|
+
Bad: `"Format this data"`, `"Extract text from PDF"`, `"Create a chart"`
|
|
271
352
|
|
|
272
|
-
|
|
273
|
-
- Generates a SKILL.md template with proper frontmatter and TODO placeholders
|
|
274
|
-
- Creates example resource directories: `scripts/`, `references/`, and `assets/`
|
|
275
|
-
- Adds example files in each directory that can be customized or deleted
|
|
353
|
+
Good: `"ok so my boss just sent me this xlsx file (its in my downloads, called something like 'Q4 sales final FINAL v2.xlsx') and she wants me to add a column that shows the profit margin as a percentage. The revenue is in column C and costs are in column D i think"`
|
|
276
354
|
|
|
277
|
-
|
|
355
|
+
For the **should-trigger** queries (8-10), think about coverage. You want different phrasings of the same intent — some formal, some casual. Include cases where the user doesn't explicitly name the skill or file type but clearly needs it. Throw in some uncommon use cases and cases where this skill competes with another but should win.
|
|
278
356
|
|
|
279
|
-
|
|
357
|
+
For the **should-not-trigger** queries (8-10), the most valuable ones are the near-misses — queries that share keywords or concepts with the skill but actually need something different. Think adjacent domains, ambiguous phrasing where a naive keyword match would trigger but shouldn't, and cases where the query touches on something the skill does but in a context where another tool is more appropriate.
|
|
280
358
|
|
|
281
|
-
|
|
359
|
+
The key thing to avoid: don't make should-not-trigger queries obviously irrelevant. "Write a fibonacci function" as a negative test for a PDF skill is too easy — it doesn't test anything. The negative cases should be genuinely tricky.
|
|
282
360
|
|
|
283
|
-
|
|
361
|
+
### Step 2: Review with user
|
|
284
362
|
|
|
285
|
-
|
|
363
|
+
Present the eval set to the user for review using the HTML template:
|
|
286
364
|
|
|
287
|
-
|
|
288
|
-
|
|
365
|
+
1. Read the template from `assets/eval_review.html`
|
|
366
|
+
2. Replace the placeholders:
|
|
367
|
+
- `__EVAL_DATA_PLACEHOLDER__` → the JSON array of eval items (no quotes around it — it's a JS variable assignment)
|
|
368
|
+
- `__SKILL_NAME_PLACEHOLDER__` → the skill's name
|
|
369
|
+
- `__SKILL_DESCRIPTION_PLACEHOLDER__` → the skill's current description
|
|
370
|
+
3. Write to a temp file (e.g., `/tmp/eval_review_<skill-name>.html`) and open it: `open /tmp/eval_review_<skill-name>.html`
|
|
371
|
+
4. The user can edit queries, toggle should-trigger, add/remove entries, then click "Export Eval Set"
|
|
372
|
+
5. The file downloads to `~/Downloads/eval_set.json` — check the Downloads folder for the most recent version in case there are multiple (e.g., `eval_set (1).json`)
|
|
289
373
|
|
|
290
|
-
|
|
374
|
+
This step matters — bad eval queries lead to bad descriptions.
|
|
291
375
|
|
|
292
|
-
|
|
376
|
+
### Step 3: Run the optimization loop
|
|
293
377
|
|
|
294
|
-
|
|
378
|
+
Tell the user: "This will take some time — I'll run the optimization loop in the background and check on it periodically."
|
|
295
379
|
|
|
296
|
-
|
|
380
|
+
Save the eval set to the workspace, then run in the background:
|
|
297
381
|
|
|
298
|
-
|
|
382
|
+
```bash
|
|
383
|
+
python -m scripts.run_loop \
|
|
384
|
+
--eval-set <path-to-trigger-eval.json> \
|
|
385
|
+
--skill-path <path-to-skill> \
|
|
386
|
+
--model <model-id-powering-this-session> \
|
|
387
|
+
--max-iterations 5 \
|
|
388
|
+
--verbose
|
|
389
|
+
```
|
|
299
390
|
|
|
300
|
-
|
|
391
|
+
Use the model ID from your system prompt (the one powering the current session) so the triggering test matches what the user actually experiences.
|
|
301
392
|
|
|
302
|
-
|
|
393
|
+
While it runs, periodically tail the output to give the user updates on which iteration it's on and what the scores look like.
|
|
303
394
|
|
|
304
|
-
|
|
395
|
+
This handles the full optimization loop automatically. It splits the eval set into 60% train and 40% held-out test, evaluates the current description (running each query 3 times to get a reliable trigger rate), then calls Claude with extended thinking to propose improvements based on what failed. It re-evaluates each new description on both train and test, iterating up to 5 times. When it's done, it opens an HTML report in the browser showing the results per iteration and returns JSON with `best_description` — selected by test score rather than train score to avoid overfitting.
|
|
305
396
|
|
|
306
|
-
|
|
397
|
+
### How skill triggering works
|
|
307
398
|
|
|
308
|
-
|
|
309
|
-
- `description`: This is the primary triggering mechanism for your skill, and helps Claude understand when to use the skill.
|
|
310
|
-
- Include both what the Skill does and specific triggers/contexts for when to use it.
|
|
311
|
-
- Include all "when to use" information here - Not in the body. The body is only loaded after triggering, so "When to Use This Skill" sections in the body are not helpful to Claude.
|
|
312
|
-
- Example description for a `docx` skill: "Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. Use when Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks"
|
|
399
|
+
Understanding the triggering mechanism helps design better eval queries. Skills appear in Claude's `available_skills` list with their name + description, and Claude decides whether to consult a skill based on that description. The important thing to know is that Claude only consults skills for tasks it can't easily handle on its own — simple, one-step queries like "read this PDF" may not trigger a skill even if the description matches perfectly, because Claude can handle them directly with basic tools. Complex, multi-step, or specialized queries reliably trigger skills when the description matches.
|
|
313
400
|
|
|
314
|
-
|
|
401
|
+
This means your eval queries should be substantive enough that Claude would actually benefit from consulting a skill. Simple queries like "read file X" are poor test cases — they won't trigger skills regardless of description quality.
|
|
315
402
|
|
|
316
|
-
|
|
403
|
+
### Step 4: Apply the result
|
|
317
404
|
|
|
318
|
-
|
|
405
|
+
Take `best_description` from the JSON output and update the skill's SKILL.md frontmatter. Show the user before/after and report the scores.
|
|
406
|
+
|
|
407
|
+
---
|
|
319
408
|
|
|
320
|
-
###
|
|
409
|
+
### Package and Present (only if `present_files` tool is available)
|
|
321
410
|
|
|
322
|
-
|
|
411
|
+
Check whether you have access to the `present_files` tool. If you don't, skip this step. If you do, package the skill and present the .skill file to the user:
|
|
323
412
|
|
|
324
413
|
```bash
|
|
325
|
-
scripts
|
|
414
|
+
python -m scripts.package_skill <path/to/skill-folder>
|
|
326
415
|
```
|
|
327
416
|
|
|
328
|
-
|
|
417
|
+
After packaging, direct the user to the resulting `.skill` file path so they can install it.
|
|
329
418
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
419
|
+
---
|
|
420
|
+
|
|
421
|
+
## Claude.ai-specific instructions
|
|
333
422
|
|
|
334
|
-
|
|
423
|
+
In Claude.ai, the core workflow is the same (draft → test → review → improve → repeat), but because Claude.ai doesn't have subagents, some mechanics change. Here's what to adapt:
|
|
335
424
|
|
|
336
|
-
|
|
425
|
+
**Running test cases**: No subagents means no parallel execution. For each test case, read the skill's SKILL.md, then follow its instructions to accomplish the test prompt yourself. Do them one at a time. This is less rigorous than independent subagents (you wrote the skill and you're also running it, so you have full context), but it's a useful sanity check — and the human review step compensates. Skip the baseline runs — just use the skill to complete the task as requested.
|
|
337
426
|
|
|
338
|
-
|
|
339
|
-
- Skill naming conventions and directory structure
|
|
340
|
-
- Description completeness and quality
|
|
341
|
-
- File organization and resource references
|
|
427
|
+
**Reviewing results**: If you can't open a browser (e.g., Claude.ai's VM has no display, or you're on a remote server), skip the browser reviewer entirely. Instead, present results directly in the conversation. For each test case, show the prompt and the output. If the output is a file the user needs to see (like a .docx or .xlsx), save it to the filesystem and tell them where it is so they can download and inspect it. Ask for feedback inline: "How does this look? Anything you'd change?"
|
|
342
428
|
|
|
343
|
-
|
|
429
|
+
**Benchmarking**: Skip the quantitative benchmarking — it relies on baseline comparisons which aren't meaningful without subagents. Focus on qualitative feedback from the user.
|
|
344
430
|
|
|
345
|
-
|
|
431
|
+
**The iteration loop**: Same as before — improve the skill, rerun the test cases, ask for feedback — just without the browser reviewer in the middle. You can still organize results into iteration directories on the filesystem if you have one.
|
|
432
|
+
|
|
433
|
+
**Description optimization**: This section requires the `claude` CLI tool (specifically `claude -p`) which is only available in Claude Code. Skip it if you're on Claude.ai.
|
|
434
|
+
|
|
435
|
+
**Blind comparison**: Requires subagents. Skip it.
|
|
436
|
+
|
|
437
|
+
**Packaging**: The `package_skill.py` script works anywhere with Python and a filesystem. On Claude.ai, you can run it and the user can download the resulting `.skill` file.
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## Cowork-Specific Instructions
|
|
442
|
+
|
|
443
|
+
If you're in Cowork, the main things to know are:
|
|
444
|
+
|
|
445
|
+
- You have subagents, so the main workflow (spawn test cases in parallel, run baselines, grade, etc.) all works. (However, if you run into severe problems with timeouts, it's OK to run the test prompts in series rather than parallel.)
|
|
446
|
+
- You don't have a browser or display, so when generating the eval viewer, use `--static <output_path>` to write a standalone HTML file instead of starting a server. Then proffer a link that the user can click to open the HTML in their browser.
|
|
447
|
+
- For whatever reason, the Cowork setup seems to disincline Claude from generating the eval viewer after running the tests, so just to reiterate: whether you're in Cowork or in Claude Code, after running tests, you should always generate the eval viewer for the human to look at examples before revising the skill yourself and trying to make corrections, using `generate_review.py` (not writing your own boutique html code). Sorry in advance but I'm gonna go all caps here: GENERATE THE EVAL VIEWER *BEFORE* evaluating inputs yourself. You want to get them in front of the human ASAP!
|
|
448
|
+
- Feedback works differently: since there's no running server, the viewer's "Submit All Reviews" button will download `feedback.json` as a file. You can then read it from there (you may have to request access first).
|
|
449
|
+
- Packaging works — `package_skill.py` just needs Python and a filesystem.
|
|
450
|
+
- Description optimization (`run_loop.py` / `run_eval.py`) should work in Cowork just fine since it uses `claude -p` via subprocess, not a browser, but please save it until you've fully finished making the skill and the user agrees it's in good shape.
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
## Reference files
|
|
455
|
+
|
|
456
|
+
The agents/ directory contains instructions for specialized subagents. Read them when you need to spawn the relevant subagent.
|
|
457
|
+
|
|
458
|
+
- `agents/grader.md` — How to evaluate assertions against outputs
|
|
459
|
+
- `agents/comparator.md` — How to do blind A/B comparison between two outputs
|
|
460
|
+
- `agents/analyzer.md` — How to analyze why one version beat another
|
|
461
|
+
|
|
462
|
+
The references/ directory has additional documentation:
|
|
463
|
+
- `references/schemas.md` — JSON structures for evals.json, grading.json, etc.
|
|
464
|
+
|
|
465
|
+
---
|
|
346
466
|
|
|
347
|
-
|
|
467
|
+
Repeating one more time the core loop here for emphasis:
|
|
348
468
|
|
|
349
|
-
|
|
469
|
+
- Figure out what the skill is about
|
|
470
|
+
- Draft or edit the skill
|
|
471
|
+
- Run claude-with-access-to-the-skill on test prompts
|
|
472
|
+
- With the user, evaluate the outputs:
|
|
473
|
+
- Create benchmark.json and run `eval-viewer/generate_review.py` to help the user review them
|
|
474
|
+
- Run quantitative evals
|
|
475
|
+
- Repeat until you and the user are satisfied
|
|
476
|
+
- Package the final skill and return it to the user.
|
|
350
477
|
|
|
351
|
-
|
|
478
|
+
Please add steps to your TodoList, if you have such a thing, to make sure you don't forget. If you're in Cowork, please specifically put "Create evals JSON and run `eval-viewer/generate_review.py` so human can review test cases" in your TodoList to make sure it happens.
|
|
352
479
|
|
|
353
|
-
|
|
354
|
-
2. Notice struggles or inefficiencies
|
|
355
|
-
3. Identify how SKILL.md or bundled resources should be updated
|
|
356
|
-
4. Implement changes and test again
|
|
480
|
+
Good luck!
|