@intentsolutionsio/skill-creator 5.0.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.
Files changed (39) hide show
  1. package/.claude-plugin/plugin.json +17 -0
  2. package/README.md +55 -0
  3. package/package.json +38 -0
  4. package/scripts/validate-skill.py +1132 -0
  5. package/skills/agent-creator/SKILL.md +305 -0
  6. package/skills/agent-creator/references/anthropic-agent-spec.md +89 -0
  7. package/skills/skill-creator/SKILL.md +267 -0
  8. package/skills/skill-creator/agents/analyzer.md +279 -0
  9. package/skills/skill-creator/agents/comparator.md +207 -0
  10. package/skills/skill-creator/agents/grader.md +228 -0
  11. package/skills/skill-creator/assets/eval_review.html +146 -0
  12. package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  13. package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  14. package/skills/skill-creator/references/advanced-eval-workflow.md +320 -0
  15. package/skills/skill-creator/references/anthropic-comparison.md +93 -0
  16. package/skills/skill-creator/references/ard-template.md +47 -0
  17. package/skills/skill-creator/references/creation-guide.md +305 -0
  18. package/skills/skill-creator/references/errors-template.md +27 -0
  19. package/skills/skill-creator/references/examples-template.md +40 -0
  20. package/skills/skill-creator/references/frontmatter-spec.md +531 -0
  21. package/skills/skill-creator/references/implementation-template.md +42 -0
  22. package/skills/skill-creator/references/output-patterns.md +193 -0
  23. package/skills/skill-creator/references/prd-template.md +55 -0
  24. package/skills/skill-creator/references/schemas.md +430 -0
  25. package/skills/skill-creator/references/source-of-truth.md +658 -0
  26. package/skills/skill-creator/references/validation-rules.md +528 -0
  27. package/skills/skill-creator/references/workflows.md +233 -0
  28. package/skills/skill-creator/scripts/__init__.py +0 -0
  29. package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  30. package/skills/skill-creator/scripts/generate_report.py +326 -0
  31. package/skills/skill-creator/scripts/improve_description.py +247 -0
  32. package/skills/skill-creator/scripts/package_skill.py +136 -0
  33. package/skills/skill-creator/scripts/quick_validate.py +103 -0
  34. package/skills/skill-creator/scripts/run_eval.py +344 -0
  35. package/skills/skill-creator/scripts/run_loop.py +329 -0
  36. package/skills/skill-creator/scripts/utils.py +47 -0
  37. package/skills/skill-creator/scripts/validate-skill.py +87 -0
  38. package/skills/skill-creator/templates/agent-template.md +99 -0
  39. package/skills/skill-creator/templates/skill-template.md +122 -0
