@sentry/warden 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.oxlintrc.json +169 -0
- package/CHANGELOG.md +210 -0
- package/README.md +1 -1
- package/dist/cli/args.d.ts +6 -2
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +175 -207
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/add.d.ts.map +1 -1
- package/dist/cli/commands/add.js +16 -5
- package/dist/cli/commands/add.js.map +1 -1
- package/dist/cli/commands/build.d.ts +13 -0
- package/dist/cli/commands/build.d.ts.map +1 -0
- package/dist/cli/commands/build.js +384 -0
- package/dist/cli/commands/build.js.map +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +10 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/runs.d.ts.map +1 -1
- package/dist/cli/commands/runs.js +12 -6
- package/dist/cli/commands/runs.js.map +1 -1
- package/dist/cli/commands/sync.d.ts.map +1 -1
- package/dist/cli/commands/sync.js +4 -1
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/cli/context.d.ts.map +1 -1
- package/dist/cli/context.js +8 -1
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/files.d.ts.map +1 -1
- package/dist/cli/files.js +27 -9
- package/dist/cli/files.js.map +1 -1
- package/dist/cli/help.d.ts +4 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +448 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/index.js +2 -13
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/input.d.ts +12 -0
- package/dist/cli/input.d.ts.map +1 -1
- package/dist/cli/input.js +60 -0
- package/dist/cli/input.js.map +1 -1
- package/dist/cli/main.d.ts +39 -2
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +264 -74
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/output/box.js +1 -1
- package/dist/cli/output/formatters.d.ts +10 -2
- package/dist/cli/output/formatters.d.ts.map +1 -1
- package/dist/cli/output/formatters.js +32 -9
- package/dist/cli/output/formatters.js.map +1 -1
- package/dist/cli/output/index.d.ts +1 -1
- package/dist/cli/output/index.d.ts.map +1 -1
- package/dist/cli/output/index.js +1 -1
- package/dist/cli/output/index.js.map +1 -1
- package/dist/cli/output/ink-runner.d.ts +3 -1
- package/dist/cli/output/ink-runner.d.ts.map +1 -1
- package/dist/cli/output/ink-runner.js +64 -28
- package/dist/cli/output/ink-runner.js.map +1 -1
- package/dist/cli/output/jsonl.d.ts +37 -0
- package/dist/cli/output/jsonl.d.ts.map +1 -1
- package/dist/cli/output/jsonl.js +6 -0
- package/dist/cli/output/jsonl.js.map +1 -1
- package/dist/cli/output/live-status.d.ts +48 -0
- package/dist/cli/output/live-status.d.ts.map +1 -0
- package/dist/cli/output/live-status.js +173 -0
- package/dist/cli/output/live-status.js.map +1 -0
- package/dist/cli/output/reporter.d.ts +4 -0
- package/dist/cli/output/reporter.d.ts.map +1 -1
- package/dist/cli/output/reporter.js +20 -3
- package/dist/cli/output/reporter.js.map +1 -1
- package/dist/cli/output/tasks.d.ts +8 -5
- package/dist/cli/output/tasks.d.ts.map +1 -1
- package/dist/cli/output/tasks.js +113 -71
- package/dist/cli/output/tasks.js.map +1 -1
- package/dist/cli/signals.d.ts +15 -0
- package/dist/cli/signals.d.ts.map +1 -0
- package/dist/cli/signals.js +26 -0
- package/dist/cli/signals.js.map +1 -0
- package/dist/config/loader.d.ts +48 -7
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +228 -32
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +55 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +34 -2
- package/dist/config/schema.js.map +1 -1
- package/dist/diff/context.d.ts +9 -2
- package/dist/diff/context.d.ts.map +1 -1
- package/dist/diff/context.js +65 -17
- package/dist/diff/context.js.map +1 -1
- package/dist/evals/runner.d.ts.map +1 -1
- package/dist/evals/runner.js +16 -0
- package/dist/evals/runner.js.map +1 -1
- package/dist/event/context.d.ts.map +1 -1
- package/dist/event/context.js +1 -0
- package/dist/event/context.js.map +1 -1
- package/dist/event/schedule-context.d.ts.map +1 -1
- package/dist/event/schedule-context.js +1 -0
- package/dist/event/schedule-context.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/output/dedup.d.ts +8 -11
- package/dist/output/dedup.d.ts.map +1 -1
- package/dist/output/dedup.js +39 -37
- package/dist/output/dedup.js.map +1 -1
- package/dist/output/github-checks.d.ts +1 -0
- package/dist/output/github-checks.d.ts.map +1 -1
- package/dist/output/github-checks.js +9 -7
- package/dist/output/github-checks.js.map +1 -1
- package/dist/sdk/analyze.d.ts.map +1 -1
- package/dist/sdk/analyze.js +147 -277
- package/dist/sdk/analyze.js.map +1 -1
- package/dist/sdk/circuit-breaker.d.ts +26 -0
- package/dist/sdk/circuit-breaker.d.ts.map +1 -0
- package/dist/sdk/circuit-breaker.js +53 -0
- package/dist/sdk/circuit-breaker.js.map +1 -0
- package/dist/sdk/errors.d.ts +5 -0
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +27 -0
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/extract.d.ts +18 -9
- package/dist/sdk/extract.d.ts.map +1 -1
- package/dist/sdk/extract.js +95 -87
- package/dist/sdk/extract.js.map +1 -1
- package/dist/sdk/fix-quality.d.ts +5 -0
- package/dist/sdk/fix-quality.d.ts.map +1 -1
- package/dist/sdk/fix-quality.js +42 -23
- package/dist/sdk/fix-quality.js.map +1 -1
- package/dist/sdk/haiku.d.ts +6 -0
- package/dist/sdk/haiku.d.ts.map +1 -1
- package/dist/sdk/haiku.js +75 -49
- package/dist/sdk/haiku.js.map +1 -1
- package/dist/sdk/json-output.d.ts +31 -0
- package/dist/sdk/json-output.d.ts.map +1 -0
- package/dist/sdk/json-output.js +98 -0
- package/dist/sdk/json-output.js.map +1 -0
- package/dist/sdk/model-pricing.json +56 -16
- package/dist/sdk/post-process.d.ts +29 -0
- package/dist/sdk/post-process.d.ts.map +1 -0
- package/dist/sdk/post-process.js +65 -0
- package/dist/sdk/post-process.js.map +1 -0
- package/dist/sdk/prepare.d.ts.map +1 -1
- package/dist/sdk/prepare.js +4 -1
- package/dist/sdk/prepare.js.map +1 -1
- package/dist/sdk/pricing.d.ts +18 -0
- package/dist/sdk/pricing.d.ts.map +1 -1
- package/dist/sdk/pricing.js +108 -3
- package/dist/sdk/pricing.js.map +1 -1
- package/dist/sdk/prompt-sections.d.ts +56 -0
- package/dist/sdk/prompt-sections.d.ts.map +1 -0
- package/dist/sdk/prompt-sections.js +118 -0
- package/dist/sdk/prompt-sections.js.map +1 -0
- package/dist/sdk/prompt.d.ts +2 -17
- package/dist/sdk/prompt.d.ts.map +1 -1
- package/dist/sdk/prompt.js +15 -37
- package/dist/sdk/prompt.js.map +1 -1
- package/dist/sdk/report-files.d.ts +15 -0
- package/dist/sdk/report-files.d.ts.map +1 -0
- package/dist/sdk/report-files.js +20 -0
- package/dist/sdk/report-files.js.map +1 -0
- package/dist/sdk/runner.d.ts +9 -1
- package/dist/sdk/runner.d.ts.map +1 -1
- package/dist/sdk/runner.js +6 -0
- package/dist/sdk/runner.js.map +1 -1
- package/dist/sdk/runtimes/claude.d.ts +3 -0
- package/dist/sdk/runtimes/claude.d.ts.map +1 -0
- package/dist/sdk/runtimes/claude.js +376 -0
- package/dist/sdk/runtimes/claude.js.map +1 -0
- package/dist/sdk/runtimes/index.d.ts +12 -0
- package/dist/sdk/runtimes/index.d.ts.map +1 -0
- package/dist/sdk/runtimes/index.js +22 -0
- package/dist/sdk/runtimes/index.js.map +1 -0
- package/dist/sdk/runtimes/types.d.ts +116 -0
- package/dist/sdk/runtimes/types.d.ts.map +1 -0
- package/dist/sdk/runtimes/types.js +17 -0
- package/dist/sdk/runtimes/types.js.map +1 -0
- package/dist/sdk/types.d.ts +23 -2
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/sdk/types.js.map +1 -1
- package/dist/sdk/usage.d.ts +21 -6
- package/dist/sdk/usage.d.ts.map +1 -1
- package/dist/sdk/usage.js +36 -23
- package/dist/sdk/usage.js.map +1 -1
- package/dist/sdk/verify.d.ts +25 -0
- package/dist/sdk/verify.d.ts.map +1 -0
- package/dist/sdk/verify.js +226 -0
- package/dist/sdk/verify.js.map +1 -0
- package/dist/skill-builder/agentic.d.ts +33 -0
- package/dist/skill-builder/agentic.d.ts.map +1 -0
- package/dist/skill-builder/agentic.js +240 -0
- package/dist/skill-builder/agentic.js.map +1 -0
- package/dist/skill-builder/authoring-provider.d.ts +5 -0
- package/dist/skill-builder/authoring-provider.d.ts.map +1 -0
- package/dist/skill-builder/authoring-provider.js +70 -0
- package/dist/skill-builder/authoring-provider.js.map +1 -0
- package/dist/skill-builder/definition.d.ts +46 -0
- package/dist/skill-builder/definition.d.ts.map +1 -0
- package/dist/skill-builder/definition.js +171 -0
- package/dist/skill-builder/definition.js.map +1 -0
- package/dist/skill-builder/outline-contract.d.ts +113 -0
- package/dist/skill-builder/outline-contract.d.ts.map +1 -0
- package/dist/skill-builder/outline-contract.js +73 -0
- package/dist/skill-builder/outline-contract.js.map +1 -0
- package/dist/skill-builder/outline-state.d.ts +158 -0
- package/dist/skill-builder/outline-state.d.ts.map +1 -0
- package/dist/skill-builder/outline-state.js +87 -0
- package/dist/skill-builder/outline-state.js.map +1 -0
- package/dist/skill-builder/outline.d.ts +36 -0
- package/dist/skill-builder/outline.d.ts.map +1 -0
- package/dist/skill-builder/outline.js +345 -0
- package/dist/skill-builder/outline.js.map +1 -0
- package/dist/skill-builder/skill-contract.d.ts +97 -0
- package/dist/skill-builder/skill-contract.d.ts.map +1 -0
- package/dist/skill-builder/skill-contract.js +58 -0
- package/dist/skill-builder/skill-contract.js.map +1 -0
- package/dist/skill-builder/skill-prompts.d.ts +61 -0
- package/dist/skill-builder/skill-prompts.d.ts.map +1 -0
- package/dist/skill-builder/skill-prompts.js +285 -0
- package/dist/skill-builder/skill-prompts.js.map +1 -0
- package/dist/skill-builder/skill.d.ts +23 -0
- package/dist/skill-builder/skill.d.ts.map +1 -0
- package/dist/skill-builder/skill.js +563 -0
- package/dist/skill-builder/skill.js.map +1 -0
- package/dist/skills/index.d.ts +2 -2
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/skills/loader.d.ts +20 -6
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js +88 -141
- package/dist/skills/loader.js.map +1 -1
- package/dist/skills/remote.d.ts +11 -7
- package/dist/skills/remote.d.ts.map +1 -1
- package/dist/skills/remote.js +62 -162
- package/dist/skills/remote.js.map +1 -1
- package/dist/triggers/matcher.d.ts.map +1 -1
- package/dist/triggers/matcher.js +28 -15
- package/dist/triggers/matcher.js.map +1 -1
- package/dist/types/index.d.ts +40 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +11 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/path.d.ts +17 -0
- package/dist/utils/path.d.ts.map +1 -0
- package/dist/utils/path.js +36 -0
- package/dist/utils/path.js.map +1 -0
- package/package.json +8 -8
- package/policies/README.md +22 -0
- package/policies/code-comments.md +20 -0
- package/policies/policy-template.md +14 -0
- package/skills/warden/SPEC.md +112 -0
- package/skills/warden/references/config-schema.md +29 -13
- package/skills/warden/references/configuration.md +20 -8
- package/skills/warden-sweep/SPEC.md +126 -0
- package/src/builtin-skills/security-review/SKILL.md +81 -0
- package/src/builtin-skills/security-review/SPEC.md +77 -0
- package/src/builtin-skills/security-review/references/github-workflows.md +186 -0
- package/src/builtin-skills/security-review/references/javascript-typescript.md +69 -0
- package/src/builtin-skills/security-review/references/python.md +70 -0
- package/src/internal-skills/skill-writer/EVAL.md +124 -0
- package/src/internal-skills/skill-writer/SKILL.md +159 -0
- package/src/internal-skills/skill-writer/SOURCES.md +94 -0
- package/src/internal-skills/skill-writer/SPEC.md +153 -0
- package/src/internal-skills/skill-writer/references/artifact-layouts/argument-driven-skill-layout.md +32 -0
- package/src/internal-skills/skill-writer/references/artifact-layouts/asset-template-skill-layout.md +30 -0
- package/src/internal-skills/skill-writer/references/artifact-layouts/inline-skill-layout.md +28 -0
- package/src/internal-skills/skill-writer/references/artifact-layouts/reference-backed-skill-layout.md +35 -0
- package/src/internal-skills/skill-writer/references/artifact-layouts/script-backed-skill-layout.md +31 -0
- package/src/internal-skills/skill-writer/references/authoring-path.md +91 -0
- package/src/internal-skills/skill-writer/references/claude-code/argument-substitutions.md +20 -0
- package/src/internal-skills/skill-writer/references/claude-code/dynamic-context.md +16 -0
- package/src/internal-skills/skill-writer/references/claude-code/frontmatter-and-invocation.md +33 -0
- package/src/internal-skills/skill-writer/references/claude-code/hook-backed-skills.md +28 -0
- package/src/internal-skills/skill-writer/references/claude-code/subagent-fork-skills.md +22 -0
- package/src/internal-skills/skill-writer/references/description-optimization.md +28 -0
- package/src/internal-skills/skill-writer/references/design-principles.md +74 -0
- package/src/internal-skills/skill-writer/references/evaluation-path.md +73 -0
- package/src/internal-skills/skill-writer/references/examples/documentation-skill.md +70 -0
- package/src/internal-skills/skill-writer/references/examples/evaluator-loop-skill.md +38 -0
- package/src/internal-skills/skill-writer/references/examples/hook-backed-skill.md +39 -0
- package/src/internal-skills/skill-writer/references/examples/router-skill.md +41 -0
- package/src/internal-skills/skill-writer/references/examples/security-review-skill.md +69 -0
- package/src/internal-skills/skill-writer/references/examples/subagent-fork-skill.md +39 -0
- package/src/internal-skills/skill-writer/references/examples/workflow-process-skill.md +65 -0
- package/src/internal-skills/skill-writer/references/execution-shapes.md +68 -0
- package/src/internal-skills/skill-writer/references/iteration-evidence.md +82 -0
- package/src/internal-skills/skill-writer/references/iteration-path.md +40 -0
- package/src/internal-skills/skill-writer/references/mode-selection.md +67 -0
- package/src/internal-skills/skill-writer/references/output-contracts.md +68 -0
- package/src/internal-skills/skill-writer/references/reference-architecture.md +71 -0
- package/src/internal-skills/skill-writer/references/registration-validation.md +67 -0
- package/src/internal-skills/skill-writer/references/source-discovery.md +60 -0
- package/src/internal-skills/skill-writer/references/spec-template.md +118 -0
- package/src/internal-skills/skill-writer/references/structure-troubleshooting.md +111 -0
- package/src/internal-skills/skill-writer/references/synthesis-path.md +119 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/evaluator-loops.md +25 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/orchestrator-workers.md +25 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/parallel-workflows.md +21 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/plan-validate-execute.md +26 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/prompt-chaining.md +24 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/routing-workflows.md +28 -0
- package/src/internal-skills/skill-writer/references/workflow-mechanics/validation-loops.md +26 -0
- package/src/internal-skills/skill-writer/scripts/quick_validate.py +158 -0
- package/src/internal-skills/skill-writer/scripts/quick_validate_test.py +79 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-writer
|
|
3
|
+
description: Create, synthesize, and iteratively improve agent skills following the Agent Skills specification. Use when asked to "create a skill", "write a skill", "synthesize sources into a skill", "improve a skill from positive/negative examples", "update a skill", or "maintain skill docs and registration". Handles source capture, depth gates, authoring, registration, and validation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Writer
|
|
7
|
+
|
|
8
|
+
Use this as the single canonical workflow for skill creation and improvement.
|
|
9
|
+
Primary success condition: maximize high-value input coverage before authoring while minimizing wasted runtime tokens.
|
|
10
|
+
|
|
11
|
+
Load only the path(s) required for the task. `SKILL.md` is the primary router: every bundled reference file should have a direct "open when..." reason here.
|
|
12
|
+
|
|
13
|
+
## Core Workflow References
|
|
14
|
+
|
|
15
|
+
| Open when you need to... | Read |
|
|
16
|
+
|--------------------------|------|
|
|
17
|
+
| choose the minimum workflow path for create, update, iterate, or research-first work | `references/mode-selection.md` |
|
|
18
|
+
| choose the simplest adequate execution shape before deciding files | `references/execution-shapes.md` |
|
|
19
|
+
| apply writing constraints for depth, concision, and portability | `references/design-principles.md` |
|
|
20
|
+
| decide what belongs in `SKILL.md`, `references/`, `SPEC.md`, or subfolders | `references/reference-architecture.md` |
|
|
21
|
+
| create or update the maintenance contract for a skill | `references/spec-template.md` |
|
|
22
|
+
| find missing high-signal sources, including history and regressions | `references/source-discovery.md` |
|
|
23
|
+
| run the full synthesis pass with depth gates and source capture | `references/synthesis-path.md` |
|
|
24
|
+
| author or update `SKILL.md`, `SPEC.md`, and supporting files | `references/authoring-path.md` |
|
|
25
|
+
| improve trigger language and false-positive/false-negative behavior | `references/description-optimization.md` |
|
|
26
|
+
| iterate from positive, negative, or fix examples | `references/iteration-path.md` |
|
|
27
|
+
| store persistent working and holdout examples for future revisions | `references/iteration-evidence.md` |
|
|
28
|
+
| choose a response template, schema, or output contract | `references/output-contracts.md` |
|
|
29
|
+
| troubleshoot overloaded layouts, hidden refs, or other structure failures | `references/structure-troubleshooting.md` |
|
|
30
|
+
| verify a risky, disputed, or explicitly requested change | `references/evaluation-path.md` |
|
|
31
|
+
| register the skill and run final validation checks | `references/registration-validation.md` |
|
|
32
|
+
|
|
33
|
+
## Artifact Layout References
|
|
34
|
+
|
|
35
|
+
| Open when you need to... | Read |
|
|
36
|
+
|--------------------------|------|
|
|
37
|
+
| keep the whole skill inline in one coherent `SKILL.md` | `references/artifact-layouts/inline-skill-layout.md` |
|
|
38
|
+
| split optional deep knowledge into focused routed references | `references/artifact-layouts/reference-backed-skill-layout.md` |
|
|
39
|
+
| add scripts for deterministic automation or validation | `references/artifact-layouts/script-backed-skill-layout.md` |
|
|
40
|
+
| define a skill that is usually invoked with explicit arguments | `references/artifact-layouts/argument-driven-skill-layout.md` |
|
|
41
|
+
| ship reusable templates, schemas, or other static assets | `references/artifact-layouts/asset-template-skill-layout.md` |
|
|
42
|
+
|
|
43
|
+
## Workflow Mechanic References
|
|
44
|
+
|
|
45
|
+
| Open when you need to... | Read |
|
|
46
|
+
|--------------------------|------|
|
|
47
|
+
| break a task into fixed ordered steps | `references/workflow-mechanics/prompt-chaining.md` |
|
|
48
|
+
| classify requests and route them to different downstream paths | `references/workflow-mechanics/routing-workflows.md` |
|
|
49
|
+
| split independent work into parallel units or votes | `references/workflow-mechanics/parallel-workflows.md` |
|
|
50
|
+
| discover work units dynamically and coordinate worker outputs | `references/workflow-mechanics/orchestrator-workers.md` |
|
|
51
|
+
| critique and revise output against a rubric | `references/workflow-mechanics/evaluator-loops.md` |
|
|
52
|
+
| run validate-fix-repeat checks during authoring or execution | `references/workflow-mechanics/validation-loops.md` |
|
|
53
|
+
| validate a plan before executing a risky action | `references/workflow-mechanics/plan-validate-execute.md` |
|
|
54
|
+
|
|
55
|
+
## Claude Code References
|
|
56
|
+
|
|
57
|
+
| Open when you need to... | Read |
|
|
58
|
+
|--------------------------|------|
|
|
59
|
+
| use Claude-specific frontmatter or invocation controls | `references/claude-code/frontmatter-and-invocation.md` |
|
|
60
|
+
| use Claude argument fields or substitution variables | `references/claude-code/argument-substitutions.md` |
|
|
61
|
+
| build a skill that runs in isolated `context: fork` | `references/claude-code/subagent-fork-skills.md` |
|
|
62
|
+
| build a skill that uses Claude hooks for deterministic enforcement | `references/claude-code/hook-backed-skills.md` |
|
|
63
|
+
| use Claude shell preprocessing for dynamic context injection | `references/claude-code/dynamic-context.md` |
|
|
64
|
+
|
|
65
|
+
## Example Profiles
|
|
66
|
+
|
|
67
|
+
| Open when you need to... | Read |
|
|
68
|
+
|--------------------------|------|
|
|
69
|
+
| see the expected depth for a documentation-heavy skill | `references/examples/documentation-skill.md` |
|
|
70
|
+
| see the expected depth for a security-review skill | `references/examples/security-review-skill.md` |
|
|
71
|
+
| see the expected depth for a workflow-process skill | `references/examples/workflow-process-skill.md` |
|
|
72
|
+
| see what a good routed skill looks like | `references/examples/router-skill.md` |
|
|
73
|
+
| see what a good evaluator-loop skill looks like | `references/examples/evaluator-loop-skill.md` |
|
|
74
|
+
| see what a good subagent-fork skill looks like | `references/examples/subagent-fork-skill.md` |
|
|
75
|
+
| see what a good hook-backed skill looks like | `references/examples/hook-backed-skill.md` |
|
|
76
|
+
|
|
77
|
+
## Step 1: Resolve target, path, and shape
|
|
78
|
+
|
|
79
|
+
1. Resolve the intended operation (`create`, `update`, `synthesize`, `iterate`) and inspect workspace prior art before choosing where files belong.
|
|
80
|
+
2. Choose the target skill root from observed conventions. If the canonical location is still unclear after inspection, ask one direct question before editing files.
|
|
81
|
+
3. Read `references/mode-selection.md` to choose the minimum required workflow paths.
|
|
82
|
+
4. Read `references/execution-shapes.md` to choose the primary execution shape.
|
|
83
|
+
5. Default to the simplest adequate shape. If selecting a more complex shape, record why simpler shapes were rejected.
|
|
84
|
+
6. Load only the exact artifact-layout, workflow-mechanic, and provider-specific leaf files required by that shape.
|
|
85
|
+
7. Record portability implications before using provider-specific mechanics.
|
|
86
|
+
|
|
87
|
+
## Step 2: Run synthesis when needed
|
|
88
|
+
|
|
89
|
+
Read `references/synthesis-path.md`.
|
|
90
|
+
|
|
91
|
+
1. Use this path for new skills, material changes, and research-first planning.
|
|
92
|
+
2. Collect and score relevant sources with provenance.
|
|
93
|
+
3. Read `references/source-discovery.md` when source material is thin, stale, or ambiguous.
|
|
94
|
+
4. Produce source-backed decisions and coverage/gap status, including the class and execution-shape choice.
|
|
95
|
+
5. Load example profiles only when they add concrete depth for the selected class or shape.
|
|
96
|
+
6. If the skill uses provider-specific mechanics, include current official provider docs and capture usage constraints.
|
|
97
|
+
7. Do not move to authoring until depth gates pass.
|
|
98
|
+
|
|
99
|
+
## Step 3: Run iteration first when improving from outcomes/examples
|
|
100
|
+
|
|
101
|
+
Read `references/iteration-path.md` first when selected path includes `iteration` (for example operation `iterate`).
|
|
102
|
+
|
|
103
|
+
1. Capture and anonymize examples with provenance.
|
|
104
|
+
2. Read `references/iteration-evidence.md` when examples should persist beyond the current turn.
|
|
105
|
+
3. Re-evaluate skill behavior against working and holdout slices.
|
|
106
|
+
4. Propose improvements from positive/negative/fix evidence.
|
|
107
|
+
5. Carry concrete behavior deltas into authoring.
|
|
108
|
+
|
|
109
|
+
Skip this step when selected path does not include `iteration`.
|
|
110
|
+
|
|
111
|
+
## Step 4: Author or update skill artifacts
|
|
112
|
+
|
|
113
|
+
Read `references/authoring-path.md`.
|
|
114
|
+
|
|
115
|
+
1. Write or update `SKILL.md` in imperative voice with trigger-rich description.
|
|
116
|
+
2. Keep `SKILL.md` as the runtime router, not an encyclopedia.
|
|
117
|
+
3. Read `references/reference-architecture.md` before adding bulk instructions or new reference files.
|
|
118
|
+
4. Create or update `SPEC.md` using `references/spec-template.md` when creating a new skill or materially changing its contract.
|
|
119
|
+
5. Create focused reference files, subfolders, scripts, and assets only when each one has a clear "open when..." reason.
|
|
120
|
+
6. If you add a bundled reference file, add a direct routing entry for it in this `SKILL.md`.
|
|
121
|
+
7. Prefer checklists, tables, templates, and input/output examples over explanatory prose.
|
|
122
|
+
8. Follow only the specific artifact-layout, workflow-mechanic, Claude-specific, and output-contract references selected for this skill.
|
|
123
|
+
9. For advanced execution shapes, add the required routing, delegation, or safety contracts before considering the skill complete.
|
|
124
|
+
10. For authoring/generator skills, include transformed examples in references:
|
|
125
|
+
- happy-path
|
|
126
|
+
- secure/robust variant
|
|
127
|
+
- anti-pattern + corrected version
|
|
128
|
+
|
|
129
|
+
## Step 5: Optimize description quality
|
|
130
|
+
|
|
131
|
+
Read `references/description-optimization.md`.
|
|
132
|
+
|
|
133
|
+
1. Validate should-trigger and should-not-trigger query sets.
|
|
134
|
+
2. Reduce false positives and false negatives with targeted description edits.
|
|
135
|
+
3. Keep trigger language generic across providers unless the skill is intentionally provider-specific.
|
|
136
|
+
|
|
137
|
+
## Step 6: Evaluate only when needed
|
|
138
|
+
|
|
139
|
+
1. Read `references/evaluation-path.md` only when the user asks for evaluation, the change is high-risk, or the architecture choice is non-obvious.
|
|
140
|
+
2. If you run evaluation, start with the lightweight qualitative check.
|
|
141
|
+
3. Run deeper evals only when requested or risk warrants it.
|
|
142
|
+
4. Record outcomes and unresolved risks when evaluation is run.
|
|
143
|
+
|
|
144
|
+
## Step 7: Register and validate
|
|
145
|
+
|
|
146
|
+
Read `references/registration-validation.md`.
|
|
147
|
+
|
|
148
|
+
1. Apply repository registration steps for the active layout you verified in the workspace.
|
|
149
|
+
2. Run quick validation with strict depth gates.
|
|
150
|
+
3. Reject shallow outputs that fail depth gates or required artifact checks.
|
|
151
|
+
|
|
152
|
+
## Output format
|
|
153
|
+
|
|
154
|
+
Return:
|
|
155
|
+
|
|
156
|
+
1. `Summary`
|
|
157
|
+
2. `Changes Made`
|
|
158
|
+
3. `Validation Results`
|
|
159
|
+
4. `Open Gaps`
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Sources
|
|
2
|
+
|
|
3
|
+
This file tracks source material synthesized into `skill-writer`, plus iterative changes over time.
|
|
4
|
+
|
|
5
|
+
## Current source inventory
|
|
6
|
+
|
|
7
|
+
| Source | Type | Trust tier | Retrieved | Confidence | Contribution | Usage constraints | Notes |
|
|
8
|
+
|---|---|---|---|---|---|---|---|
|
|
9
|
+
| `SKILL.md` | local canonical | canonical | 2026-05-01 | high | Baseline orchestration, path model, and runtime contract | local active skill root | Primary source of current behavior |
|
|
10
|
+
| `references/**/*.md` | local canonical | canonical | 2026-05-01 | high | Detailed path guidance, examples, routed leaf references, and validation requirements | local active skill root | Includes shape, synthesis, iteration, evaluation, provider-specific guidance, and lookup-oriented subfolders |
|
|
11
|
+
| `SPEC.md` | local canonical | canonical | 2026-05-01 | high | Canonical maintenance contract for intent, scope, evidence model, evaluation, and limitations | local active skill root | Updated to treat `skill-writer` as a meta-router |
|
|
12
|
+
| `https://agentskills.io/specification` | external canonical spec | canonical | 2026-05-01 | high | Portable skill structure, frontmatter, progressive disclosure, optional directories, and file-reference rules | spec-level constraints take precedence over local preferences | Cross-agent compatibility baseline |
|
|
13
|
+
| `https://agentskills.io/skill-creation/best-practices` | external official docs | canonical | 2026-05-01 | high | Coherent unit design, moderate detail, progressive disclosure, defaults over menus, validation loops, plan-validate-execute | skill-authoring guidance, not provider-specific runtime semantics | Informed shape-selection and workflow guidance |
|
|
14
|
+
| `https://agentskills.io/skill-creation/using-scripts` | external official docs | canonical | 2026-05-01 | high | Script bundling, non-interactive requirements, `--help`, structured output, and safe script interfaces | script examples are illustrative, adapt to local tooling | Informed script-backed workflow requirements |
|
|
15
|
+
| `https://code.claude.com/docs/en/skills` | external official docs | canonical | 2026-05-01 | high | Current Claude Code skill lifecycle, frontmatter fields, argument features, `context: fork`, `allowed-tools`, and hooks-in-skills support | provider-specific; do not generalize to portable Agent Skills behavior | Replaced stale local assumptions about Claude-specific fields |
|
|
16
|
+
| `https://code.claude.com/docs/en/sub-agents` | external official docs | canonical | 2026-05-01 | high | Automatic delegation, focused subagents, explicit invocation modes, and subagent lifecycle integration | provider-specific | Informed `subagent-fork` shape guidance |
|
|
17
|
+
| `https://code.claude.com/docs/en/hooks` | external official docs | canonical | 2026-05-01 | high | Hook lifecycle, hooks in skills and agents, async constraints, and security requirements | provider-specific and security-sensitive | Informed `hook-backed` shape guidance and safety notes |
|
|
18
|
+
| `https://www.anthropic.com/engineering/building-effective-agents` | external official engineering guidance | canonical | 2026-05-01 | high | Simplicity-first design and workflow taxonomy: prompt chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer | conceptual guidance; adapt to skill authoring rather than full app orchestration | Core source for execution-shape taxonomy |
|
|
19
|
+
| `https://developers.openai.com/api/docs/guides/reasoning-best-practices` | external official docs | canonical | 2026-05-01 | high | Planner/doer distinction, reasoning-vs-GPT model tradeoffs, and avoiding explicit chain-of-thought prompting | provider-specific model guidance; use only as general orchestration input unless exact product syntax matters | Informed reasoning-model and evaluator-loop notes |
|
|
20
|
+
| `https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/` | external official guidance | canonical | 2026-05-01 | high | Maximize a single agent first, use multi-agent only when needed, manager-vs-handoff split, layered guardrails | product-level guidance, not a skills standard | Informed simplicity rule and advanced-shape escalation criteria |
|
|
21
|
+
| `https://openai.github.io/openai-agents-python/agents/` | external official SDK docs | canonical | 2026-05-01 | medium | Manager-vs-handoff distinction and structured-output support | SDK-specific implementation details | Informed router/orchestrator language and contract expectations |
|
|
22
|
+
| `https://openai.github.io/openai-agents-python/handoffs/` | external official SDK docs | canonical | 2026-05-01 | medium | Handoff metadata, input filters, and receiving-agent history control | SDK-specific implementation details | Informed route/handoff contract guidance |
|
|
23
|
+
| `https://huggingface.co/docs/hub/model-cards` | external documentation pattern | secondary | 2026-04-26 | high | Model-card sections for intended use, data, evaluation, limitations, and reproducibility | adapted as documentation prior art, not a skill standard | Inspired `SPEC.md` maintenance contract shape |
|
|
24
|
+
| `https://huggingface.co/docs/hub/en/model-card-annotated` | external documentation pattern | secondary | 2026-04-26 | high | Annotated intended-use, out-of-scope, risks, limitations, and evaluation sections | adapted as documentation prior art, not a skill standard | Informed SPEC scope and limitations sections |
|
|
25
|
+
| `https://cacm.acm.org/research/datasheets-for-datasets/` | research/documentation pattern | secondary | 2026-04-26 | high | Data provenance, collection, composition, intended use, and maintenance transparency | adapted from dataset documentation to skill evidence documentation | Informed source/evidence model and privacy rules |
|
|
26
|
+
| `https://diataxis.fr/` | documentation framework | secondary | 2026-04-26 | high | User-need-centered documentation types: tutorial, how-to, reference, explanation | adapted as information architecture prior art, not a skill standard | Informed reference files as lookup needs rather than topic buckets |
|
|
27
|
+
| `https://dita-lang.org/` | documentation standard | secondary | 2026-04-26 | high | Topic-oriented technical content patterns: task, concept, reference, troubleshooting | adapted as documentation architecture prior art | Informed reference type table and troubleshooting matrix guidance |
|
|
28
|
+
| `https://www.writethedocs.org/guide/writing/docs-principles/` | documentation guidance | secondary | 2026-04-26 | medium | Documentation should be structured for findability, reuse, and user participation | general writing guidance | Cross-check for reference architecture usability |
|
|
29
|
+
| `AGENTS.md` | repo convention | canonical | 2026-05-01 | high | Repository-specific workflow requirements and registration checklist | repository-local policy | Registration + validator expectations |
|
|
30
|
+
| `README.md` | repo convention | canonical | 2026-05-01 | high | Skill table format and authoring conventions | repository-local policy | Registration and discoverability source |
|
|
31
|
+
|
|
32
|
+
## Decisions
|
|
33
|
+
|
|
34
|
+
1. `skill-writer` is a meta-router: it must choose both a skill class and an execution shape before authoring.
|
|
35
|
+
2. Default to the simplest adequate shape. Advanced mechanics require evidence and an explicit reason simpler shapes were rejected.
|
|
36
|
+
3. Skill class and execution shape are independent axes. Class drives coverage requirements; shape drives runtime mechanics and artifact layout.
|
|
37
|
+
4. `SKILL.md` remains the orchestration/index layer; references, scripts, assets, hooks, and subagents are leaves selected by that router.
|
|
38
|
+
5. Provider-specific Claude Code features are valuable but not default. Use them only when justified and record portability implications.
|
|
39
|
+
6. Claude-specific frontmatter guidance should track the current `code.claude.com/docs/en/skills` fields, including `when_to_use`, `arguments`, `effort`, `paths`, `shell`, `context`, `agent`, and `hooks`.
|
|
40
|
+
7. Router, parallel/orchestrator, evaluator-loop, subagent-fork, and hook-backed shapes each require explicit contracts, not just prose.
|
|
41
|
+
8. Hooks are deterministic enforcement and need narrow scope plus security notes because command hooks run with full user permissions.
|
|
42
|
+
9. Multi-agent guidance should distinguish manager/orchestrator, handoff, and isolated subagent execution instead of collapsing them into one pattern.
|
|
43
|
+
10. Reasoning-model guidance is a design option, not a universal default: planner/doer splits are useful when complexity warrants them.
|
|
44
|
+
11. Authoring review should check architectural choices qualitatively; the quick validator remains mechanical.
|
|
45
|
+
12. Reference files remain split by lookup need rather than topic buckets, even as the set of supported shapes expands.
|
|
46
|
+
13. Subfolders inside `references/` are acceptable when they create clearer lookup leaves, but every bundled reference should still be directly discoverable from `SKILL.md`.
|
|
47
|
+
14. The validator should enforce durable SKILL.md frontmatter/YAML identity guarantees, but should not hardcode provider-specific optional frontmatter keys or markdown-content opinions.
|
|
48
|
+
15. `skill-writer` should default to dense structures such as tables, checklists, templates, and I/O examples, and should cut explanatory prose unless it prevents a concrete mistake.
|
|
49
|
+
16. `SKILL.md` should stay a thin router; repeated policy belongs in routed references rather than always-loaded step prose.
|
|
50
|
+
17. Evaluation is conditional and should not be part of the default authoring path unless the user asks for it or the change is genuinely risky.
|
|
51
|
+
|
|
52
|
+
## Coverage matrix
|
|
53
|
+
|
|
54
|
+
| Dimension | Coverage status | Evidence |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| SKILL.md vs references placement | complete | Agent Skills spec, local reference architecture |
|
|
57
|
+
| Reference splitting heuristics | complete | Agent Skills best practices, Diataxis, DITA, local reference architecture and artifact-layout guidance |
|
|
58
|
+
| Long reference navigation | complete | local design principles |
|
|
59
|
+
| Source discovery beyond docs | complete | local synthesis depth gates, repository history practices |
|
|
60
|
+
| Commit log as source material | complete | local source-discovery guidance |
|
|
61
|
+
| Positive/negative evidence storage | complete | local iteration path, prior eval guidance |
|
|
62
|
+
| Skill maintenance specification | complete | model cards, datasheets, local `SPEC.md` reference implementation |
|
|
63
|
+
| Shape-selection framework | complete | Anthropic effective agents, OpenAI practical guide, local execution-shapes guidance |
|
|
64
|
+
| Router/orchestrator/evaluator patterns | complete | Anthropic effective agents, OpenAI agent guides, local workflow-mechanics guidance |
|
|
65
|
+
| Current Claude skill frontmatter and lifecycle mechanics | complete | Claude Code skills docs |
|
|
66
|
+
| Subagent-fork guidance | complete | Claude Code skills docs, subagents docs |
|
|
67
|
+
| Hook-backed guidance and security constraints | complete | Claude Code hooks docs |
|
|
68
|
+
| Script-backed workflow design | complete | Agent Skills using scripts guide |
|
|
69
|
+
| Planner/doer reasoning guidance | complete | OpenAI reasoning best practices |
|
|
70
|
+
| Lookup-oriented reference architecture | complete | Diataxis user needs, DITA topic types, local reference architecture |
|
|
71
|
+
|
|
72
|
+
## Open gaps
|
|
73
|
+
|
|
74
|
+
1. This repository still has few real shipped examples using `hooks`, `context: fork`, `when_to_use`, `arguments`, `paths`, or `effort`.
|
|
75
|
+
2. Public repo docs outside `skill-writer` may need follow-up updates to fully reflect the current Claude-specific skill fields.
|
|
76
|
+
|
|
77
|
+
## Changelog
|
|
78
|
+
|
|
79
|
+
- 2026-03-05: Initialized `SOURCES.md` with baseline source pack (local canonical, Codex upstream, Claude upstream, spec, and repo conventions).
|
|
80
|
+
- 2026-03-19: Clarified path-resolution guidance so bundled skill references stay skill-root-relative while registration steps are resolved from the repository's active layout.
|
|
81
|
+
- 2026-03-19: Made portability a default authoring rule and emphasized avoiding host-specific absolute filesystem paths.
|
|
82
|
+
- 2026-04-19: Updated path guidance to preserve repository-standard root variables such as `${CLAUDE_SKILL_ROOT}` instead of banning them outright.
|
|
83
|
+
- 2026-04-19: Restored `.agents/skills` as the default authoring target and kept repository-specific layouts as an inspected override rather than the default.
|
|
84
|
+
- 2026-04-19: Added explicit prior-art inspection and user-confirmation guidance when the correct skill root is unclear.
|
|
85
|
+
- 2026-04-26: Added reference architecture, source discovery, and iteration evidence guidance; updated synthesis, authoring, and iteration paths to prevent overloaded `SKILL.md` and catch-all reference files.
|
|
86
|
+
- 2026-04-26: Added `SPEC.md` as the canonical `skill-writer` maintenance specification and added `references/spec-template.md` for future skills.
|
|
87
|
+
- 2026-04-26: Removed fixed integration reference filename validation and added length-based reference warnings.
|
|
88
|
+
- 2026-04-26: Reworked reference architecture around concrete lookup needs instead of generic topic buckets.
|
|
89
|
+
- 2026-05-01: Reworked `skill-writer` around explicit execution-shape routing, added shape-specific example profiles, refreshed Claude Code provider mechanics from current official docs, and added eval/source guidance for routing, delegation, hooks, and evaluator loops.
|
|
90
|
+
- 2026-05-01: Replaced generic pattern bucket references with routed leaf files under `references/artifact-layouts/`, `references/workflow-mechanics/`, and `references/claude-code/`; made `SKILL.md` enumerate every bundled reference file with a direct open-when reason.
|
|
91
|
+
- 2026-05-01: Removed the validator's hardcoded optional frontmatter allowlist so provider-specific field drift does not create noisy false warnings.
|
|
92
|
+
- 2026-05-01: Reduced prose-heavy guidance in `skill-writer`, rewrote the main runtime refs into denser tables/checklists, and made compact runtime guidance an explicit contract.
|
|
93
|
+
- 2026-05-01: Thinned `SKILL.md` back toward a true router, removed duplicated execution-shape detail from `mode-selection.md`, and made evaluation conditional instead of a default workflow path.
|
|
94
|
+
- 2026-05-05: Reduced `quick_validate.py` to mechanical SKILL.md frontmatter/YAML and identity checks; markdown content quality now belongs to authoring review.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Skill Writer Specification
|
|
2
|
+
|
|
3
|
+
## Intent
|
|
4
|
+
|
|
5
|
+
`skill-writer` is the canonical workflow for creating, updating, synthesizing, and iteratively improving agent skills in this repository.
|
|
6
|
+
|
|
7
|
+
Its primary purpose is to prevent shallow skill authoring by forcing high-value source coverage, explicit provenance, focused runtime instructions, and validation before completion.
|
|
8
|
+
It is also a meta-router: before authoring, it must choose the simplest adequate execution shape for the target skill and only then decide which artifacts are needed.
|
|
9
|
+
|
|
10
|
+
## Scope
|
|
11
|
+
|
|
12
|
+
In scope:
|
|
13
|
+
|
|
14
|
+
- New skill creation from local, external, or mixed sources.
|
|
15
|
+
- Existing skill updates that affect runtime behavior, structure, trigger precision, references, or validation.
|
|
16
|
+
- Research-first synthesis for proposed skills.
|
|
17
|
+
- Iteration from positive examples, negative examples, review feedback, eval results, and observed agent behavior.
|
|
18
|
+
- Registration and validation for this repository's canonical `skills/<skill-name>/` layout and other discovered layouts.
|
|
19
|
+
- Choosing between execution shapes such as inline guidance, reference-backed expert, script-backed workflow, router, evaluator loop, subagent-fork, hook-backed, asset-template, or hybrids.
|
|
20
|
+
- Assessing when provider-specific mechanics are justified and documenting portability constraints.
|
|
21
|
+
|
|
22
|
+
Out of scope:
|
|
23
|
+
|
|
24
|
+
- Acting as the runtime instructions for the skills it creates.
|
|
25
|
+
- Storing full source inventories, raw examples, or changelog history directly in `SKILL.md`.
|
|
26
|
+
- Replacing repository-level instructions in `AGENTS.md`, `README.md`, or `CONTRIBUTING.md`.
|
|
27
|
+
- Creating per-skill aliases or symlink skills in this repository.
|
|
28
|
+
- Guaranteeing compatibility with provider-specific skill extensions unless they are explicitly scoped and documented.
|
|
29
|
+
|
|
30
|
+
## Users And Trigger Context
|
|
31
|
+
|
|
32
|
+
- Primary users: agents and humans authoring or maintaining reusable agent skills.
|
|
33
|
+
- Common user requests: "create a skill", "write a skill", "update this skill", "improve from examples", "synthesize a skill from docs", "maintain skill docs", or "validate/register this skill".
|
|
34
|
+
- Should not trigger for: ordinary code review, generic documentation edits, PR writing, commit creation, or implementation work that does not create or modify an agent skill.
|
|
35
|
+
|
|
36
|
+
## Runtime Contract
|
|
37
|
+
|
|
38
|
+
- Required first actions:
|
|
39
|
+
- Resolve the target skill root and operation.
|
|
40
|
+
- Inspect local repository conventions before deciding where files belong.
|
|
41
|
+
- Classify the skill and select the minimum required workflow paths.
|
|
42
|
+
- Select a primary execution shape and default to the simplest adequate option.
|
|
43
|
+
- Treat evaluation as conditional rather than a default path.
|
|
44
|
+
- Required outputs:
|
|
45
|
+
- Summary.
|
|
46
|
+
- Changes Made.
|
|
47
|
+
- Validation Results.
|
|
48
|
+
- Open Gaps.
|
|
49
|
+
- Non-negotiable constraints:
|
|
50
|
+
- `SKILL.md` frontmatter is first line and `name` matches the directory.
|
|
51
|
+
- `description` contains realistic trigger language.
|
|
52
|
+
- `SKILL.md` remains an orchestration/index layer for complex skills.
|
|
53
|
+
- Runtime guidance should prefer dense structures such as tables, checklists, templates, and examples over explanatory prose.
|
|
54
|
+
- Material skill changes explicitly name the selected execution shape.
|
|
55
|
+
- Advanced mechanics are justified and include portability notes.
|
|
56
|
+
- Supporting references are focused and loaded conditionally.
|
|
57
|
+
- Source provenance and decisions live in `SOURCES.md`.
|
|
58
|
+
- Durable positive/negative examples live in `references/evidence/`.
|
|
59
|
+
- `SPEC.md` records the maintenance contract for new or materially changed skills.
|
|
60
|
+
- Validation runs before completion.
|
|
61
|
+
- Expected bundled files loaded at runtime:
|
|
62
|
+
- `references/mode-selection.md`
|
|
63
|
+
- `references/execution-shapes.md`
|
|
64
|
+
- `references/synthesis-path.md`
|
|
65
|
+
- `references/iteration-path.md`
|
|
66
|
+
- `references/authoring-path.md`
|
|
67
|
+
- `references/reference-architecture.md`
|
|
68
|
+
- `references/spec-template.md`
|
|
69
|
+
- `references/description-optimization.md`
|
|
70
|
+
- `references/evaluation-path.md` when the user asks for evaluation, the change is high-risk, or the architecture choice is non-obvious
|
|
71
|
+
- `references/registration-validation.md`
|
|
72
|
+
- `references/artifact-layouts/*.md`
|
|
73
|
+
- `references/workflow-mechanics/*.md`
|
|
74
|
+
- `references/claude-code/*.md`
|
|
75
|
+
- `references/examples/*.md`
|
|
76
|
+
- `scripts/quick_validate.py`
|
|
77
|
+
|
|
78
|
+
## Source And Evidence Model
|
|
79
|
+
|
|
80
|
+
Authoritative sources:
|
|
81
|
+
|
|
82
|
+
- Local `skill-writer` runtime files: `SKILL.md`, `references/**/*.md`, `scripts/quick_validate.py`.
|
|
83
|
+
- Repository policy: `AGENTS.md`, `README.md`, `CONTRIBUTING.md`, plugin manifests, and registration settings.
|
|
84
|
+
- Agent Skills specification and official skill authoring guidance.
|
|
85
|
+
- Current official provider docs for any provider-specific mechanics being recommended.
|
|
86
|
+
- Official orchestration guidance for routing, delegation, evaluation loops, and reasoning-model planning patterns.
|
|
87
|
+
|
|
88
|
+
Useful improvement sources:
|
|
89
|
+
|
|
90
|
+
- positive examples: successful generated skills, review-approved skill changes, and eval passes that demonstrate desired behavior
|
|
91
|
+
- negative examples: shallow generated skills, overloaded `SKILL.md` files, catch-all references, missing provenance, failed validation, false triggers, or review feedback
|
|
92
|
+
- commit logs/changelogs: repeated fixes, reversions, migrations, and changes that explain why a rule exists
|
|
93
|
+
- issue or PR feedback: reviewer comments about missing coverage, confusing trigger language, poor file placement, or insufficient evaluation
|
|
94
|
+
- eval results: fixed prompt sets in `EVAL.md`, qualitative depth checks, and optional baseline-vs-with-skill runs
|
|
95
|
+
|
|
96
|
+
Data that must not be stored:
|
|
97
|
+
|
|
98
|
+
- secrets, credentials, or tokens
|
|
99
|
+
- raw customer data
|
|
100
|
+
- private URLs or identifiers that are not needed for reproduction
|
|
101
|
+
- large copied source documents or long copyrighted excerpts
|
|
102
|
+
- unredacted personal data from examples, logs, issues, or commits
|
|
103
|
+
|
|
104
|
+
## Reference Architecture
|
|
105
|
+
|
|
106
|
+
- `SKILL.md` contains the top-level workflow, path-loading table, branch points, universal constraints, and output contract.
|
|
107
|
+
- `SKILL.md` acts as a meta-router for the authoring process: class selection, shape selection, and path selection happen before writing.
|
|
108
|
+
- `SPEC.md` contains this maintenance specification.
|
|
109
|
+
- `SOURCES.md` contains source inventory, decisions, coverage matrix, open gaps, and changelog.
|
|
110
|
+
- `EVAL.md` contains reusable evaluation prompts and deeper eval runbooks.
|
|
111
|
+
- `references/` contains focused workflow guidance, routed leaf references, templates, rubrics, and class-specific authoring requirements.
|
|
112
|
+
- `references/` may use subfolders when they create clearer leaf routing, but every bundled reference should still be directly routed from `SKILL.md`.
|
|
113
|
+
- `references/evidence/` contains durable positive/negative examples when future iterations need them.
|
|
114
|
+
- `scripts/` contains validation automation.
|
|
115
|
+
- `assets/` is unused unless a future skill-authoring workflow needs static templates or media.
|
|
116
|
+
|
|
117
|
+
## Evaluation
|
|
118
|
+
|
|
119
|
+
- Lightweight validation:
|
|
120
|
+
- Run `uv run <skill-writer-root>/scripts/quick_validate.py <skill-writer-root> --skill-class skill-authoring --strict-depth` as a frontmatter/YAML smoke check.
|
|
121
|
+
- Inspect changed references qualitatively for focused scope, direct discoverability, and absence of host-specific paths.
|
|
122
|
+
- Verify that the selected execution shape is explicit and that advanced mechanics, if any, are justified.
|
|
123
|
+
- Deeper evaluation:
|
|
124
|
+
- Use `references/evaluation-path.md` and `EVAL.md` only when the user requests it, the change is high-risk, or the architectural choice needs verification.
|
|
125
|
+
- Compare behavior before and after changes with representative positive and negative prompts.
|
|
126
|
+
- Include shape-selection prompts when the change affects routing, delegation, hooks, or evaluator loops.
|
|
127
|
+
- Holdout examples:
|
|
128
|
+
- Keep durable holdout examples in `references/evidence/holdout-set.md` when repeated regressions appear.
|
|
129
|
+
- Do not tune directly against holdout examples until they are intentionally moved to the working set.
|
|
130
|
+
- Acceptance gates:
|
|
131
|
+
- Validator passes with no errors for SKILL.md frontmatter/YAML and identity fields.
|
|
132
|
+
- New or changed workflow rules are represented in the correct artifact.
|
|
133
|
+
- `SOURCES.md` records source-backed decisions and any remaining gaps.
|
|
134
|
+
- `SPEC.md` is updated when intent, scope, evidence model, evaluation, or maintenance expectations change.
|
|
135
|
+
|
|
136
|
+
## Known Limitations
|
|
137
|
+
|
|
138
|
+
- The validator intentionally checks only SKILL.md frontmatter/YAML and identity fields; markdown content quality belongs to authoring review.
|
|
139
|
+
- The validator does not verify advanced-shape contracts, reference completeness, source depth, prose density, or `SPEC.md` heading templates.
|
|
140
|
+
- The validator intentionally does not hardcode or exhaustively validate provider-specific optional frontmatter fields.
|
|
141
|
+
- Deeper evals are opt-in unless risk or user request justifies the extra cost.
|
|
142
|
+
- Source discovery can still miss private operational knowledge if it is not present in local files, accessible issue/PR history, or supplied context.
|
|
143
|
+
- Provider-specific skill extensions may drift; `skill-writer` treats them as compatibility guidance unless a skill is intentionally provider-specific.
|
|
144
|
+
|
|
145
|
+
## Maintenance Notes
|
|
146
|
+
|
|
147
|
+
- Update `SKILL.md` when the required runtime workflow, branch conditions, or output contract changes.
|
|
148
|
+
- Update `references/execution-shapes.md` when new skill mechanics or orchestration patterns become important.
|
|
149
|
+
- Update the relevant file under `references/artifact-layouts/`, `references/workflow-mechanics/`, or `references/claude-code/` when a specific routed leaf changes.
|
|
150
|
+
- Update `SPEC.md` when intent, scope, user/trigger context, evidence model, evaluation gates, limitations, or maintenance rules change.
|
|
151
|
+
- Update `SOURCES.md` when source inventory, decisions, coverage, gaps, or changelog entries change.
|
|
152
|
+
- Update `EVAL.md` when reusable evaluation prompts or runbooks change.
|
|
153
|
+
- Update `references/evidence/` when preserving examples for future iteration or regression tracking.
|
package/src/internal-skills/skill-writer/references/artifact-layouts/argument-driven-skill-layout.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Argument-Driven Skill Layout
|
|
2
|
+
|
|
3
|
+
Use this layout when the skill is normally invoked with explicit inputs such as issue numbers, paths, modes, or targets.
|
|
4
|
+
|
|
5
|
+
## Choose this layout when
|
|
6
|
+
|
|
7
|
+
- the user supplies parameters directly
|
|
8
|
+
- empty-input behavior needs to be defined
|
|
9
|
+
- manual invocation is safer than automatic activation
|
|
10
|
+
|
|
11
|
+
## Common layout
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
---
|
|
15
|
+
name: fix-issue
|
|
16
|
+
description: Fix a GitHub issue by number. Use when asked to fix or resolve a specific issue.
|
|
17
|
+
argument-hint: "[issue-number]"
|
|
18
|
+
disable-model-invocation: true
|
|
19
|
+
---
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Required contract
|
|
23
|
+
|
|
24
|
+
1. Document expected arguments and empty-input behavior.
|
|
25
|
+
2. Use manual-only invocation when side effects are substantial.
|
|
26
|
+
3. Use named or positional arguments only when they improve clarity.
|
|
27
|
+
4. Add portability notes if the argument syntax depends on provider-specific mechanics.
|
|
28
|
+
|
|
29
|
+
## Also load
|
|
30
|
+
|
|
31
|
+
- `references/claude-code/argument-substitutions.md` when using Claude Code substitutions or named arguments
|
|
32
|
+
- `references/claude-code/frontmatter-and-invocation.md` when invocation control needs provider-specific fields
|
package/src/internal-skills/skill-writer/references/artifact-layouts/asset-template-skill-layout.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Asset-Template Skill Layout
|
|
2
|
+
|
|
3
|
+
Use this layout when reusable templates, schemas, or static artifacts carry most of the skill's value.
|
|
4
|
+
|
|
5
|
+
## Choose this layout when
|
|
6
|
+
|
|
7
|
+
- the skill fills in or adapts reusable artifacts
|
|
8
|
+
- the runtime procedure is small compared to the bundled assets
|
|
9
|
+
- output quality depends on stable templates or schemas
|
|
10
|
+
|
|
11
|
+
## File layout
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
my-skill/
|
|
15
|
+
├── SKILL.md
|
|
16
|
+
└── assets/
|
|
17
|
+
├── template.md
|
|
18
|
+
└── schema.json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Required contract
|
|
22
|
+
|
|
23
|
+
1. `SKILL.md` tells the agent when to load each asset.
|
|
24
|
+
2. The skill explains how to adapt placeholders or fields.
|
|
25
|
+
3. Add a validation checklist when filled-in output can silently drift.
|
|
26
|
+
|
|
27
|
+
## Avoid this layout when
|
|
28
|
+
|
|
29
|
+
- the template is small enough to stay inline
|
|
30
|
+
- the asset is just an attachment with no routing or reuse value
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Inline Skill Layout
|
|
2
|
+
|
|
3
|
+
Use this layout when one coherent policy, checklist, or procedure fits directly in `SKILL.md`.
|
|
4
|
+
|
|
5
|
+
## Choose this layout when
|
|
6
|
+
|
|
7
|
+
- the skill has one dominant path
|
|
8
|
+
- every invocation needs roughly the same instructions
|
|
9
|
+
- deep optional knowledge is not the main problem
|
|
10
|
+
|
|
11
|
+
## File layout
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
my-skill/
|
|
15
|
+
└── SKILL.md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Required contract
|
|
19
|
+
|
|
20
|
+
1. Keep the body small enough to scan in one read.
|
|
21
|
+
2. Put all universal steps in `SKILL.md`.
|
|
22
|
+
3. Add references only if a real branch or lookup need appears.
|
|
23
|
+
|
|
24
|
+
## Avoid this layout when
|
|
25
|
+
|
|
26
|
+
- most invocations need only a subset of a large knowledge base
|
|
27
|
+
- scripts or validators carry important runtime behavior
|
|
28
|
+
- routing or iterative evaluation is central to the skill
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Reference-Backed Skill Layout
|
|
2
|
+
|
|
3
|
+
Use this layout when the skill needs deep knowledge, but most runs only need one branch or subset of that knowledge.
|
|
4
|
+
|
|
5
|
+
## Choose this layout when
|
|
6
|
+
|
|
7
|
+
- `SKILL.md` can act as a router
|
|
8
|
+
- bundled references can stay focused by lookup need
|
|
9
|
+
- the complexity is optional knowledge, not heavy automation
|
|
10
|
+
|
|
11
|
+
## File layout
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
my-skill/
|
|
15
|
+
├── SKILL.md
|
|
16
|
+
└── references/
|
|
17
|
+
├── focused-topic-a.md
|
|
18
|
+
├── focused-topic-b.md
|
|
19
|
+
└── troubleshooting.md
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Subfolders are acceptable when they make the lookup path clearer, for example `references/api/` or `references/examples/`.
|
|
23
|
+
|
|
24
|
+
## Required contract
|
|
25
|
+
|
|
26
|
+
1. `SKILL.md` tells the agent exactly when to open each reference.
|
|
27
|
+
2. Reference filenames predict their contents.
|
|
28
|
+
3. No reference mixes routing, troubleshooting, examples, and source notes without a clear reason.
|
|
29
|
+
4. Large references include navigation or are split further.
|
|
30
|
+
|
|
31
|
+
## Avoid this layout when
|
|
32
|
+
|
|
33
|
+
- the skill is small enough to stay inline
|
|
34
|
+
- scripts or validators are central to execution
|
|
35
|
+
- the references would only exist as vague topic buckets
|
package/src/internal-skills/skill-writer/references/artifact-layouts/script-backed-skill-layout.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Script-Backed Skill Layout
|
|
2
|
+
|
|
3
|
+
Use this layout when parsing, validation, APIs, or repeatable transformations are fragile in plain shell or prose alone.
|
|
4
|
+
|
|
5
|
+
## Choose this layout when
|
|
6
|
+
|
|
7
|
+
- the skill benefits from deterministic automation
|
|
8
|
+
- repeated shell snippets would be brittle
|
|
9
|
+
- validation or data extraction should be reusable
|
|
10
|
+
|
|
11
|
+
## File layout
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
my-skill/
|
|
15
|
+
├── SKILL.md
|
|
16
|
+
└── scripts/
|
|
17
|
+
├── fetch.py
|
|
18
|
+
└── validate.py
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Required contract
|
|
22
|
+
|
|
23
|
+
1. Every script is named in `SKILL.md` with arguments, outputs, and fallback behavior.
|
|
24
|
+
2. Scripts are non-interactive.
|
|
25
|
+
3. Standard output is structured when practical.
|
|
26
|
+
4. The skill explains what to do if a script fails or is unavailable.
|
|
27
|
+
|
|
28
|
+
## Avoid this layout when
|
|
29
|
+
|
|
30
|
+
- one simple shell command is enough
|
|
31
|
+
- the "script" would only wrap trivial shell for no reliability gain
|