@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,91 @@
|
|
|
1
|
+
# Authoring Path
|
|
2
|
+
|
|
3
|
+
Use this path to create or update skill files.
|
|
4
|
+
|
|
5
|
+
## Runtime Writing Rules
|
|
6
|
+
|
|
7
|
+
1. Frontmatter must be first line.
|
|
8
|
+
2. `name` must match the directory.
|
|
9
|
+
3. `description` must contain realistic trigger language.
|
|
10
|
+
4. Keep runtime guidance imperative and compact.
|
|
11
|
+
5. Prefer tables, checklists, templates, and examples over prose.
|
|
12
|
+
6. Use `SKILL.md` as the runtime decision layer for complex skills.
|
|
13
|
+
|
|
14
|
+
## Path Rules
|
|
15
|
+
|
|
16
|
+
1. Treat the skill directory as the root for bundled files.
|
|
17
|
+
2. Use `references/...`, `scripts/...`, and `assets/...` paths by default.
|
|
18
|
+
3. Reserve repo-root paths for registration instructions only.
|
|
19
|
+
4. Follow repo prior art if the workspace already standardizes on a provider-specific path variable.
|
|
20
|
+
5. Avoid host-specific absolute filesystem paths.
|
|
21
|
+
|
|
22
|
+
## Supporting Files
|
|
23
|
+
|
|
24
|
+
Create only what the skill needs:
|
|
25
|
+
|
|
26
|
+
| File or dir | Use |
|
|
27
|
+
|-------------|-----|
|
|
28
|
+
| `SPEC.md` | maintenance contract |
|
|
29
|
+
| `references/` | optional depth loaded by route |
|
|
30
|
+
| `references/evidence/` | persistent iteration examples |
|
|
31
|
+
| `scripts/` | repeatable automation or validation |
|
|
32
|
+
| `assets/` | reusable templates or static artifacts |
|
|
33
|
+
|
|
34
|
+
Subfolders inside `references/` are acceptable only when they make the lookup path clearer.
|
|
35
|
+
|
|
36
|
+
## File Creation Rules
|
|
37
|
+
|
|
38
|
+
1. Read `references/reference-architecture.md` before adding bundled files.
|
|
39
|
+
2. Create a new reference only when it has a clear "open when..." reason.
|
|
40
|
+
3. If you add a bundled reference, add a direct routing entry for it in `SKILL.md`.
|
|
41
|
+
4. Do not create catch-all docs that mix workflow, source notes, examples, and eval results.
|
|
42
|
+
5. Keep provenance in `SOURCES.md`, not in runtime files.
|
|
43
|
+
6. Update `SPEC.md` when the skill contract changes materially.
|
|
44
|
+
|
|
45
|
+
## Class-Specific Requirements
|
|
46
|
+
|
|
47
|
+
### `integration-documentation`
|
|
48
|
+
|
|
49
|
+
Require focused coverage for:
|
|
50
|
+
|
|
51
|
+
1. API surface and behavior contracts
|
|
52
|
+
2. config/runtime options
|
|
53
|
+
3. common downstream use cases
|
|
54
|
+
4. known issues and workarounds
|
|
55
|
+
5. version or migration variance
|
|
56
|
+
|
|
57
|
+
Default minimum depth:
|
|
58
|
+
|
|
59
|
+
1. at least 6 concrete downstream use cases
|
|
60
|
+
2. at least 8 issue/fix or failure/workaround entries
|
|
61
|
+
|
|
62
|
+
## Shape-Specific Requirements
|
|
63
|
+
|
|
64
|
+
| Shape | Require |
|
|
65
|
+
|-------|---------|
|
|
66
|
+
| `router` | route criteria, fallback, per-route contract, misroute recovery |
|
|
67
|
+
| `script-backed-workflow` | documented scripts, non-interactive execution, structured output, fallback |
|
|
68
|
+
| `parallelization` / `orchestrator-workers` | unit of work, worker output schema, merge rule, stop condition |
|
|
69
|
+
| `evaluator-optimizer` | rubric, stop rule, acceptance condition, evidence handling |
|
|
70
|
+
| `subagent-fork` | actionable task, return contract, isolation reason, portability note |
|
|
71
|
+
| `hook-backed` | event scope, side-effect boundary, fallback, safety note |
|
|
72
|
+
| `asset-template` | asset routing, placeholder guidance, validation checklist when needed |
|
|
73
|
+
| `argument-driven` | expected arguments, empty-input behavior, manual-only use when risky |
|
|
74
|
+
|
|
75
|
+
## Example Requirements
|
|
76
|
+
|
|
77
|
+
Authoring or generator skills should include:
|
|
78
|
+
|
|
79
|
+
1. happy-path example
|
|
80
|
+
2. secure or robust variant
|
|
81
|
+
3. anti-pattern plus correction
|
|
82
|
+
|
|
83
|
+
Do not accept abstract-only guidance when a concrete example is needed.
|
|
84
|
+
|
|
85
|
+
## Required Output
|
|
86
|
+
|
|
87
|
+
- updated `SKILL.md`
|
|
88
|
+
- updated `SPEC.md` when required
|
|
89
|
+
- updated or added supporting files
|
|
90
|
+
- explanation of major authoring decisions
|
|
91
|
+
- description-optimization handoff
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Claude Argument Substitutions
|
|
2
|
+
|
|
3
|
+
Load this when the skill uses Claude Code argument fields or substitution variables.
|
|
4
|
+
|
|
5
|
+
## Supported substitutions
|
|
6
|
+
|
|
7
|
+
- `$ARGUMENTS`
|
|
8
|
+
- `$ARGUMENTS[N]`
|
|
9
|
+
- `$N`
|
|
10
|
+
- named arguments such as `$issue` when `arguments` is declared
|
|
11
|
+
- `${CLAUDE_SESSION_ID}`
|
|
12
|
+
- `${CLAUDE_EFFORT}`
|
|
13
|
+
- `${CLAUDE_SKILL_DIR}`
|
|
14
|
+
|
|
15
|
+
## Required contract
|
|
16
|
+
|
|
17
|
+
1. Document expected arguments and empty-input behavior.
|
|
18
|
+
2. Add quoting-aware examples for multi-word input when ambiguity is likely.
|
|
19
|
+
3. Use manual-only invocation for side-effect-heavy argument-driven skills.
|
|
20
|
+
4. Add portability notes because this syntax is Claude Code-specific.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Claude Dynamic Context Injection
|
|
2
|
+
|
|
3
|
+
Load this when the skill uses Claude Code shell preprocessing with ``!`command` `` or fenced ````!` blocks.
|
|
4
|
+
|
|
5
|
+
## Use this file for
|
|
6
|
+
|
|
7
|
+
- stable, high-signal preprocessing
|
|
8
|
+
- small dynamic snippets that are cheaper than adding a full script
|
|
9
|
+
|
|
10
|
+
## Use sparingly
|
|
11
|
+
|
|
12
|
+
1. Only inject output that is stable, high-signal, and cheap.
|
|
13
|
+
2. Never inject large or noisy output.
|
|
14
|
+
3. Prefer a normal script or tool call when that is easier to reason about.
|
|
15
|
+
|
|
16
|
+
Treat this as preprocessing, not model behavior, and add portability notes because it is Claude Code-specific.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Claude Frontmatter And Invocation
|
|
2
|
+
|
|
3
|
+
Load this when the skill needs Claude Code-specific frontmatter or invocation control.
|
|
4
|
+
|
|
5
|
+
## Use this file for
|
|
6
|
+
|
|
7
|
+
- extra trigger metadata
|
|
8
|
+
- invocation visibility rules
|
|
9
|
+
- skill-scoped model or effort overrides
|
|
10
|
+
- path or shell activation controls
|
|
11
|
+
|
|
12
|
+
## Relevant fields
|
|
13
|
+
|
|
14
|
+
| Field | Purpose | Notes |
|
|
15
|
+
|-------|---------|-------|
|
|
16
|
+
| `when_to_use` | extra trigger context for Claude | additive only; keep trigger-rich language in `description` |
|
|
17
|
+
| `disable-model-invocation` | only the user can invoke | good for side-effect-heavy workflows |
|
|
18
|
+
| `user-invocable` | hide from `/` menu and let Claude invoke | good for passive background knowledge |
|
|
19
|
+
| `allowed-tools` | pre-approve tools while skill is active | provider-specific |
|
|
20
|
+
| `model` | skill-scoped model override | provider-specific |
|
|
21
|
+
| `effort` | skill-scoped effort override | provider-specific |
|
|
22
|
+
| `paths` | glob-based activation limits | provider-specific |
|
|
23
|
+
| `shell` | shell for `!` preprocessing | provider-specific |
|
|
24
|
+
|
|
25
|
+
## Invocation rules
|
|
26
|
+
|
|
27
|
+
1. If Claude should not decide when to run the skill, set `disable-model-invocation: true`.
|
|
28
|
+
2. If the skill is not a meaningful command for humans, consider `user-invocable: false`.
|
|
29
|
+
3. Keep trigger-rich language in `description` even if `when_to_use` is present.
|
|
30
|
+
|
|
31
|
+
## Portability rule
|
|
32
|
+
|
|
33
|
+
When using any Claude-specific field, say why it is necessary and note that it is not portable Agent Skills behavior.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Claude Hook-Backed Skills
|
|
2
|
+
|
|
3
|
+
Load this when the skill uses Claude Code hooks for deterministic enforcement around tool or lifecycle events.
|
|
4
|
+
|
|
5
|
+
## Use this file for
|
|
6
|
+
|
|
7
|
+
- pre-tool validation for risky commands
|
|
8
|
+
- post-edit formatting or linting
|
|
9
|
+
- scoped guardrails around specific tool events
|
|
10
|
+
|
|
11
|
+
## Required contract
|
|
12
|
+
|
|
13
|
+
1. Narrow event and matcher scope.
|
|
14
|
+
2. Explicit side-effect boundaries.
|
|
15
|
+
3. Fallback behavior when hooks are unavailable.
|
|
16
|
+
4. Security note for shell execution, path handling, and sensitive files.
|
|
17
|
+
|
|
18
|
+
## Security rules
|
|
19
|
+
|
|
20
|
+
1. Command hooks run with full user permissions.
|
|
21
|
+
2. Validate and sanitize inputs.
|
|
22
|
+
3. Use absolute paths for scripts inside the hook definition.
|
|
23
|
+
4. Avoid sensitive files such as `.env`, `.git/`, and keys.
|
|
24
|
+
5. Test hooks before treating them as trusted enforcement.
|
|
25
|
+
|
|
26
|
+
## Async note
|
|
27
|
+
|
|
28
|
+
Async hooks cannot block the action that triggered them; they are not a substitute for synchronous validation.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Claude Subagent-Fork Skills
|
|
2
|
+
|
|
3
|
+
Load this when the skill should run in isolated context with `context: fork`.
|
|
4
|
+
|
|
5
|
+
## Use this file for
|
|
6
|
+
|
|
7
|
+
- self-contained delegated investigations
|
|
8
|
+
- isolated context for focus or permission boundaries
|
|
9
|
+
- model or tool specialization where the main thread only needs a summary
|
|
10
|
+
|
|
11
|
+
## Required contract
|
|
12
|
+
|
|
13
|
+
1. An actionable task in the skill body.
|
|
14
|
+
2. Expected return or summary contract.
|
|
15
|
+
3. Explicit reason isolation is useful.
|
|
16
|
+
4. Portability note because this is Claude Code-specific.
|
|
17
|
+
|
|
18
|
+
## Avoid when
|
|
19
|
+
|
|
20
|
+
1. The skill is passive conventions or reference material.
|
|
21
|
+
2. The task depends heavily on the current conversation history.
|
|
22
|
+
3. The main value comes from inline collaboration rather than delegation.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Description Optimization
|
|
2
|
+
|
|
3
|
+
Use this path to improve skill triggering quality and reduce false matches.
|
|
4
|
+
|
|
5
|
+
## Trigger quality loop
|
|
6
|
+
|
|
7
|
+
1. Draft a description with realistic user language and concrete trigger phrases.
|
|
8
|
+
2. Build two query sets:
|
|
9
|
+
- should-trigger queries
|
|
10
|
+
- should-not-trigger queries
|
|
11
|
+
3. Evaluate the current description against both sets.
|
|
12
|
+
4. Edit description wording to improve precision/recall.
|
|
13
|
+
5. Repeat until false positives and false negatives are reduced to acceptable levels.
|
|
14
|
+
|
|
15
|
+
## Authoring rules
|
|
16
|
+
|
|
17
|
+
1. Keep the description in third person.
|
|
18
|
+
2. Include what the skill does and when to use it.
|
|
19
|
+
3. Avoid implementation details that do not help triggering.
|
|
20
|
+
4. Avoid provider-specific phrasing unless the skill is intentionally provider-specific.
|
|
21
|
+
5. For provider-agnostic skills, avoid naming Claude, Codex, or any provider in ways that would narrow portability expectations.
|
|
22
|
+
|
|
23
|
+
## Required output
|
|
24
|
+
|
|
25
|
+
- Final description text
|
|
26
|
+
- should-trigger query set
|
|
27
|
+
- should-not-trigger query set
|
|
28
|
+
- Summary of edits made to improve trigger behavior
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Skill Design Principles
|
|
2
|
+
|
|
3
|
+
Use this guide to keep skill instructions dense, scannable, and worth their token cost.
|
|
4
|
+
|
|
5
|
+
## Core Rule
|
|
6
|
+
|
|
7
|
+
- Every line should help the agent decide, do, or verify something.
|
|
8
|
+
- Prefer tables, checklists, templates, and input/output examples over explanatory prose.
|
|
9
|
+
- Keep rationale to one short sentence unless the agent is likely to make the wrong choice without it.
|
|
10
|
+
|
|
11
|
+
## Add Vs Cut
|
|
12
|
+
|
|
13
|
+
| Keep | Cut |
|
|
14
|
+
|------|-----|
|
|
15
|
+
| project-specific conventions | generic background the agent already knows |
|
|
16
|
+
| non-obvious gotchas | motivational filler |
|
|
17
|
+
| exact commands, schemas, and templates | repeated restatements of the same rule |
|
|
18
|
+
| branch logic and defaults | long essays where a table would work |
|
|
19
|
+
| one strong example | multiple weak examples saying the same thing |
|
|
20
|
+
|
|
21
|
+
## Match Structure To Fragility
|
|
22
|
+
|
|
23
|
+
| Fragility | Preferred structure | Avoid |
|
|
24
|
+
|-----------|---------------------|-------|
|
|
25
|
+
| high | exact steps, strict templates, validation gates | open-ended guidance |
|
|
26
|
+
| medium | short checklist plus examples | long rationale-heavy prose |
|
|
27
|
+
| low | brief goals and constraints | overspecified playbooks |
|
|
28
|
+
|
|
29
|
+
## Preferred Instruction Shapes
|
|
30
|
+
|
|
31
|
+
| Need | Preferred shape |
|
|
32
|
+
|------|-----------------|
|
|
33
|
+
| choose a path | decision table |
|
|
34
|
+
| do a repeatable task | numbered checklist |
|
|
35
|
+
| enforce output structure | template or schema |
|
|
36
|
+
| show style or tone | input/output examples |
|
|
37
|
+
| diagnose failures | symptom/cause/fix matrix |
|
|
38
|
+
| communicate exact facts | compact reference table |
|
|
39
|
+
|
|
40
|
+
## Description Rules
|
|
41
|
+
|
|
42
|
+
- Keep `description` in third person.
|
|
43
|
+
- Put trigger language in `description`, not the body.
|
|
44
|
+
- Front-load what the skill does and when to use it.
|
|
45
|
+
- Do not spend description space on internals unless they improve triggering.
|
|
46
|
+
|
|
47
|
+
## Runtime Writing Rules
|
|
48
|
+
|
|
49
|
+
- Use imperative voice.
|
|
50
|
+
- State one default path before mentioning alternatives.
|
|
51
|
+
- Use one term per concept; do not rotate synonyms.
|
|
52
|
+
- Put universal rules in `SKILL.md`; put optional depth in routed refs.
|
|
53
|
+
- If a section is mostly explanation, cut it or replace it with a denser structure.
|
|
54
|
+
|
|
55
|
+
## Reference Rules
|
|
56
|
+
|
|
57
|
+
- Reference filenames should predict their contents.
|
|
58
|
+
- Each reference should answer one lookup question.
|
|
59
|
+
- Subfolders are acceptable only when they make the lookup path clearer.
|
|
60
|
+
- Every bundled reference should have a direct "open when..." entry in `SKILL.md`.
|
|
61
|
+
- Do not create catch-all files for notes, context, or mixed patterns.
|
|
62
|
+
|
|
63
|
+
## Independence And Portability
|
|
64
|
+
|
|
65
|
+
- Do not require another skill by name at runtime.
|
|
66
|
+
- Use skill-root-relative paths by default.
|
|
67
|
+
- Reuse established repo-specific path variables only when the repo already standardizes on them.
|
|
68
|
+
- Label provider-specific mechanics explicitly and add portability notes when they matter.
|
|
69
|
+
|
|
70
|
+
## Long Files
|
|
71
|
+
|
|
72
|
+
- Keep `SKILL.md` short enough to scan as a router.
|
|
73
|
+
- For references over 100 lines, add `## Contents`.
|
|
74
|
+
- If a reference grows because it mixes multiple lookup needs, split it.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Evaluation Path
|
|
2
|
+
|
|
3
|
+
Load this only when the user asks for evaluation, the change is high-risk, or you need to verify a non-obvious architectural choice.
|
|
4
|
+
|
|
5
|
+
## Default approach (lightweight, guidance-only)
|
|
6
|
+
|
|
7
|
+
If you do run evaluation, start here:
|
|
8
|
+
|
|
9
|
+
1. Define representative prompts for the target skill task.
|
|
10
|
+
2. Compare observed behavior before/after edits in concise notes.
|
|
11
|
+
3. For material skill changes, judge the architectural choice as well as the prose:
|
|
12
|
+
- class selection: pass/fail
|
|
13
|
+
- execution shape selection: pass/fail
|
|
14
|
+
- reference routing clarity: pass/fail
|
|
15
|
+
- advanced mechanics justification: pass/fail
|
|
16
|
+
- portability/fallback notes: pass/fail
|
|
17
|
+
4. Mark outcomes as improved, unchanged, or regressed.
|
|
18
|
+
5. Record unresolved weaknesses and next steps.
|
|
19
|
+
|
|
20
|
+
For `integration-documentation` and `skill-authoring` skills, include a concise depth rubric:
|
|
21
|
+
|
|
22
|
+
1. API surface coverage: pass/fail.
|
|
23
|
+
2. Known issues/workarounds coverage: pass/fail.
|
|
24
|
+
3. Common use-case coverage: pass/fail.
|
|
25
|
+
4. Gap handling quality (explicit next retrieval actions for partials): pass/fail.
|
|
26
|
+
|
|
27
|
+
## Deeper eval playbook (optional)
|
|
28
|
+
|
|
29
|
+
Use this only when:
|
|
30
|
+
|
|
31
|
+
1. The user requests rigorous evals.
|
|
32
|
+
2. The skill is high-risk or high-cost if wrong.
|
|
33
|
+
3. You need regression-tracking over time.
|
|
34
|
+
|
|
35
|
+
Suggested workflow:
|
|
36
|
+
|
|
37
|
+
1. Build a prompt set with positives, implicit triggers, negatives, and wrong-shape temptations.
|
|
38
|
+
2. Capture deterministic run traces (for example `codex exec --json`).
|
|
39
|
+
3. Apply machine-checkable rubric/schema checks (for example `--output-schema` where applicable).
|
|
40
|
+
4. Compare baseline vs updated behavior and report deltas.
|
|
41
|
+
|
|
42
|
+
For advanced shapes, add targeted checks:
|
|
43
|
+
|
|
44
|
+
1. routers: should-route and should-not-route prompts
|
|
45
|
+
2. evaluator loops: stop-condition and acceptance checks
|
|
46
|
+
3. subagent-fork skills: task-oriented prompt vs passive-guidance negative
|
|
47
|
+
4. hook-backed skills: fallback behavior and security-note presence
|
|
48
|
+
|
|
49
|
+
## Optional quantitative benchmark
|
|
50
|
+
|
|
51
|
+
Run only when explicitly requested or when objective scoring is practical.
|
|
52
|
+
|
|
53
|
+
1. Define baseline (without skill guidance).
|
|
54
|
+
2. Define with-skill run.
|
|
55
|
+
3. Use the same prompt set and scoring rubric for both.
|
|
56
|
+
4. Report deltas and confidence in the result.
|
|
57
|
+
|
|
58
|
+
Do not block completion on deeper evals unless the user asks for them.
|
|
59
|
+
|
|
60
|
+
## Canonical eval prompts
|
|
61
|
+
|
|
62
|
+
Keep reusable, copy/paste eval prompts in `../EVAL.md`.
|
|
63
|
+
Use those prompts when you need a repeatable depth check against `skill-writer`.
|
|
64
|
+
|
|
65
|
+
## Agent-agnostic requirement
|
|
66
|
+
|
|
67
|
+
Keep evaluation instructions tool-agnostic so they work in both Codex and Claude environments.
|
|
68
|
+
|
|
69
|
+
## Required Output
|
|
70
|
+
|
|
71
|
+
- Qualitative evaluation summary
|
|
72
|
+
- Deeper eval or quantitative summary (optional, if run)
|
|
73
|
+
- Final acceptance decision and residual risks
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Case Study: Documentation Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: create a skill that helps an agent answer and author code for a library without repeatedly re-reading upstream docs.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case used breadth-first source collection and only stopped when new retrieval yielded mostly duplicates:
|
|
10
|
+
|
|
11
|
+
1. Official docs landing pages and navigation trees.
|
|
12
|
+
2. All API/class/module reference pages.
|
|
13
|
+
3. Configuration and environment reference pages.
|
|
14
|
+
4. Official examples/tutorials.
|
|
15
|
+
5. Troubleshooting/error catalog pages.
|
|
16
|
+
6. Migration/deprecation/changelog pages.
|
|
17
|
+
7. Upstream repo README plus canonical examples.
|
|
18
|
+
8. In-repo usage of the library (`rg` on imports and key APIs).
|
|
19
|
+
|
|
20
|
+
## Coverage matrix used
|
|
21
|
+
|
|
22
|
+
Required dimensions tracked during synthesis:
|
|
23
|
+
|
|
24
|
+
1. Setup and installation.
|
|
25
|
+
2. Core primitives and API surface.
|
|
26
|
+
3. Configuration and runtime options.
|
|
27
|
+
4. Normal usage patterns.
|
|
28
|
+
5. Edge cases and failure handling.
|
|
29
|
+
6. Version-specific differences.
|
|
30
|
+
7. Migration and deprecation guidance.
|
|
31
|
+
8. Instructional templates/examples for direct reuse.
|
|
32
|
+
|
|
33
|
+
## Synthesized artifacts produced
|
|
34
|
+
|
|
35
|
+
The resulting skill references included:
|
|
36
|
+
|
|
37
|
+
1. Happy-path implementation template.
|
|
38
|
+
2. Production-safe variant with defensive defaults.
|
|
39
|
+
3. Anti-pattern and corrected implementation.
|
|
40
|
+
4. Intent-to-reference routing guide (which section to load for which user request).
|
|
41
|
+
5. Gap log with explicit next retrieval steps.
|
|
42
|
+
|
|
43
|
+
## Source-to-decision trace (sample)
|
|
44
|
+
|
|
45
|
+
1. Source class: migration/changelog docs.
|
|
46
|
+
Decision: add a version-compatibility checklist section to the skill.
|
|
47
|
+
Why: multiple API signatures existed across versions; without this, answers were inconsistent.
|
|
48
|
+
2. Source class: troubleshooting/error catalog.
|
|
49
|
+
Decision: add an error-to-fix lookup table in references.
|
|
50
|
+
Why: user prompts often start from failures, not idealized setup.
|
|
51
|
+
3. Source class: in-repo usage scan (`rg`).
|
|
52
|
+
Decision: prioritize examples matching local project patterns.
|
|
53
|
+
Why: produced outputs became directly usable with fewer edits.
|
|
54
|
+
|
|
55
|
+
## Concrete artifacts (sample)
|
|
56
|
+
|
|
57
|
+
1. Prompt and output skeleton:
|
|
58
|
+
Prompt: "Configure <library> client for retries and auth in production."
|
|
59
|
+
Output: a production-safe template with retry/backoff, timeout defaults, and auth placeholders.
|
|
60
|
+
2. Anti-pattern transformation:
|
|
61
|
+
Before: single inline config with no timeout/error handling.
|
|
62
|
+
After: structured config with explicit timeout, retry policy, and failure handling notes.
|
|
63
|
+
3. Reference routing snippet:
|
|
64
|
+
If request mentions "migration" -> load migration/changelog reference first, then API reference.
|
|
65
|
+
|
|
66
|
+
## What made this high quality
|
|
67
|
+
|
|
68
|
+
1. Input retrieval was exhaustive across all doc classes, not just top pages.
|
|
69
|
+
2. The skill shipped transformed examples, not citation-only notes.
|
|
70
|
+
3. Coverage and gaps were explicit, so iteration could continue safely.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Case Study: Evaluator-Loop Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: create a skill where one pass is not enough and quality improves through critique and revision.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case collected:
|
|
10
|
+
|
|
11
|
+
1. examples of first-draft failures
|
|
12
|
+
2. existing review rubrics or acceptance criteria
|
|
13
|
+
3. evidence that critique materially improves output
|
|
14
|
+
4. stopping rules to avoid endless loops
|
|
15
|
+
|
|
16
|
+
## Coverage matrix used
|
|
17
|
+
|
|
18
|
+
Required dimensions tracked during synthesis:
|
|
19
|
+
|
|
20
|
+
1. rubric quality
|
|
21
|
+
2. feedback-to-edit mapping
|
|
22
|
+
3. loop stop conditions
|
|
23
|
+
4. evidence retention between rounds
|
|
24
|
+
|
|
25
|
+
## Synthesized artifacts produced
|
|
26
|
+
|
|
27
|
+
The resulting skill references included:
|
|
28
|
+
|
|
29
|
+
1. first-draft to critique to revision example
|
|
30
|
+
2. rubric reference
|
|
31
|
+
3. max-loop or plateau rule
|
|
32
|
+
4. acceptance checklist
|
|
33
|
+
|
|
34
|
+
## What made this high quality
|
|
35
|
+
|
|
36
|
+
1. the rubric was explicit
|
|
37
|
+
2. the loop had a clear stopping rule
|
|
38
|
+
3. the revision process produced measurable improvement rather than vague repetition
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Case Study: Hook-Backed Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: create a skill that enforces a deterministic check at a specific lifecycle or tool boundary.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case collected:
|
|
10
|
+
|
|
11
|
+
1. official hook lifecycle and schema docs
|
|
12
|
+
2. security guidance for shell-executed hooks
|
|
13
|
+
3. examples of narrow matchers vs over-broad hooks
|
|
14
|
+
4. fallback behavior for environments without hooks
|
|
15
|
+
|
|
16
|
+
## Coverage matrix used
|
|
17
|
+
|
|
18
|
+
Required dimensions tracked during synthesis:
|
|
19
|
+
|
|
20
|
+
1. event and matcher scope
|
|
21
|
+
2. decision behavior
|
|
22
|
+
3. security boundaries
|
|
23
|
+
4. fallback behavior
|
|
24
|
+
5. portability constraints
|
|
25
|
+
|
|
26
|
+
## Synthesized artifacts produced
|
|
27
|
+
|
|
28
|
+
The resulting skill references included:
|
|
29
|
+
|
|
30
|
+
1. hook configuration example
|
|
31
|
+
2. safety checklist
|
|
32
|
+
3. fallback path without hooks
|
|
33
|
+
4. anti-pattern showing over-broad or unsafe hook scope
|
|
34
|
+
|
|
35
|
+
## What made this high quality
|
|
36
|
+
|
|
37
|
+
1. the hook scope was narrow and auditable
|
|
38
|
+
2. security assumptions were explicit
|
|
39
|
+
3. the skill still described what to do when hooks were unavailable
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Case Study: Router Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: create a skill that classifies requests into distinct downstream paths without overloading one prompt.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case collected:
|
|
10
|
+
|
|
11
|
+
1. examples of request categories
|
|
12
|
+
2. known ambiguous cases
|
|
13
|
+
3. downstream resources for each route
|
|
14
|
+
4. historical misroutes and their fixes
|
|
15
|
+
|
|
16
|
+
Collection stopped only after route criteria and fallback behavior were explicit.
|
|
17
|
+
|
|
18
|
+
## Coverage matrix used
|
|
19
|
+
|
|
20
|
+
Required dimensions tracked during synthesis:
|
|
21
|
+
|
|
22
|
+
1. route categories and triggers
|
|
23
|
+
2. ambiguous or overlapping cases
|
|
24
|
+
3. downstream ownership per route
|
|
25
|
+
4. default/fallback path
|
|
26
|
+
5. misroute recovery behavior
|
|
27
|
+
|
|
28
|
+
## Synthesized artifacts produced
|
|
29
|
+
|
|
30
|
+
The resulting skill references included:
|
|
31
|
+
|
|
32
|
+
1. route-selection table
|
|
33
|
+
2. one reference or script per route
|
|
34
|
+
3. ambiguous-case examples
|
|
35
|
+
4. fallback rule for unclear input
|
|
36
|
+
|
|
37
|
+
## What made this high quality
|
|
38
|
+
|
|
39
|
+
1. the route table was explicit
|
|
40
|
+
2. every route had one clear downstream owner
|
|
41
|
+
3. the skill knew what to do when classification was uncertain
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Case Study: Security Review Skill Synthesis
|
|
2
|
+
|
|
3
|
+
## Scenario
|
|
4
|
+
|
|
5
|
+
Goal: build a skill that finds real vulnerabilities while minimizing false positives.
|
|
6
|
+
|
|
7
|
+
## Input collection approach
|
|
8
|
+
|
|
9
|
+
This case required balanced collection across offensive and defensive material:
|
|
10
|
+
|
|
11
|
+
1. Canonical standards and cheat sheets.
|
|
12
|
+
2. Framework/language-specific secure coding docs.
|
|
13
|
+
3. Real-world exploit writeups and postmortems.
|
|
14
|
+
4. Fixed vulnerability diffs and secure rewrites.
|
|
15
|
+
5. Benign patterns often misclassified as vulnerabilities.
|
|
16
|
+
6. Existing in-repo security skills and review heuristics.
|
|
17
|
+
|
|
18
|
+
Collection continued until each vulnerability class had both exploit and mitigation evidence.
|
|
19
|
+
|
|
20
|
+
## Coverage matrix used
|
|
21
|
+
|
|
22
|
+
Required dimensions tracked during synthesis:
|
|
23
|
+
|
|
24
|
+
1. Vulnerability class definitions and prerequisites.
|
|
25
|
+
2. Exploitable dataflow examples.
|
|
26
|
+
3. False-positive controls.
|
|
27
|
+
4. Severity/confidence calibration.
|
|
28
|
+
5. Concrete remediation patterns.
|
|
29
|
+
6. Framework-specific caveats and exceptions.
|
|
30
|
+
|
|
31
|
+
## Synthesized artifacts produced
|
|
32
|
+
|
|
33
|
+
The resulting skill references included:
|
|
34
|
+
|
|
35
|
+
1. True-positive case with exploitation path.
|
|
36
|
+
2. False-positive case with proof of safety.
|
|
37
|
+
3. Fix/remediation case with corrected code pattern.
|
|
38
|
+
4. Severity and confidence decision rubric.
|
|
39
|
+
5. Evidence checklist to prevent pattern-only claims.
|
|
40
|
+
|
|
41
|
+
## Source-to-decision trace (sample)
|
|
42
|
+
|
|
43
|
+
1. Source class: exploit writeups.
|
|
44
|
+
Decision: require attacker-controlled input path in every high-confidence finding.
|
|
45
|
+
Why: removed pattern-only false alarms.
|
|
46
|
+
2. Source class: benign counterexamples.
|
|
47
|
+
Decision: add explicit safe-pattern checks before reporting.
|
|
48
|
+
Why: reduced repeated false positives on sanitized data paths.
|
|
49
|
+
3. Source class: fixed vulnerability diffs.
|
|
50
|
+
Decision: include remediation examples as patch-shaped guidance.
|
|
51
|
+
Why: improved downstream fix quality and speed.
|
|
52
|
+
|
|
53
|
+
## Concrete artifacts (sample)
|
|
54
|
+
|
|
55
|
+
1. True-positive case:
|
|
56
|
+
Input pattern: untrusted data reaches shell/API call without escaping.
|
|
57
|
+
Output: finding includes source, sink, exploit path, and minimal patch recommendation.
|
|
58
|
+
2. False-positive case:
|
|
59
|
+
Input pattern: potentially dangerous API with validated allowlist and strict escaping.
|
|
60
|
+
Output: no vulnerability finding; include reason for non-reporting.
|
|
61
|
+
3. Remediation case:
|
|
62
|
+
Before: dynamic query construction from user input.
|
|
63
|
+
After: parameterized query plus validation guard.
|
|
64
|
+
|
|
65
|
+
## What made this high quality
|
|
66
|
+
|
|
67
|
+
1. It was trained on both attacks and safe counterexamples.
|
|
68
|
+
2. Findings required evidence of exploitability, not keyword matching.
|
|
69
|
+
3. Remediation guidance was concrete and immediately applicable.
|