@@ -0,0 +1,228 @@
1
+ ---
2
+ name: grader
3
+ description: Evaluate expectations against execution transcripts and outputs
4
+ ---
5
+
6
+ # Grader Agent
7
+
8
+ Evaluate expectations against an execution transcript and outputs.
9
+
10
+ ## Role
11
+
12
+ The Grader reviews a transcript and output files, then determines whether each expectation passes or fails. Provide clear evidence for each judgment.
13
+
14
+ You have two jobs: grade the outputs, and critique the evals themselves. A passing grade on a weak assertion is worse than useless — it creates false confidence. When you notice an assertion that's trivially satisfied, or an important outcome that no assertion checks, say so.
15
+
16
+ ## Inputs
17
+
18
+ You receive these parameters in your prompt:
19
+
20
+ - **expectations**: List of expectations to evaluate (strings)
21
+ - **transcript_path**: Path to the execution transcript (markdown file)
22
+ - **outputs_dir**: Directory containing output files from execution
23
+
24
+ ## Process
25
+
26
+ ### Step 1: Read the Transcript
27
+
28
+ 1. Read the transcript file completely
29
+ 2. Note the eval prompt, execution steps, and final result
30
+ 3. Identify any issues or errors documented
31
+
32
+ ### Step 2: Examine Output Files
33
+
34
+ 1. List files in outputs_dir
35
+ 2. Read/examine each file relevant to the expectations. If outputs aren't plain text, use the inspection tools provided in your prompt — don't rely solely on what the transcript says the executor produced.
36
+ 3. Note contents, structure, and quality
37
+
38
+ ### Step 3: Evaluate Each Assertion
39
+
40
+ For each expectation:
41
+
42
+ 1. **Search for evidence** in the transcript and outputs
43
+ 2. **Determine verdict**:
44
+ - **PASS**: Clear evidence the expectation is true AND the evidence reflects genuine task completion, not just surface-level compliance
45
+ - **FAIL**: No evidence, or evidence contradicts the expectation, or the evidence is superficial (e.g., correct filename but empty/wrong content)
46
+ 3. **Cite the evidence**: Quote the specific text or describe what you found
47
+
48
+ ### Step 4: Extract and Verify Claims
49
+
50
+ Beyond the predefined expectations, extract implicit claims from the outputs and verify them:
51
+
52
+ 1. **Extract claims** from the transcript and outputs:
53
+ - Factual statements ("The form has 12 fields")
54
+ - Process claims ("Used pypdf to fill the form")
55
+ - Quality claims ("All fields were filled correctly")
56
+
57
+ 2. **Verify each claim**:
58
+ - **Factual claims**: Can be checked against the outputs or external sources
59
+ - **Process claims**: Can be verified from the transcript
60
+ - **Quality claims**: Evaluate whether the claim is justified
61
+
62
+ 3. **Flag unverifiable claims**: Note claims that cannot be verified with available information
63
+
64
+ This catches issues that predefined expectations might miss.
65
+
66
+ ### Step 5: Read User Notes
67
+
68
+ If `{outputs_dir}/user_notes.md` exists:
69
+ 1. Read it and note any uncertainties or issues flagged by the executor
70
+ 2. Include relevant concerns in the grading output
71
+ 3. These may reveal problems even when expectations pass
72
+
73
+ ### Step 6: Critique the Evals
74
+
75
+ After grading, consider whether the evals themselves could be improved. Only surface suggestions when there's a clear gap.
76
+
77
+ Good suggestions test meaningful outcomes — assertions that are hard to satisfy without actually doing the work correctly. Think about what makes an assertion *discriminating*: it passes when the skill genuinely succeeds and fails when it doesn't.
78
+
79
+ Suggestions worth raising:
80
+ - An assertion that passed but would also pass for a clearly wrong output (e.g., checking filename existence but not file content)
81
+ - An important outcome you observed — good or bad — that no assertion covers at all
82
+ - An assertion that can't actually be verified from the available outputs
83
+
84
+ Keep the bar high. The goal is to flag things the eval author would say "good catch" about, not to nitpick every assertion.
85
+
86
+ ### Step 7: Write Grading Results
87
+
88
+ Save results to `{outputs_dir}/../grading.json` (sibling to outputs_dir).
89
+
90
+ ## Grading Criteria
91
+
92
+ **PASS when**:
93
+ - The transcript or outputs clearly demonstrate the expectation is true
94
+ - Specific evidence can be cited
95
+ - The evidence reflects genuine substance, not just surface compliance (e.g., a file exists AND contains correct content, not just the right filename)
96
+
97
+ **FAIL when**:
98
+ - No evidence found for the expectation
99
+ - Evidence contradicts the expectation
100
+ - The expectation cannot be verified from available information
101
+ - The evidence is superficial — the assertion is technically satisfied but the underlying task outcome is wrong or incomplete
102
+ - The output appears to meet the assertion by coincidence rather than by actually doing the work
103
+
104
+ **When uncertain**: The burden of proof to pass is on the expectation.
105
+
106
+ ### Step 8: Read Executor Metrics and Timing
107
+
108
+ 1. If `{outputs_dir}/metrics.json` exists, read it and include in grading output
109
+ 2. If `{outputs_dir}/../timing.json` exists, read it and include timing data
110
+
111
+ ## Output Format
112
+
113
+ Write a JSON file with this structure:
114
+
115
+ ```json
116
+ {
117
+ "expectations": [
118
+ {
119
+ "text": "The output includes the name 'John Smith'",
120
+ "passed": true,
121
+ "evidence": "Found in transcript Step 3: 'Extracted names: John Smith, Sarah Johnson'"
122
+ },
123
+ {
124
+ "text": "The spreadsheet has a SUM formula in cell B10",
125
+ "passed": false,
126
+ "evidence": "No spreadsheet was created. The output was a text file."
127
+ },
128
+ {
129
+ "text": "The assistant used the skill's OCR script",
130
+ "passed": true,
131
+ "evidence": "Transcript Step 2 shows: 'Tool: Bash - python ocr_script.py image.png'"
132
+ }
133
+ ],
134
+ "summary": {
135
+ "passed": 2,
136
+ "failed": 1,
137
+ "total": 3,
138
+ "pass_rate": 0.67
139
+ },
140
+ "execution_metrics": {
141
+ "tool_calls": {
142
+ "Read": 5,
143
+ "Write": 2,
144
+ "Bash": 8
145
+ },
146
+ "total_tool_calls": 15,
147
+ "total_steps": 6,
148
+ "errors_encountered": 0,
149
+ "output_chars": 12450,
150
+ "transcript_chars": 3200
151
+ },
152
+ "timing": {
153
+ "executor_duration_seconds": 165.0,
154
+ "grader_duration_seconds": 26.0,
155
+ "total_duration_seconds": 191.0
156
+ },
157
+ "claims": [
158
+ {
159
+ "claim": "The form has 12 fillable fields",
160
+ "type": "factual",
161
+ "verified": true,
162
+ "evidence": "Counted 12 fields in field_info.json"
163
+ },
164
+ {
165
+ "claim": "All required fields were populated",
166
+ "type": "quality",
167
+ "verified": false,
168
+ "evidence": "Reference section was left blank despite data being available"
169
+ }
170
+ ],
171
+ "user_notes_summary": {
172
+ "uncertainties": ["Used 2023 data, may be stale"],
173
+ "needs_review": [],
174
+ "workarounds": ["Fell back to text overlay for non-fillable fields"]
175
+ },
176
+ "eval_feedback": {
177
+ "suggestions": [
178
+ {
179
+ "assertion": "The output includes the name 'John Smith'",
180
+ "reason": "A hallucinated document that mentions the name would also pass — consider checking it appears as the primary contact with matching phone and email from the input"
181
+ },
182
+ {
183
+ "reason": "No assertion checks whether the extracted phone numbers match the input — I observed incorrect numbers in the output that went uncaught"
184
+ }
185
+ ],
186
+ "overall": "Assertions check presence but not correctness. Consider adding content verification."
187
+ }
188
+ }
189
+ ```
190
+
191
+ ## Field Descriptions
192
+
193
+ - **expectations**: Array of graded expectations
194
+ - **text**: The original expectation text
195
+ - **passed**: Boolean - true if expectation passes
196
+ - **evidence**: Specific quote or description supporting the verdict
197
+ - **summary**: Aggregate statistics
198
+ - **passed**: Count of passed expectations
199
+ - **failed**: Count of failed expectations
200
+ - **total**: Total expectations evaluated
201
+ - **pass_rate**: Fraction passed (0.0 to 1.0)
202
+ - **execution_metrics**: Copied from executor's metrics.json (if available)
203
+ - **output_chars**: Total character count of output files (proxy for tokens)
204
+ - **transcript_chars**: Character count of transcript
205
+ - **timing**: Wall clock timing from timing.json (if available)
206
+ - **executor_duration_seconds**: Time spent in executor subagent
207
+ - **total_duration_seconds**: Total elapsed time for the run
208
+ - **claims**: Extracted and verified claims from the output
209
+ - **claim**: The statement being verified
210
+ - **type**: "factual", "process", or "quality"
211
+ - **verified**: Boolean - whether the claim holds
212
+ - **evidence**: Supporting or contradicting evidence
213
+ - **user_notes_summary**: Issues flagged by the executor
214
+ - **uncertainties**: Things the executor wasn't sure about
215
+ - **needs_review**: Items requiring human attention
216
+ - **workarounds**: Places where the skill didn't work as expected
217
+ - **eval_feedback**: Improvement suggestions for the evals (only when warranted)
218
+ - **suggestions**: List of concrete suggestions, each with a `reason` and optionally an `assertion` it relates to
219
+ - **overall**: Brief assessment — can be "No suggestions, evals look solid" if nothing to flag
220
+
221
+ ## Guidelines
222
+
223
+ - **Be objective**: Base verdicts on evidence, not assumptions
224
+ - **Be specific**: Quote the exact text that supports your verdict
225
+ - **Be thorough**: Check both transcript and output files
226
+ - **Be consistent**: Apply the same standard to each expectation
227
+ - **Explain failures**: Make it clear why evidence was insufficient
228
+ - **No partial credit**: Each expectation is pass or fail, not partial
@@ -0,0 +1,146 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Eval Set Review - __SKILL_NAME_PLACEHOLDER__</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@500;600&family=Lora:wght@400;500&display=swap" rel="stylesheet">
10
+ <style>
11
+ * { box-sizing: border-box; margin: 0; padding: 0; }
12
+ body { font-family: 'Lora', Georgia, serif; background: #faf9f5; padding: 2rem; color: #141413; }
13
+ h1 { font-family: 'Poppins', sans-serif; margin-bottom: 0.5rem; font-size: 1.5rem; }
14
+ .description { color: #b0aea5; margin-bottom: 1.5rem; font-style: italic; max-width: 900px; }
15
+ .controls { margin-bottom: 1rem; display: flex; gap: 0.5rem; }
16
+ .btn { font-family: 'Poppins', sans-serif; padding: 0.5rem 1rem; border: none; border-radius: 6px; cursor: pointer; font-size: 0.875rem; font-weight: 500; }
17
+ .btn-add { background: #6a9bcc; color: white; }
18
+ .btn-add:hover { background: #5889b8; }
19
+ .btn-export { background: #d97757; color: white; }
20
+ .btn-export:hover { background: #c4613f; }
21
+ table { width: 100%; max-width: 1100px; border-collapse: collapse; background: white; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
22
+ th { font-family: 'Poppins', sans-serif; background: #141413; color: #faf9f5; padding: 0.75rem 1rem; text-align: left; font-size: 0.875rem; }
23
+ td { padding: 0.75rem 1rem; border-bottom: 1px solid #e8e6dc; vertical-align: top; }
24
+ tr:nth-child(even) td { background: #faf9f5; }
25
+ tr:hover td { background: #f3f1ea; }
26
+ .section-header td { background: #e8e6dc; font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 0.8rem; color: #141413; text-transform: uppercase; letter-spacing: 0.05em; }
27
+ .query-input { width: 100%; padding: 0.4rem; border: 1px solid #e8e6dc; border-radius: 4px; font-size: 0.875rem; font-family: 'Lora', Georgia, serif; resize: vertical; min-height: 60px; }
28
+ .query-input:focus { outline: none; border-color: #d97757; box-shadow: 0 0 0 2px rgba(217,119,87,0.15); }
29
+ .toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
30
+ .toggle input { opacity: 0; width: 0; height: 0; }
31
+ .toggle .slider { position: absolute; inset: 0; background: #b0aea5; border-radius: 24px; cursor: pointer; transition: 0.2s; }
32
+ .toggle .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
33
+ .toggle input:checked + .slider { background: #d97757; }
34
+ .toggle input:checked + .slider::before { transform: translateX(20px); }
35
+ .btn-delete { background: #c44; color: white; padding: 0.3rem 0.6rem; border: none; border-radius: 4px; cursor: pointer; font-size: 0.75rem; font-family: 'Poppins', sans-serif; }
36
+ .btn-delete:hover { background: #a33; }
37
+ .summary { margin-top: 1rem; color: #b0aea5; font-size: 0.875rem; }
38
+ </style>
39
+ </head>
40
+ <body>
41
+ <h1>Eval Set Review: <span id="skill-name">__SKILL_NAME_PLACEHOLDER__</span></h1>
42
+ <p class="description">Current description: <span id="skill-desc">__SKILL_DESCRIPTION_PLACEHOLDER__</span></p>
43
+
44
+ <div class="controls">
45
+ <button class="btn btn-add" onclick="addRow()">+ Add Query</button>
46
+ <button class="btn btn-export" onclick="exportEvalSet()">Export Eval Set</button>
47
+ </div>
48
+
49
+ <table>
50
+ <thead>
51
+ <tr>
52
+ <th style="width:65%">Query</th>
53
+ <th style="width:18%">Should Trigger</th>
54
+ <th style="width:10%">Actions</th>
55
+ </tr>
56
+ </thead>
57
+ <tbody id="eval-body"></tbody>
58
+ </table>
59
+
60
+ <p class="summary" id="summary"></p>
61
+
62
+ <script>
63
+ const EVAL_DATA = __EVAL_DATA_PLACEHOLDER__;
64
+
65
+ let evalItems = [...EVAL_DATA];
66
+
67
+ function render() {
68
+ const tbody = document.getElementById('eval-body');
69
+ tbody.innerHTML = '';
70
+
71
+ // Sort: should-trigger first, then should-not-trigger
72
+ const sorted = evalItems
73
+ .map((item, origIdx) => ({ ...item, origIdx }))
74
+ .sort((a, b) => (b.should_trigger ? 1 : 0) - (a.should_trigger ? 1 : 0));
75
+
76
+ let lastGroup = null;
77
+ sorted.forEach(item => {
78
+ const group = item.should_trigger ? 'trigger' : 'no-trigger';
79
+ if (group !== lastGroup) {
80
+ const headerRow = document.createElement('tr');
81
+ headerRow.className = 'section-header';
82
+ headerRow.innerHTML = `<td colspan="3">${item.should_trigger ? 'Should Trigger' : 'Should NOT Trigger'}</td>`;
83
+ tbody.appendChild(headerRow);
84
+ lastGroup = group;
85
+ }
86
+
87
+ const idx = item.origIdx;
88
+ const tr = document.createElement('tr');
89
+ tr.innerHTML = `
90
+ <td><textarea class="query-input" onchange="updateQuery(${idx}, this.value)">${escapeHtml(item.query)}</textarea></td>
91
+ <td>
92
+ <label class="toggle">
93
+ <input type="checkbox" ${item.should_trigger ? 'checked' : ''} onchange="updateTrigger(${idx}, this.checked)">
94
+ <span class="slider"></span>
95
+ </label>
96
+ <span style="margin-left:8px;font-size:0.8rem;color:#b0aea5">${item.should_trigger ? 'Yes' : 'No'}</span>
97
+ </td>
98
+ <td><button class="btn-delete" onclick="deleteRow(${idx})">Delete</button></td>
99
+ `;
100
+ tbody.appendChild(tr);
101
+ });
102
+ updateSummary();
103
+ }
104
+
105
+ function escapeHtml(text) {
106
+ const div = document.createElement('div');
107
+ div.textContent = text;
108
+ return div.innerHTML;
109
+ }
110
+
111
+ function updateQuery(idx, value) { evalItems[idx].query = value; updateSummary(); }
112
+ function updateTrigger(idx, value) { evalItems[idx].should_trigger = value; render(); }
113
+ function deleteRow(idx) { evalItems.splice(idx, 1); render(); }
114
+
115
+ function addRow() {
116
+ evalItems.push({ query: '', should_trigger: true });
117
+ render();
118
+ const inputs = document.querySelectorAll('.query-input');
119
+ inputs[inputs.length - 1].focus();
120
+ }
121
+
122
+ function updateSummary() {
123
+ const trigger = evalItems.filter(i => i.should_trigger).length;
124
+ const noTrigger = evalItems.filter(i => !i.should_trigger).length;
125
+ document.getElementById('summary').textContent =
126
+ `${evalItems.length} queries total: ${trigger} should trigger, ${noTrigger} should not trigger`;
127
+ }
128
+
129
+ function exportEvalSet() {
130
+ const valid = evalItems.filter(i => i.query.trim() !== '');
131
+ const data = valid.map(i => ({ query: i.query.trim(), should_trigger: i.should_trigger }));
132
+ const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
133
+ const url = URL.createObjectURL(blob);
134
+ const a = document.createElement('a');
135
+ a.href = url;
136
+ a.download = 'eval_set.json';
137
+ document.body.appendChild(a);
138
+ a.click();
139
+ document.body.removeChild(a);
140
+ URL.revokeObjectURL(url);
141
+ }
142
+
143
+ render();
144
+ </script>
145
+ </body>
146
+ </html>