@buaa_smat/hometrans 0.1.7 → 0.1.8

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.
@@ -1,138 +0,0 @@
1
- ---
2
- name: skill-quality-evaluator
3
- description: Evaluate the quality of an Agent Skill across multiple dimensions — specification compliance, progressive disclosure, content efficiency, instruction quality, description effectiveness, script quality, and evaluability. Use this skill when the user wants to assess, review, score, or audit a skill, check if a skill follows best practices, get a quality report for a skill, or understand what improvements a skill needs. Triggers on phrases like "evaluate this skill", "review my skill", "skill quality check", "audit SKILL.md", "how good is this skill", "assess skill quality", "评分", "评估skill", "检查skill质量".
4
- ---
5
-
6
- # Skill Quality Evaluator
7
-
8
- Evaluate a target skill across 7 dimensions, each broken into concrete sub-criteria. The goal is a structured, evidence-based assessment — not a vibe check.
9
-
10
- ## Foundational References
11
-
12
- This skill's evaluation criteria are derived from five authoritative documents bundled in `references/`. Load them when you need deeper context on *why* a criterion matters — especially when the target skill has a borderline score and you need to cite the official guidance.
13
-
14
- | Document | Covers | Most Relevant To |
15
- |----------|--------|------------------|
16
- | `references/Specification.md` | Complete Agent Skills format spec: frontmatter fields, naming rules, directory structure, progressive disclosure design | Dimensions 1, 2 |
17
- | `references/Best-practices-for-skill-creators.md` | How to write well-scoped, calibrated, effective skill instructions — start from real expertise, spend context wisely, calibrate control, patterns (gotchas, templates, checklists, validation loops, plan-validate-execute) | Dimensions 3, 4 |
18
- | `references/Evaluating-skill-output-quality.md` | Test case design, assertions, grading, benchmarking, human review, the iteration loop | Dimension 7 |
19
- | `references/Optimizing-skill-descriptions.md` | How the `description` field drives skill triggering, how to write effective descriptions, trigger eval design, train/validation splits, the optimization loop | Dimension 5 |
20
- | `references/Using-scripts-in-skills.md` | One-off commands, self-contained scripts, designing scripts for agentic use (non-interactive, --help, error messages, structured output) | Dimension 6 |
21
-
22
- The 7-dimension framework below is a synthesis of all five documents. If a criterion feels unclear, open the corresponding document — it contains the rationale and examples.
23
-
24
- ## Bundled Resources
25
-
26
- This skill also includes two reference files and one asset. Load them at the specified points — do not load everything upfront.
27
-
28
- | File | When to Load | What It Contains |
29
- |------|-------------|------------------|
30
- | `references/scoring-rubric.md` | **Before assigning scores** (after reading the target skill and collecting evidence) | 1-5 scale anchors for every sub-criterion, dimension weight table, and overall score interpretation ranges. Use these anchors to map evidence to scores — never score without consulting this file. |
31
- | `references/report-template.md` | **After all scores are finalized** (when writing the final report) | Exact Markdown template for the output report. Follow its structure precisely so every report is consistent and machine-readable. |
32
- | `assets/SKILL_TEMPLATE.md` | **When the user asks to create a new skill** or wants to see what a well-structured skill looks like, or when the evaluation report recommends a structural rewrite | A SKILL.md template with standard frontmatter plus three extra sections: Input Parameters table, Output Content table, and Preconditions (with failure handling patterns). Use this as the starting point for generating new skills. |
33
-
34
- ## Workflow
35
-
36
- 1. Confirm the skill path from the user. If the user only gave a skill name, search under `./skills/` and `~/.claude/` for it.
37
- 2. Read the target skill's `SKILL.md` fully. Note its directory structure — check for `scripts/`, `references/`, `assets/`, `evals/`.
38
- 3. Read the 7 dimension checklists below to know what evidence to collect. Scan the target skill's auxiliary files (`scripts/`, `references/`, `evals/`) if they exist.
39
- 4. **Load `references/scoring-rubric.md`**, then assign a 1-5 score per sub-criterion using the scale anchors.
40
- 5. Compute dimension averages and the overall weighted score.
41
- 6. **Load `references/report-template.md`** and write the final report following that exact template.
42
-
43
- ## Dimension 1 — Specification Compliance
44
-
45
- Check the `SKILL.md` frontmatter and directory against the Agent Skills spec.
46
-
47
- | # | Criterion | What to Check |
48
- |---|-----------|---------------|
49
- | 1.1 | Frontmatter validity | YAML parses without errors; `name` and `description` are present |
50
- | 1.2 | Name rules | 1-64 chars, lowercase alphanumeric + hyphens only, no leading/trailing hyphen, no consecutive hyphens, matches parent directory name |
51
- | 1.3 | Description length | 1-1024 characters |
52
- | 1.4 | Directory structure | `SKILL.md` exists at root; optional dirs (`scripts/`, `references/`, `assets/`) used appropriately |
53
- | 1.5 | No broken references | Every file path mentioned in SKILL.md (`references/*.md`, `scripts/*`, `assets/*`) resolves to an existing file. Every reference/script/asset listed in the skill's own resource tables exists on disk. No 404s. |
54
-
55
- ## Dimension 2 — Progressive Disclosure
56
-
57
- Assess whether the skill respects context budgets and loads detail on demand.
58
-
59
- | # | Criterion | What to Check |
60
- |---|-----------|---------------|
61
- | 2.1 | SKILL.md size | Under 500 lines; core instructions only |
62
- | 2.2 | Reference usage | Detailed/exhaustive material moved to `references/` instead of inline; reference files are focused and reasonably sized |
63
- | 2.3 | Load triggers | When referencing auxiliary files, the skill tells the agent *when* to load them (e.g., "if the API returns 4xx, read `references/errors.md`"), not just "see references/" |
64
- | 2.4 | Path conventions | File references use relative paths from skill root; no deeply nested reference chains (one level deep from SKILL.md) |
65
-
66
- ## Dimension 3 — Content Efficiency
67
-
68
- Evaluate whether every token earns its place.
69
-
70
- | # | Criterion | What to Check |
71
- |---|-----------|---------------|
72
- | 3.1 | No generic filler | Does NOT explain concepts the agent already knows (e.g., what a PDF is, how HTTP works). Focuses on what the agent would get wrong without the skill. |
73
- | 3.2 | Coherent scope | The skill encapsulates one coherent unit of work. Not so narrow that multiple skills must chain for basic tasks; not so broad that it's hard to activate precisely. |
74
- | 3.3 | Appropriate detail | Not an exhaustive reference manual, not a vague one-liner. Enough structure to guide without over-constraining. |
75
- | 3.4 | Domain grounding | Contains project-specific, domain-specific, or environment-specific knowledge — not just general best practices the agent already knows. |
76
-
77
- ## Dimension 4 — Instruction Quality
78
-
79
- Assess how well the skill *teaches the agent to approach* the task.
80
-
81
- | # | Criterion | What to Check |
82
- |---|-----------|---------------|
83
- | 4.1 | Calibrated specificity | Flexible where approaches vary, prescriptive where operations are fragile. Not uniformly rigid or uniformly loose. |
84
- | 4.2 | Defaults over menus | When multiple tools/approaches work, picks a clear default with brief mention of alternatives — doesn't present an undifferentiated list of options. |
85
- | 4.3 | Procedural over declarative | Teaches *how to approach* a class of problems, not *what to produce* for a specific instance. The method generalizes. |
86
- | 4.4 | Explains why | Instructions include reasoning where non-obvious ("because X tends to Y"). Not just naked directives. |
87
- | 4.5 | Gotchas | Captures environment-specific corrections — things that defy reasonable assumptions and would cause errors if not stated. |
88
-
89
- ## Dimension 5 — Description Effectiveness
90
-
91
- Evaluate the `description` frontmatter field as a triggering mechanism.
92
-
93
- | # | Criterion | What to Check |
94
- |---|-----------|---------------|
95
- | 5.1 | Imperative framing | Uses "Use this skill when..." or equivalent instructional framing, not passive "This skill does..." |
96
- | 5.2 | Intent-focused | Describes what the user is trying to achieve, not the skill's internal mechanics. |
97
- | 5.3 | Trigger coverage | Lists specific contexts and trigger phrases. Pushy enough — includes cases where the user doesn't name the domain explicitly. |
98
- | 5.4 | Conciseness | Long enough to cover scope, short enough not to bloat context. Under the 1024-char hard limit. |
99
- | 5.5 | Keyword specificity | Contains concrete keywords that disambiguate from adjacent skills. Would match relevant prompts and not match irrelevant ones. |
100
-
101
- ## Dimension 6 — Script Quality
102
-
103
- Skip this dimension entirely if the skill has no `scripts/` directory. Otherwise:
104
-
105
- | # | Criterion | What to Check |
106
- |---|-----------|---------------|
107
- | 6.1 | Self-contained | Dependencies declared inline (PEP 723, package.json, bundler/inline) or clearly documented. |
108
- | 6.2 | Non-interactive | No TTY prompts, password dialogs, or confirmation menus. All input via flags/env/stdin. |
109
- | 6.3 | Help output | `--help` shows usage, flags, and examples. |
110
- | 6.4 | Error messages | Say what went wrong, what was expected, and what to try. Not opaque. |
111
- | 6.5 | Structured output | Prefers JSON/CSV/TSV over free-form text for data; separates diagnostics to stderr. |
112
-
113
- ## Dimension 7 — Evaluability
114
-
115
- Check whether the skill can be systematically tested and improved.
116
-
117
- | # | Criterion | What to Check |
118
- |---|-----------|---------------|
119
- | 7.1 | Test cases exist | Has `evals/evals.json` with at least 2 test cases. |
120
- | 7.2 | Realistic prompts | Test prompts look like real user messages — file paths, personal context, varied formality. Not generic "do X". |
121
- | 7.3 | Verifiable assertions | Assertions are specific, objective, and programmatically checkable where possible. Not vague ("output is good"). |
122
- | 7.4 | Edge case coverage | At least one test covers a boundary condition or ambiguous input. |
123
-
124
- ## Scoring
125
-
126
- Each sub-criterion scores 1-5. The full scale anchors, dimension weights, and score interpretation ranges are in `references/scoring-rubric.md` — you should have already loaded it per the workflow above. After scoring:
127
-
128
- 1. Compute dimension averages (mean of sub-criteria scores in each dimension).
129
- 2. Compute the overall weighted score using the weights table in `references/scoring-rubric.md`. Redistribute N/A dimension weights proportionally.
130
- 3. Identify the top 3 strengths (highest-scoring sub-criteria with most impact) and top 3 improvement areas (lowest-scoring, highest-weight items first).
131
- 4. Write the final report following the template in `references/report-template.md` (loaded per the workflow above).
132
-
133
- ## Important Notes
134
-
135
- - **Evidence is mandatory.** Every score must cite a specific line, pattern, or absence in the skill files. No "feels like a 4."
136
- - **Missing dimensions.** If a dimension is not applicable (e.g., no scripts), mark it N/A and exclude from the overall score.
137
- - **Be constructive.** The goal is to help the skill author improve, not to judge. Frame weaknesses as specific, actionable changes.
138
- - **Read the whole skill.** Scan `scripts/`, `references/`, and `evals/` if they exist — don't judge on SKILL.md alone.
@@ -1,77 +0,0 @@
1
- ---
2
- name: <skill-name>
3
- description: >
4
- <what it does + when to use it. Use imperative framing, focus on user intent.
5
- List trigger phrases. Keep under 1024 chars.>
6
- license: <license-name or bundled license file>
7
- compatibility: <environment requirements — product, system packages, network, etc.>
8
- allowed-tools:
9
- ---
10
-
11
- # <Skill Title> — <One-line summary>
12
-
13
- <Brief overview of what this skill accomplishes — 2-3 sentences.>
14
-
15
- ## Input Parameters
16
- <!--
17
- List every input the skill expects from the user. Use this exact table format.
18
- Mark optional params with "(optional)" in the Variable column.
19
- -->
20
-
21
- | Variable | Required | Meaning | Typical User Phrases / Expected Format |
22
- |----------|----------|---------|----------------------------------------|
23
- | `<param1>` | Yes | <what this parameter represents> | <examples of how users describe it, expected format, fallback sources> |
24
- | `<param2>` | Yes | <what this parameter represents> | <examples of how users describe it, expected format, fallback sources> |
25
- | `<param3>` | No | <what this parameter represents> | <examples, format, default value if omitted> |
26
-
27
- <!-- Extraction rule: if a required param is missing, ask the user — do NOT guess. -->
28
-
29
- ## Output Content
30
- <!--
31
- List every artifact or result this skill produces. Be specific about formats,
32
- locations, and what a successful result looks like.
33
- -->
34
-
35
- | Output | Type | Location / Path | Description |
36
- |--------|------|-----------------|-------------|
37
- | `<output1>` | <file \| directory \| in-message> | `<where it goes>` | <what it contains, format> |
38
- | `<output2>` | <file \| directory \| in-message> | `<where it goes>` | <what it contains, format> |
39
-
40
- ## Preconditions
41
- <!--
42
- Every file, directory, tool, or environment state the skill assumes exists
43
- BEFORE it starts. For each precondition, define the check AND the fallback.
44
- -->
45
-
46
- | # | Precondition | How to Verify | On Failure |
47
- |---|-------------|---------------|------------|
48
- | 1 | `<expected state>` | `<bash command or file check to run>` | `<what to tell the user / what to do — e.g., "ask the user to provide X", "create it automatically by running Y", "abort and tell the user to install Z">` |
49
-
50
- <!--
51
- Failure handling patterns (pick the right one for each precondition):
52
- - **Ask user**: "Parameter X is missing — please provide ..."
53
- - **Auto-create**: "Run scripts/setup.sh to generate ..."
54
- - **Auto-install**: "pip install X" / "npm install X"
55
- - **Abort**: "Cannot proceed — X requires Y. Please ... then retry."
56
- -->
57
-
58
- ---
59
-
60
- ## Workflow
61
- <!--
62
- PATTERN A: Progress Checklist
63
- - [ ] markers let the agent track what's done and what remains.
64
- - After each step: validate the output before checking the box.
65
- - Include the tool/command inside each step so the agent knows what to run.
66
- - Steps with (depends: Step N) must wait — the agent skips them until the
67
- prerequisite step is checked.
68
- -->
69
-
70
- Progress:
71
- - [ ] **Step 1:** <action verb + object> — run `scripts/<name>.py <args>`
72
- - [ ] **Step 2:** <action verb + object> — <tool or command> (depends: Step 1)
73
- - [ ] **Step 3:** <action verb + object> — <tool or command> (depends: Step 2)
74
- - [ ] **Step 4:** Validate — run `scripts/<validate>.py <args>`
75
- - [ ] **Step 5:** Verify output — <final check>
76
-
77
- ---
@@ -1,277 +0,0 @@
1
- > ## Documentation Index
2
- > Fetch the complete documentation index at: https://agentskills.io/llms.txt
3
- > Use this file to discover all available pages before exploring further.
4
-
5
- # Best practices for skill creators
6
-
7
- > How to write skills that are well-scoped and calibrated to the task.
8
-
9
- ## Start from real expertise
10
-
11
- A common pitfall in skill creation is asking an LLM to generate a skill without providing domain-specific context — relying solely on the LLM's general training knowledge. The result is vague, generic procedures ("handle errors appropriately," "follow best practices for authentication") rather than the specific API patterns, edge cases, and project conventions that make a skill valuable.
12
-
13
- Effective skills are grounded in real expertise. The key is feeding domain-specific context into the creation process.
14
-
15
- ### Extract from a hands-on task
16
-
17
- Complete a real task in conversation with an agent, providing context, corrections, and preferences along the way. Then extract the reusable pattern into a skill. Pay attention to:
18
-
19
- * **Steps that worked** — the sequence of actions that led to success
20
- * **Corrections you made** — places where you steered the agent's approach (e.g., "use library X instead of Y," "check for edge case Z")
21
- * **Input/output formats** — what the data looked like going in and coming out
22
- * **Context you provided** — project-specific facts, conventions, or constraints the agent didn't already know
23
-
24
- ### Synthesize from existing project artifacts
25
-
26
- When you have a body of existing knowledge, you can feed it into an LLM and ask it to synthesize a skill. A data-pipeline skill synthesized from your team's actual incident reports and runbooks will outperform one synthesized from a generic "data engineering best practices" article, because it captures *your* schemas, failure modes, and recovery procedures. The key is project-specific material, not generic references.
27
-
28
- Good source material includes:
29
-
30
- * Internal documentation, runbooks, and style guides
31
- * API specifications, schemas, and configuration files
32
- * Code review comments and issue trackers (captures recurring concerns and reviewer expectations)
33
- * Version control history, especially patches and fixes (reveals patterns through what actually changed)
34
- * Real-world failure cases and their resolutions
35
-
36
- ## Refine with real execution
37
-
38
- The first draft of a skill usually needs refinement. Run the skill against real tasks, then feed the results — all of them, not just failures — back into the creation process. Ask: what triggered false positives? What was missed? What could be cut?
39
-
40
- Even a single pass of execute-then-revise noticeably improves quality, and complex domains often benefit from several.
41
-
42
- <Tip>
43
- Read agent execution traces, not just final outputs. If the agent wastes time on unproductive steps, common causes include instructions that are too vague (the agent tries several approaches before finding one that works), instructions that don't apply to the current task (the agent follows them anyway), or too many options presented without a clear default.
44
- </Tip>
45
-
46
- For a more structured approach to iteration, including test cases, assertions, and grading, see [Evaluating skill output quality](/skill-creation/evaluating-skills).
47
-
48
- ## Spending context wisely
49
-
50
- Once a skill activates, its full `SKILL.md` body loads into the agent's context window alongside conversation history, system context, and other active skills. Every token in your skill competes for the agent's attention with everything else in that window.
51
-
52
- ### Add what the agent lacks, omit what it knows
53
-
54
- Focus on what the agent *wouldn't* know without your skill: project-specific conventions, domain-specific procedures, non-obvious edge cases, and the particular tools or APIs to use. You don't need to explain what a PDF is, how HTTP works, or what a database migration does.
55
-
56
- ````markdown theme={null}
57
- <!-- Too verbose — the agent already knows what PDFs are -->
58
- ## Extract PDF text
59
-
60
- PDF (Portable Document Format) files are a common file format that contains
61
- text, images, and other content. To extract text from a PDF, you'll need to
62
- use a library. pdfplumber is recommended because it handles most cases well.
63
-
64
- <!-- Better — jumps straight to what the agent wouldn't know on its own -->
65
- ## Extract PDF text
66
-
67
- Use pdfplumber for text extraction. For scanned documents, fall back to
68
- pdf2image with pytesseract.
69
-
70
- ```python
71
- import pdfplumber
72
-
73
- with pdfplumber.open("file.pdf") as pdf:
74
- text = pdf.pages[0].extract_text()
75
- ```
76
- ````
77
-
78
- Ask yourself about each piece of content: "Would the agent get this wrong without this instruction?" If the answer is no, cut it. If you're unsure, test it. And if the agent already handles the entire task well without the skill, the skill may not be adding value. See [Evaluating skill output quality](/skill-creation/evaluating-skills) for how to test this systematically.
79
-
80
- ### Design coherent units
81
-
82
- Deciding what a skill should cover is like deciding what a function should do: you want it to encapsulate a coherent unit of work that composes well with other skills. Skills scoped too narrowly force multiple skills to load for a single task, risking overhead and conflicting instructions. Skills scoped too broadly become hard to activate precisely. A skill for querying a database and formatting the results may be one coherent unit, while a skill that also covers database administration is probably trying to do too much.
83
-
84
- ### Aim for moderate detail
85
-
86
- Overly comprehensive skills can hurt more than they help — the agent struggles to extract what's relevant and may pursue unproductive paths triggered by instructions that don't apply to the current task. Concise, stepwise guidance with a working example tends to outperform exhaustive documentation. When you find yourself covering every edge case, consider whether most are better handled by the agent's own judgment.
87
-
88
- ### Structure large skills with progressive disclosure
89
-
90
- The [specification](/specification#progressive-disclosure) recommends keeping `SKILL.md` under 500 lines and 5,000 tokens — just the core instructions the agent needs on every run. When a skill legitimately needs more content, move detailed reference material to separate files in `references/` or similar directories.
91
-
92
- The key is telling the agent *when* to load each file. "Read `references/api-errors.md` if the API returns a non-200 status code" is more useful than a generic "see references/ for details." This lets the agent load context on demand rather than up front, which is how [progressive disclosure](/specification#progressive-disclosure) is designed to work.
93
-
94
- ## Calibrating control
95
-
96
- Not every part of a skill needs the same level of prescriptiveness. Match the specificity of your instructions to the fragility of the task.
97
-
98
- ### Match specificity to fragility
99
-
100
- **Give the agent freedom** when multiple approaches are valid and the task tolerates variation. For flexible instructions, explaining *why* can be more effective than rigid directives — an agent that understands the purpose behind an instruction makes better context-dependent decisions. A code review skill can describe what to look for without prescribing exact steps:
101
-
102
- ```markdown theme={null}
103
- ## Code review process
104
-
105
- 1. Check all database queries for SQL injection (use parameterized queries)
106
- 2. Verify authentication checks on every endpoint
107
- 3. Look for race conditions in concurrent code paths
108
- 4. Confirm error messages don't leak internal details
109
- ```
110
-
111
- **Be prescriptive** when operations are fragile, consistency matters, or a specific sequence must be followed:
112
-
113
- ````markdown theme={null}
114
- ## Database migration
115
-
116
- Run exactly this sequence:
117
-
118
- ```bash
119
- python scripts/migrate.py --verify --backup
120
- ```
121
-
122
- Do not modify the command or add additional flags.
123
- ````
124
-
125
- Most skills have a mix. Calibrate each part independently.
126
-
127
- ### Provide defaults, not menus
128
-
129
- When multiple tools or approaches could work, pick a default and mention alternatives briefly rather than presenting them as equal options.
130
-
131
- ````markdown theme={null}
132
- <!-- Too many options -->
133
- You can use pypdf, pdfplumber, PyMuPDF, or pdf2image...
134
-
135
- <!-- Clear default with escape hatch -->
136
- Use pdfplumber for text extraction:
137
-
138
- ```python
139
- import pdfplumber
140
- ```
141
-
142
- For scanned PDFs requiring OCR, use pdf2image with pytesseract instead.
143
- ````
144
-
145
- ### Favor procedures over declarations
146
-
147
- A skill should teach the agent *how to approach* a class of problems, not *what to produce* for a specific instance. Compare:
148
-
149
- ```markdown theme={null}
150
- <!-- Specific answer — only useful for this exact task -->
151
- Join the `orders` table to `customers` on `customer_id`, filter where
152
- `region = 'EMEA'`, and sum the `amount` column.
153
-
154
- <!-- Reusable method — works for any analytical query -->
155
- 1. Read the schema from `references/schema.yaml` to find relevant tables
156
- 2. Join tables using the `_id` foreign key convention
157
- 3. Apply any filters from the user's request as WHERE clauses
158
- 4. Aggregate numeric columns as needed and format as a markdown table
159
- ```
160
-
161
- This doesn't mean skills can't include specific details — output format templates (see [Templates for output format](#templates-for-output-format)), constraints like "never output PII," and tool-specific instructions are all valuable. The point is that the *approach* should generalize even when individual details are specific.
162
-
163
- ## Patterns for effective instructions
164
-
165
- These are reusable techniques for structuring skill content. Not every skill needs all of them — use the ones that fit your task.
166
-
167
- ### Gotchas sections
168
-
169
- The highest-value content in many skills is a list of gotchas — environment-specific facts that defy reasonable assumptions. These aren't general advice ("handle errors appropriately") but concrete corrections to mistakes the agent will make without being told otherwise:
170
-
171
- ```markdown theme={null}
172
- ## Gotchas
173
-
174
- - The `users` table uses soft deletes. Queries must include
175
- `WHERE deleted_at IS NULL` or results will include deactivated accounts.
176
- - The user ID is `user_id` in the database, `uid` in the auth service,
177
- and `accountId` in the billing API. All three refer to the same value.
178
- - The `/health` endpoint returns 200 as long as the web server is running,
179
- even if the database connection is down. Use `/ready` to check full
180
- service health.
181
- ```
182
-
183
- Keep gotchas in `SKILL.md` where the agent reads them before encountering the situation. A separate reference file works if you tell the agent when to load it, but for non-obvious issues, the agent may not recognize the trigger.
184
-
185
- <Tip>
186
- When an agent makes a mistake you have to correct, add the correction to the gotchas section. This is one of the most direct ways to improve a skill iteratively (see [Refine with real execution](#refine-with-real-execution)).
187
- </Tip>
188
-
189
- ### Templates for output format
190
-
191
- When you need the agent to produce output in a specific format, provide a template. This is more reliable than describing the format in prose, because agents pattern-match well against concrete structures. Short templates can live inline in `SKILL.md`; for longer templates, or templates only needed in certain cases, store them in `assets/` and reference them from `SKILL.md` so they only load when needed.
192
-
193
- ````markdown theme={null}
194
- ## Report structure
195
-
196
- Use this template, adapting sections as needed for the specific analysis:
197
-
198
- ```markdown
199
- # [Analysis Title]
200
-
201
- ## Executive summary
202
- [One-paragraph overview of key findings]
203
-
204
- ## Key findings
205
- - Finding 1 with supporting data
206
- - Finding 2 with supporting data
207
-
208
- ## Recommendations
209
- 1. Specific actionable recommendation
210
- 2. Specific actionable recommendation
211
- ```
212
- ````
213
-
214
- ### Checklists for multi-step workflows
215
-
216
- An explicit checklist helps the agent track progress and avoid skipping steps, especially when steps have dependencies or validation gates.
217
-
218
- ```markdown theme={null}
219
- ## Form processing workflow
220
-
221
- Progress:
222
- - [ ] Step 1: Analyze the form (run `scripts/analyze_form.py`)
223
- - [ ] Step 2: Create field mapping (edit `fields.json`)
224
- - [ ] Step 3: Validate mapping (run `scripts/validate_fields.py`)
225
- - [ ] Step 4: Fill the form (run `scripts/fill_form.py`)
226
- - [ ] Step 5: Verify output (run `scripts/verify_output.py`)
227
- ```
228
-
229
- ### Validation loops
230
-
231
- Instruct the agent to validate its own work before moving on. The pattern is: do the work, run a validator (a script, a reference checklist, or a self-check), fix any issues, and repeat until validation passes.
232
-
233
- ```markdown theme={null}
234
- ## Editing workflow
235
-
236
- 1. Make your edits
237
- 2. Run validation: `python scripts/validate.py output/`
238
- 3. If validation fails:
239
- - Review the error message
240
- - Fix the issues
241
- - Run validation again
242
- 4. Only proceed when validation passes
243
- ```
244
-
245
- A reference document can also serve as the "validator" — instruct the agent to check its work against the reference before finalizing.
246
-
247
- ### Plan-validate-execute
248
-
249
- For batch or destructive operations, have the agent create an intermediate plan in a structured format, validate it against a source of truth, and only then execute.
250
-
251
- ```markdown theme={null}
252
- ## PDF form filling
253
-
254
- 1. Extract form fields: `python scripts/analyze_form.py input.pdf` → `form_fields.json`
255
- (lists every field name, type, and whether it's required)
256
- 2. Create `field_values.json` mapping each field name to its intended value
257
- 3. Validate: `python scripts/validate_fields.py form_fields.json field_values.json`
258
- (checks that every field name exists in the form, types are compatible, and
259
- required fields aren't missing)
260
- 4. If validation fails, revise `field_values.json` and re-validate
261
- 5. Fill the form: `python scripts/fill_form.py input.pdf field_values.json output.pdf`
262
- ```
263
-
264
- The key ingredient is step 3: a validation script that checks the plan (`field_values.json`) against the source of truth (`form_fields.json`). Errors like "Field 'signature\_date' not found — available fields: customer\_name, order\_total, signature\_date\_signed" give the agent enough information to self-correct.
265
-
266
- ### Bundling reusable scripts
267
-
268
- When [iterating on a skill](/skill-creation/evaluating-skills), compare the agent's execution traces across test cases. If you notice the agent independently reinventing the same logic each run — building charts, parsing a specific format, validating output — that's a signal to write a tested script once and bundle it in `scripts/`.
269
-
270
- For more on designing and bundling scripts, see [Using scripts in skills](/skill-creation/using-scripts).
271
-
272
- ## Next steps
273
-
274
- Once you have a working skill, two guides can help you refine it further:
275
-
276
- * **[Evaluating skill output quality](/skill-creation/evaluating-skills)** — Set up test cases, grade results, and iterate systematically.
277
- * **[Optimizing skill descriptions](/skill-creation/optimizing-descriptions)** — Test and improve your skill's `description` field so it triggers on the right prompts.