opencodekit 0.21.10 → 0.22.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/dist/index.js +1 -1
- package/dist/template/.opencode/AGENTS.md +116 -487
- package/dist/template/.opencode/README.md +1 -1
- package/dist/template/.opencode/agent/build.md +56 -396
- package/dist/template/.opencode/agent/explore.md +0 -1
- package/dist/template/.opencode/agent/review.md +0 -1
- package/dist/template/.opencode/agent/scout.md +0 -1
- package/dist/template/.opencode/agent/vision.md +0 -1
- package/dist/template/.opencode/command/clarify.md +48 -0
- package/dist/template/.opencode/command/commit.md +53 -0
- package/dist/template/.opencode/command/fix.md +56 -0
- package/dist/template/.opencode/command/improve-architecture.md +55 -0
- package/dist/template/.opencode/command/init.md +88 -68
- package/dist/template/.opencode/command/refactor.md +66 -0
- package/dist/template/.opencode/command/test.md +66 -0
- package/dist/template/.opencode/dcp.jsonc +13 -2
- package/dist/template/.opencode/memory/README.md +3 -5
- package/dist/template/.opencode/memory/_templates/adr.md +45 -0
- package/dist/template/.opencode/memory/project/gotchas.md +1 -1
- package/dist/template/.opencode/memory/session-context.md +1 -1
- package/dist/template/.opencode/plugin/README.md +1 -1
- package/dist/template/.opencode/plugin/guard.ts +62 -0
- package/dist/template/.opencode/plugin/{lib/memory-admin-tools.ts → memory/admin.ts} +4 -4
- package/dist/template/.opencode/plugin/{lib → memory}/capture.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/compile.ts +2 -2
- package/dist/template/.opencode/plugin/{lib → memory}/context.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/curator.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/db/observations.ts +102 -3
- package/dist/template/.opencode/plugin/{lib → memory}/db/schema.ts +43 -1
- package/dist/template/.opencode/plugin/{lib → memory}/db/types.ts +22 -0
- package/dist/template/.opencode/plugin/{lib/memory-db.ts → memory/db.ts} +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/distill.ts +1 -1
- package/dist/template/.opencode/plugin/{lib/memory-helpers.ts → memory/helpers.ts} +5 -1
- package/dist/template/.opencode/plugin/{lib/memory-hooks.ts → memory/hooks.ts} +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/index-generator.ts +2 -2
- package/dist/template/.opencode/plugin/{lib → memory}/inject.ts +1 -1
- package/dist/template/.opencode/plugin/{lib → memory}/lint.ts +2 -2
- package/dist/template/.opencode/plugin/memory/tools.ts +322 -0
- package/dist/template/.opencode/plugin/{lib → memory}/validate.ts +2 -2
- package/dist/template/.opencode/plugin/memory.ts +7 -17
- package/dist/template/.opencode/plugin/srcwalk.ts +721 -0
- package/dist/template/.opencode/skill/agent-code-quality-gate/SKILL.md +98 -0
- package/dist/template/.opencode/skill/behavioral-kernel/SKILL.md +52 -0
- package/dist/template/.opencode/skill/browser-testing-with-devtools/SKILL.md +85 -0
- package/dist/template/.opencode/skill/code-cleanup/SKILL.md +114 -0
- package/dist/template/.opencode/skill/code-navigation/SKILL.md +142 -0
- package/dist/template/.opencode/skill/code-review-and-quality/SKILL.md +131 -0
- package/dist/template/.opencode/skill/debugging-and-error-recovery/SKILL.md +109 -0
- package/dist/template/.opencode/skill/deep-module-design/SKILL.md +207 -0
- package/dist/template/.opencode/skill/git-workflow-and-versioning/SKILL.md +77 -0
- package/dist/template/.opencode/skill/grill-me/SKILL.md +140 -0
- package/dist/template/.opencode/skill/memory-system/SKILL.md +9 -10
- package/dist/template/.opencode/skill/planning-and-task-breakdown/SKILL.md +116 -0
- package/dist/template/.opencode/skill/shipping-and-launch/SKILL.md +95 -0
- package/dist/template/.opencode/skill/source-driven-development/SKILL.md +103 -0
- package/dist/template/.opencode/skill/spec-driven-development/SKILL.md +121 -0
- package/dist/template/.opencode/skill/srcwalk/SKILL.md +161 -0
- package/dist/template/.opencode/skill/ubiquitous-language/SKILL.md +184 -0
- package/package.json +1 -1
- package/dist/template/.opencode/AGENT_ALIGNMENT.md +0 -564
- package/dist/template/.opencode/agent/painter.md +0 -83
- package/dist/template/.opencode/command/compound.md +0 -240
- package/dist/template/.opencode/command/curate.md +0 -299
- package/dist/template/.opencode/command/handoff.md +0 -149
- package/dist/template/.opencode/command/health.md +0 -356
- package/dist/template/.opencode/command/init-context.md +0 -297
- package/dist/template/.opencode/command/init-user.md +0 -125
- package/dist/template/.opencode/command/iterate.md +0 -200
- package/dist/template/.opencode/command/lfg.md +0 -173
- package/dist/template/.opencode/command/resume.md +0 -78
- package/dist/template/.opencode/command/status.md +0 -126
- package/dist/template/.opencode/command/ui-slop-check.md +0 -169
- package/dist/template/.opencode/plugin/lib/memory-tools.ts +0 -535
- package/dist/template/.opencode/skill/agent-evals/SKILL.md +0 -208
- package/dist/template/.opencode/skill/anti-ai-slop/SKILL.md +0 -76
- package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +0 -122
- package/dist/template/.opencode/skill/augment-context-engine/mcp.json +0 -6
- package/dist/template/.opencode/skill/brand-asset-protocol/SKILL.md +0 -222
- package/dist/template/.opencode/skill/code-search-patterns/SKILL.md +0 -224
- package/dist/template/.opencode/skill/code-simplification/SKILL.md +0 -211
- package/dist/template/.opencode/skill/context-condensation/SKILL.md +0 -149
- package/dist/template/.opencode/skill/context-initialization/SKILL.md +0 -69
- package/dist/template/.opencode/skill/context-management/SKILL.md +0 -390
- package/dist/template/.opencode/skill/deep-research/SKILL.md +0 -384
- package/dist/template/.opencode/skill/design-direction-advisor/SKILL.md +0 -139
- package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +0 -191
- package/dist/template/.opencode/skill/executing-plans/SKILL.md +0 -247
- package/dist/template/.opencode/skill/figma-go/SKILL.md +0 -65
- package/dist/template/.opencode/skill/finishing-a-development-branch/SKILL.md +0 -357
- package/dist/template/.opencode/skill/full-output-enforcement/SKILL.md +0 -62
- package/dist/template/.opencode/skill/gh-address-comments/SKILL.md +0 -29
- package/dist/template/.opencode/skill/gh-address-comments/scripts/fetch_comments.py +0 -237
- package/dist/template/.opencode/skill/gh-fix-ci/SKILL.md +0 -38
- package/dist/template/.opencode/skill/gh-fix-ci/scripts/inspect_pr_checks.py +0 -509
- package/dist/template/.opencode/skill/hi-fi-prototype-html/SKILL.md +0 -253
- package/dist/template/.opencode/skill/html-deck-export/SKILL.md +0 -189
- package/dist/template/.opencode/skill/index-knowledge/SKILL.md +0 -413
- package/dist/template/.opencode/skill/memory-grounding/SKILL.md +0 -68
- package/dist/template/.opencode/skill/playwriter/SKILL.md +0 -158
- package/dist/template/.opencode/skill/portless/SKILL.md +0 -109
- package/dist/template/.opencode/skill/prd/SKILL.md +0 -146
- package/dist/template/.opencode/skill/prd-task/SKILL.md +0 -182
- package/dist/template/.opencode/skill/prd-task/references/prd-schema.json +0 -124
- package/dist/template/.opencode/skill/prompt-leverage/SKILL.md +0 -90
- package/dist/template/.opencode/skill/prompt-leverage/references/framework.md +0 -91
- package/dist/template/.opencode/skill/prompt-leverage/scripts/augment_prompt.py +0 -157
- package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +0 -263
- package/dist/template/.opencode/skill/reconcile/SKILL.md +0 -183
- package/dist/template/.opencode/skill/reflection-checkpoints/SKILL.md +0 -183
- package/dist/template/.opencode/skill/requesting-code-review/SKILL.md +0 -443
- package/dist/template/.opencode/skill/requesting-code-review/references/specialist-profiles.md +0 -108
- package/dist/template/.opencode/skill/requesting-code-review/review.md +0 -160
- package/dist/template/.opencode/skill/rtk-command-compression/SKILL.md +0 -134
- package/dist/template/.opencode/skill/screenshot/SKILL.md +0 -48
- package/dist/template/.opencode/skill/screenshot/scripts/ensure_macos_permissions.sh +0 -54
- package/dist/template/.opencode/skill/screenshot/scripts/macos_display_info.swift +0 -22
- package/dist/template/.opencode/skill/screenshot/scripts/macos_permissions.swift +0 -40
- package/dist/template/.opencode/skill/screenshot/scripts/macos_window_info.swift +0 -126
- package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.ps1 +0 -163
- package/dist/template/.opencode/skill/screenshot/scripts/take_screenshot.py +0 -585
- package/dist/template/.opencode/skill/security-threat-model/SKILL.md +0 -36
- package/dist/template/.opencode/skill/security-threat-model/references/prompt-template.md +0 -255
- package/dist/template/.opencode/skill/security-threat-model/references/security-controls-and-assets.md +0 -32
- package/dist/template/.opencode/skill/sharing-skills/SKILL.md +0 -214
- package/dist/template/.opencode/skill/skill-creator/SKILL.md +0 -181
- package/dist/template/.opencode/skill/skill-installer/SKILL.md +0 -58
- package/dist/template/.opencode/skill/skill-installer/scripts/github_utils.py +0 -21
- package/dist/template/.opencode/skill/skill-installer/scripts/install-skill-from-github.py +0 -313
- package/dist/template/.opencode/skill/skill-installer/scripts/list-skills.py +0 -106
- package/dist/template/.opencode/skill/swarm-coordination/SKILL.md +0 -244
- package/dist/template/.opencode/skill/swarm-coordination/references/architecture.md +0 -39
- package/dist/template/.opencode/skill/swarm-coordination/references/delegation-worker-protocol.md +0 -145
- package/dist/template/.opencode/skill/swarm-coordination/references/dependency-graph.md +0 -50
- package/dist/template/.opencode/skill/swarm-coordination/references/drift-check.md +0 -90
- package/dist/template/.opencode/skill/swarm-coordination/references/integration-beads.md +0 -20
- package/dist/template/.opencode/skill/swarm-coordination/references/launch-flow.md +0 -186
- package/dist/template/.opencode/skill/swarm-coordination/references/reconciler.md +0 -172
- package/dist/template/.opencode/skill/swarm-coordination/references/tier-enforcement.md +0 -78
- package/dist/template/.opencode/skill/swarm-coordination/references/tmux-integration.md +0 -134
- package/dist/template/.opencode/skill/systematic-debugging/SKILL.md +0 -402
- package/dist/template/.opencode/skill/terse-output-mode/SKILL.md +0 -95
- package/dist/template/.opencode/skill/think-in-code/SKILL.md +0 -136
- package/dist/template/.opencode/skill/ux-quality-gates/SKILL.md +0 -137
- package/dist/template/.opencode/skill/v1-run/SKILL.md +0 -175
- package/dist/template/.opencode/skill/v1-run/mcp.json +0 -6
- package/dist/template/.opencode/skill/verification-gates/SKILL.md +0 -63
- package/dist/template/.opencode/skill/visual-analysis/SKILL.md +0 -154
- package/dist/template/.opencode/skill/web-design-guidelines/SKILL.md +0 -46
- package/dist/template/.opencode/skill/workspace-setup/SKILL.md +0 -76
- package/dist/template/.opencode/skill/writing-plans/SKILL.md +0 -320
- /package/dist/template/.opencode/plugin/{lib → memory}/compact.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/db/graph.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/db/maintenance.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/db/pipeline.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/notify.ts +0 -0
- /package/dist/template/.opencode/plugin/{lib → memory}/operation-log.ts +0 -0
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
# Threat Modeling Prompt Template for LLMs
|
|
2
|
-
|
|
3
|
-
This reference provides a disciplined, repo-grounded prompt that produces AppSec-usable threat models. Use it when you need a reliable output contract and a consistent process to assemble the threat model output
|
|
4
|
-
|
|
5
|
-
## System prompt
|
|
6
|
-
|
|
7
|
-
Use this as a stable system prompt:
|
|
8
|
-
|
|
9
|
-
````text
|
|
10
|
-
You are a senior application security engineer producing a threat model that will be read by other AppSec engineers.
|
|
11
|
-
|
|
12
|
-
Primary objective:
|
|
13
|
-
- Generate a threat model that is specific to THIS repository and its real-world usage.
|
|
14
|
-
- Prefer concrete, evidence-backed findings over generic vulnerability checklists.
|
|
15
|
-
|
|
16
|
-
Evidence and grounding rules:
|
|
17
|
-
- Do not invent components, data stores, endpoints, flows, or controls.
|
|
18
|
-
- Every architectural claim must be backed by at least one "Evidence anchor" referencing a repo path
|
|
19
|
-
(and a symbol name, config key, or a short quoted snippet if available).
|
|
20
|
-
- If information is missing, state assumptions explicitly and list the open questions needed to validate them.
|
|
21
|
-
|
|
22
|
-
Security hygiene:
|
|
23
|
-
- Never output secrets. If you encounter tokens/keys/passwords, redact them and only describe their presence and location.
|
|
24
|
-
|
|
25
|
-
Threat modeling approach:
|
|
26
|
-
- Model the system using data flows and trust boundaries.
|
|
27
|
-
- Enumerate threats and produce attack goals and abuse paths
|
|
28
|
-
- Prioritize threats using explicit likelihood and impact reasoning (qualitative is acceptable: low/medium/high).
|
|
29
|
-
|
|
30
|
-
Scope discipline:
|
|
31
|
-
- Clearly separate: production/runtime behavior vs CI/build/dev tooling vs tests/examples.
|
|
32
|
-
- Clearly separate attacker-controlled inputs vs operator-controlled inputs vs developer-controlled inputs.
|
|
33
|
-
- If a vulnerability class requires attacker control that likely does not exist for this repo's real usage, say so and downgrade severity.
|
|
34
|
-
|
|
35
|
-
Communication quality:
|
|
36
|
-
- Write for AppSec engineers: concise but specific.
|
|
37
|
-
- Use precise terminology. Include mitigations and residual risks.
|
|
38
|
-
- Avoid restating large blocks of README/spec; summarize and point to evidence.
|
|
39
|
-
|
|
40
|
-
Diagram requirements:
|
|
41
|
-
- Produce a single compact Mermaid flowchart showing primary components and trust boundaries.
|
|
42
|
-
- Mermaid must render cleanly. Use a conservative subset:
|
|
43
|
-
- Use `flowchart TD` or `flowchart LR` and only `-->` arrows.
|
|
44
|
-
- Use simple node IDs (letters/numbers/underscores only) and quoted labels (e.g., `A["Label"]`); avoid `A(Label)` shape syntax.
|
|
45
|
-
- Do not use Mermaid `title` lines or `style` directives.
|
|
46
|
-
- Keep edge labels to plain words/spaces only via `-->|label|`; avoid `{}`, `[]`, `()`, or quotes in edge labels (if needed, drop the label).
|
|
47
|
-
- Keep node labels short and readable: do not include file paths, URLs, or socket paths (put those details in prose outside the diagram).
|
|
48
|
-
- Wrap the diagram in a Markdown fenced block:
|
|
49
|
-
```mermaid
|
|
50
|
-
<mermaid syntax here>
|
|
51
|
-
```
|
|
52
|
-
````
|
|
53
|
-
|
|
54
|
-
## Repository summary prompt
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
We have a codebase located at {repo_directory/path}, currently on branch {branch_name}.
|
|
58
|
-
|
|
59
|
-
Please produce a security-oriented summary of the repository (or the specified sub-path) with the goal of helping a follow-on security engineer quickly understand the system well enough to build an initial threat model and investigate potential security hypotheses.
|
|
60
|
-
|
|
61
|
-
Objectives
|
|
62
|
-
1. Project overview
|
|
63
|
-
• Identify the primary programming languages, frameworks, and build system.
|
|
64
|
-
• Summarize the project’s core purpose and high-level architecture.
|
|
65
|
-
• Describe major components, services, or modules and how they interact.
|
|
66
|
-
2. Security posture and entry points
|
|
67
|
-
• Identify likely user entry points and trust boundaries.
|
|
68
|
-
• Describe existing security layers (e.g., authentication, authorization, validation, sandboxing, isolation, privilege boundaries).
|
|
69
|
-
• Call out security-critical components and assumptions that must hold for the system to remain secure.
|
|
70
|
-
|
|
71
|
-
Guidance for Security Analysis
|
|
72
|
-
|
|
73
|
-
Structure the summary so an application security engineer can quickly answer questions such as:
|
|
74
|
-
• Where does user input originate?
|
|
75
|
-
• How is untrusted data parsed, validated, and handled?
|
|
76
|
-
• What security assumptions should not be violated?
|
|
77
|
-
• Where are the most likely choke points for security bugs?
|
|
78
|
-
|
|
79
|
-
Adapt the analysis to the project type. For example:
|
|
80
|
-
• Web applications: where requests enter, how user data is parsed, routed, authenticated, and stored.
|
|
81
|
-
• Command-line tools: supported inputs (arguments, files, environment variables, stdin) and how they are processed.
|
|
82
|
-
• Network daemons: exposed ports, supported protocols, message formats, and request handling paths.
|
|
83
|
-
• Operating system or low-level components: common vulnerability classes (e.g., memory corruption, logic flaws) that could lead to LPE or RCE.
|
|
84
|
-
|
|
85
|
-
Be thorough but pragmatic: the goal is to help a security engineer quickly determine whether a discovered bug is security-relevant and where deeper investigation should focus.
|
|
86
|
-
|
|
87
|
-
Tooling Notes
|
|
88
|
-
|
|
89
|
-
If Ripgrep (rg) is available, use it to explore the codebase. When using grep or rg, always include the -I flag to avoid searching through binary files.
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
## User prompt template
|
|
95
|
-
|
|
96
|
-
Use this as the task prompt, filling in what you know and marking the rest as assumptions:
|
|
97
|
-
|
|
98
|
-
```text
|
|
99
|
-
# Inputs
|
|
100
|
-
Context (fill as available; otherwise infer and mark assumptions):
|
|
101
|
-
- intended_usage: {intended_usage}
|
|
102
|
-
- deployment_model: {deployment_model}
|
|
103
|
-
- data_sensitivity: {data_sensitivity}
|
|
104
|
-
- internet_exposure: {internet_exposure}
|
|
105
|
-
- authn_authz_expectations: {authn_authz_expectations}
|
|
106
|
-
- out_of_scope: {out_of_scope}
|
|
107
|
-
|
|
108
|
-
Provided summaries (may be incomplete):
|
|
109
|
-
- repository_summary: {repository_summary}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
In-scope code locations (if known):
|
|
113
|
-
- in_scope_paths: {in_scope_paths}
|
|
114
|
-
|
|
115
|
-
# Task
|
|
116
|
-
Construct a repo-centric threat model that helps AppSec engineers understand the most important security risks and where to focus manual review.
|
|
117
|
-
|
|
118
|
-
You MUST follow this process and reflect outputs in the final document:
|
|
119
|
-
|
|
120
|
-
## Process
|
|
121
|
-
1) Repo discovery (evidence collection)
|
|
122
|
-
a. Identify the repo shape:
|
|
123
|
-
- languages and frameworks
|
|
124
|
-
- how it runs (server/cli/library), entrypoints, build artifacts
|
|
125
|
-
b. Identify security-relevant surfaces and controls by searching for evidences, such as:
|
|
126
|
-
- network listeners/routes/endpoints; RPC handlers; message consumers
|
|
127
|
-
- authentication, session/token handling, authorization checks, RBAC/ACL logic
|
|
128
|
-
- parsing/serialization/deserialization (JSON/YAML/XML/protobuf), template rendering, eval/dynamic code
|
|
129
|
-
- file upload/read paths, archive extraction, image/document parsing
|
|
130
|
-
- database/queue/cache clients and query construction
|
|
131
|
-
- secrets/config loading, environment variables, key management
|
|
132
|
-
- SSRF-capable HTTP clients, webhooks, URL fetchers
|
|
133
|
-
- sandboxing/isolation, privilege boundaries, subprocess execution
|
|
134
|
-
- logging/auditing and error handling paths
|
|
135
|
-
- CI/build/release: pipelines, dependency management, artifact publishing
|
|
136
|
-
|
|
137
|
-
2) System model
|
|
138
|
-
a. Summarize the primary components (runtime plus critical build/CI components when relevant).
|
|
139
|
-
b. Enumerate data flows and trust boundaries.
|
|
140
|
-
- For each trust boundary, specify:
|
|
141
|
-
* source to destination
|
|
142
|
-
* data types crossing (e.g., credentials, PII, files, tokens, prompts)
|
|
143
|
-
* channel/protocol (HTTP/gRPC/IPC/file/db)
|
|
144
|
-
* security guarantees and validation (auth, mTLS, origin checks, schema validation, rate limits)
|
|
145
|
-
c. Provide a compact Mermaid diagram showing components and trust boundaries.
|
|
146
|
-
|
|
147
|
-
3) Assets and security objectives
|
|
148
|
-
- List assets (data, credentials, integrity-critical state, availability-critical components, build artifacts).
|
|
149
|
-
- For each asset, state why it matters (confidentiality/integrity/availability, compliance, user harm).
|
|
150
|
-
|
|
151
|
-
4) Attacker model
|
|
152
|
-
- Capabilities: realistic remote attacker assumptions based on intended usage and exposure.
|
|
153
|
-
- Non-capabilities: things attacker cannot plausibly do (unless explicitly in scope), to avoid inflated severity.
|
|
154
|
-
|
|
155
|
-
5) Threat enumeration (concrete, system-specific)
|
|
156
|
-
- Generate threats as attacker stories tied to:
|
|
157
|
-
* entry points
|
|
158
|
-
* trust boundaries
|
|
159
|
-
* privileged components
|
|
160
|
-
- Prefer abuse paths (multi-step sequences) over single-line generic threats.
|
|
161
|
-
|
|
162
|
-
6) Risk prioritization
|
|
163
|
-
- For each threat:
|
|
164
|
-
* Likelihood: low/medium/high with a 1 to 2 sentence justification
|
|
165
|
-
* Impact: low/medium/high with a 1 to 2 sentence justification
|
|
166
|
-
* Overall priority: critical/high/medium/low (based on likelihood x impact, adjusted for existing controls)
|
|
167
|
-
- Explicitly state which assumptions most affect risk.
|
|
168
|
-
|
|
169
|
-
7) Validate assumptions and service context with the user (required before final report)
|
|
170
|
-
- Summarize key assumptions that materially affect scope or risk ranking.
|
|
171
|
-
- Ask 1 to 3 targeted questions to resolve missing service meta-context (service owner/environment, scale/users, deployment model, authn/authz, internet exposure, data sensitivity, multi-tenancy).
|
|
172
|
-
- Pause and wait for user feedback before producing the final report.
|
|
173
|
-
- If the user cannot answer, proceed with explicit assumptions and mark any conditional conclusions.
|
|
174
|
-
|
|
175
|
-
8) Mitigations and recommendations
|
|
176
|
-
- For each high/critical threat:
|
|
177
|
-
* Existing mitigations (with evidence anchors)
|
|
178
|
-
* Gaps/weaknesses
|
|
179
|
-
* Recommended mitigations (code/config/process)
|
|
180
|
-
* Detection/monitoring ideas (logging, metrics, alerts)
|
|
181
|
-
|
|
182
|
-
9) Focus paths for manual security review
|
|
183
|
-
- Output 2 to 30 repo-relative paths (files or directories) that merit deeper review.
|
|
184
|
-
- For each path, give a one-sentence reason tied to the threat model.
|
|
185
|
-
|
|
186
|
-
10) Quality check
|
|
187
|
-
- Provide a short checklist confirming you covered:
|
|
188
|
-
* all entry points you discovered
|
|
189
|
-
* each trust boundary at least once in threats
|
|
190
|
-
* runtime vs CI/dev separation
|
|
191
|
-
* user clarifications (or explicit non-responses)
|
|
192
|
-
* assumptions and open questions
|
|
193
|
-
|
|
194
|
-
## Required output format (exact)
|
|
195
|
-
Before producing the final Markdown report, first provide an assumption-validation check-in:
|
|
196
|
-
- List the key assumptions in 3 to 6 bullets.
|
|
197
|
-
- Ask 1 to 3 targeted context questions.
|
|
198
|
-
- Wait for the user response, then produce the final report below using the clarified context.
|
|
199
|
-
|
|
200
|
-
Produce valid Markdown with these sections in this order:
|
|
201
|
-
|
|
202
|
-
## Executive summary
|
|
203
|
-
- 1 short paragraph on the top risk themes and highest-risk areas.
|
|
204
|
-
|
|
205
|
-
## Scope and assumptions
|
|
206
|
-
- In-scope paths, out-of-scope items, and explicit assumptions.
|
|
207
|
-
- A short list of open questions that would materially change the risk ranking.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
## System model
|
|
211
|
-
### Primary components
|
|
212
|
-
### Data flows and trust boundaries
|
|
213
|
-
Represent the system as a sequence of arrow-style bullets (e.g., Internet → API Server, User Input -> Application Logic, etc). For each boundary, document:
|
|
214
|
-
• the primary data types crossing the boundary,
|
|
215
|
-
• the communication channel or protocol,
|
|
216
|
-
• the security guarantees (e.g., authentication, origin checks, encryption, rate limiting), and
|
|
217
|
-
• any input validation, normalization, or schema enforcement performed.
|
|
218
|
-
|
|
219
|
-
#### Diagram
|
|
220
|
-
- Include a single, compact Mermaid diagram (`flowchart TD` or `flowchart LR`) showing primary components and trust boundaries (e.g., separate trust zones via subgraphs). Keep it compact, use only `-->`, avoid `title`/`style`, keep node labels short (no paths/URLs), and keep edge labels to plain words only (avoid `{}`, `[]`, `()`, or quotes).
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
## Assets and security objectives
|
|
224
|
-
- A table: Asset | Why it matters | Security objective (C/I/A)
|
|
225
|
-
|
|
226
|
-
## Attacker model
|
|
227
|
-
### Capabilities
|
|
228
|
-
### Non-capabilities
|
|
229
|
-
|
|
230
|
-
## Entry points and attack surfaces
|
|
231
|
-
- A table: Surface | How reached | Trust boundary | Notes | Evidence (repo path / symbol)
|
|
232
|
-
|
|
233
|
-
## Top abuse paths
|
|
234
|
-
- 5 to 10 short abuse paths, each as a numbered sequence of steps (attacker goal -> steps -> impact).
|
|
235
|
-
|
|
236
|
-
## Threat model table
|
|
237
|
-
- A Markdown table with columns:
|
|
238
|
-
Threat ID | Threat source | Prerequisites | Threat action | Impact | Impacted assets | Existing controls (evidence) | Gaps | Recommended mitigations | Detection ideas | Likelihood | Impact severity | Priority
|
|
239
|
-
|
|
240
|
-
Rules:
|
|
241
|
-
- Threat IDs must be stable and formatted: TM-001, TM-002, ...
|
|
242
|
-
- Priority must be one of: critical, high, medium, low.
|
|
243
|
-
- Keep prerequisites to 1 to 2 sentences. Keep recommended mitigations concrete.
|
|
244
|
-
|
|
245
|
-
## Criticality calibration
|
|
246
|
-
- Define what counts as critical/high/medium/low for THIS repo and context.
|
|
247
|
-
- Include 2 to 3 examples per level (tailored to the repo's assets and exposure).
|
|
248
|
-
|
|
249
|
-
## Focus paths for security review
|
|
250
|
-
- A table: Path | Why it matters | Related Threat IDs
|
|
251
|
-
|
|
252
|
-
## Notes on use
|
|
253
|
-
|
|
254
|
-
- Fill in known context, but allow the model to infer and mark assumptions.
|
|
255
|
-
- Include 1–2 repo-path anchors per major claim; do not dump every match.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# Security Controls and Asset Categories
|
|
2
|
-
|
|
3
|
-
Use this as a lightweight checklist to keep outputs consistent across teams. Prefer concrete, system-specific items over generic text.
|
|
4
|
-
|
|
5
|
-
## Asset categories (pick only what applies)
|
|
6
|
-
- User data (PII, content, uploads)
|
|
7
|
-
- Authentication artifacts (passwords, tokens, sessions, cookies)
|
|
8
|
-
- Authorization state (roles, policies, ACLs)
|
|
9
|
-
- Secrets and keys (API keys, signing keys, encryption keys)
|
|
10
|
-
- Configuration and feature flags
|
|
11
|
-
- Models and weights (if ML systems)
|
|
12
|
-
- Source code and build artifacts
|
|
13
|
-
- Audit logs and telemetry
|
|
14
|
-
- Availability-critical resources (queues, caches, rate limits, compute budgets)
|
|
15
|
-
- Tenant isolation boundaries and metadata
|
|
16
|
-
|
|
17
|
-
## Security control categories
|
|
18
|
-
- Identity and access: authN, authZ, session handling, mTLS, key rotation
|
|
19
|
-
- Input protection: schema validation, parsing hardening, upload scanning, sandboxing
|
|
20
|
-
- Network safeguards: TLS, network policies, WAF, rate limiting, DoS controls
|
|
21
|
-
- Data protection: encryption at rest/in transit, tokenization, redaction
|
|
22
|
-
- Isolation: process sandboxing, container boundaries, tenant isolation, seccomp
|
|
23
|
-
- Observability: audit logs, alerting, anomaly detection, tamper resistance
|
|
24
|
-
- Supply chain: dependency pinning, SBOMs, provenance, signing
|
|
25
|
-
- Change control: CI checks, deployment approvals, config guardrails
|
|
26
|
-
|
|
27
|
-
## Mitigation phrasing patterns
|
|
28
|
-
- "Enforce schema at <boundary> for <payload> before <component>."
|
|
29
|
-
- "Require authZ check for <action> on <resource> in <service>."
|
|
30
|
-
- "Isolate <parser/component> in a sandbox with <resource limits>."
|
|
31
|
-
- "Rate limit <endpoint> by <key> and apply burst caps."
|
|
32
|
-
- "Encrypt <data> at rest using <key management> and rotate <keys>."
|
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sharing-skills
|
|
3
|
-
description: Use when you've developed a broadly useful skill and want to contribute it upstream via pull request - guides process of branching, committing, pushing, and creating PR to contribute skills back to upstream repository
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
tags: [workflow, git]
|
|
6
|
-
dependencies: []
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Sharing Skills
|
|
10
|
-
|
|
11
|
-
## When to Use
|
|
12
|
-
|
|
13
|
-
- When a skill is broadly useful and ready to be contributed upstream via pull request.
|
|
14
|
-
|
|
15
|
-
## When NOT to Use
|
|
16
|
-
|
|
17
|
-
- When the skill is project-specific, experimental, or contains sensitive information.
|
|
18
|
-
|
|
19
|
-
## Overview
|
|
20
|
-
|
|
21
|
-
Contribute skills from your local branch back to the upstream repository.
|
|
22
|
-
|
|
23
|
-
**Workflow:** Branch → Edit/Create skill → Commit → Push → PR
|
|
24
|
-
|
|
25
|
-
## When to Share
|
|
26
|
-
|
|
27
|
-
**Share when:**
|
|
28
|
-
|
|
29
|
-
- Skill applies broadly (not project-specific)
|
|
30
|
-
- Pattern/technique others would benefit from
|
|
31
|
-
- Well-tested and documented
|
|
32
|
-
- Follows writing-skills guidelines
|
|
33
|
-
|
|
34
|
-
**Keep personal when:**
|
|
35
|
-
|
|
36
|
-
- Project-specific or organization-specific
|
|
37
|
-
- Experimental or unstable
|
|
38
|
-
- Contains sensitive information
|
|
39
|
-
- Too narrow/niche for general use
|
|
40
|
-
|
|
41
|
-
## Prerequisites
|
|
42
|
-
|
|
43
|
-
- `gh` CLI installed and authenticated
|
|
44
|
-
- Working directory is `.opencode/skill/` (your project skills)
|
|
45
|
-
- **REQUIRED:** Skill has been tested using writing-skills TDD process
|
|
46
|
-
|
|
47
|
-
## Sharing Workflow
|
|
48
|
-
|
|
49
|
-
### 1. Ensure You're on Main and Synced
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
cd .opencode/skill/
|
|
53
|
-
git checkout main
|
|
54
|
-
git pull upstream main
|
|
55
|
-
git push origin main # Push to your fork
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### 2. Create Feature Branch
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
# Branch name: add-skillname-skill
|
|
62
|
-
skill_name="your-skill-name"
|
|
63
|
-
git checkout -b "add-${skill_name}-skill"
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### 3. Create or Edit Skill
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
# Work on your skill in skills/
|
|
70
|
-
# Create new skill or edit existing one
|
|
71
|
-
# Skill should be in skills/category/skill-name/SKILL.md
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 4. Commit Changes
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
# Add and commit
|
|
78
|
-
git add skills/your-skill-name/
|
|
79
|
-
git commit -m "Add ${skill_name} skill
|
|
80
|
-
|
|
81
|
-
$(cat <<'EOF'
|
|
82
|
-
Brief description of what this skill does and why it's useful.
|
|
83
|
-
|
|
84
|
-
Tested with: [describe testing approach]
|
|
85
|
-
EOF
|
|
86
|
-
)"
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### 5. Push to Your Fork
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
git push -u origin "add-${skill_name}-skill"
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### 6. Create Pull Request
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# Create PR to upstream using gh CLI
|
|
99
|
-
gh pr create \
|
|
100
|
-
--repo upstream-org/upstream-repo \
|
|
101
|
-
--title "Add ${skill_name} skill" \
|
|
102
|
-
--body "$(cat <<'EOF'
|
|
103
|
-
## Summary
|
|
104
|
-
Brief description of the skill and what problem it solves.
|
|
105
|
-
|
|
106
|
-
## Testing
|
|
107
|
-
Describe how you tested this skill (pressure scenarios, baseline tests, etc.).
|
|
108
|
-
|
|
109
|
-
## Context
|
|
110
|
-
Any additional context about why this skill is needed and how it should be used.
|
|
111
|
-
EOF
|
|
112
|
-
)"
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Complete Example
|
|
116
|
-
|
|
117
|
-
Here's a complete example of sharing a skill called "async-patterns":
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
# 1. Sync with upstream
|
|
121
|
-
cd .opencode/skill/
|
|
122
|
-
git checkout main
|
|
123
|
-
git pull upstream main
|
|
124
|
-
git push origin main
|
|
125
|
-
|
|
126
|
-
# 2. Create branch
|
|
127
|
-
git checkout -b "add-async-patterns-skill"
|
|
128
|
-
|
|
129
|
-
# 3. Create/edit the skill
|
|
130
|
-
# (Work on skills/async-patterns/SKILL.md)
|
|
131
|
-
|
|
132
|
-
# 4. Commit
|
|
133
|
-
git add skills/async-patterns/
|
|
134
|
-
git commit -m "Add async-patterns skill
|
|
135
|
-
|
|
136
|
-
Patterns for handling asynchronous operations in tests and application code.
|
|
137
|
-
|
|
138
|
-
Tested with: Multiple pressure scenarios testing agent compliance."
|
|
139
|
-
|
|
140
|
-
# 5. Push
|
|
141
|
-
git push -u origin "add-async-patterns-skill"
|
|
142
|
-
|
|
143
|
-
# 6. Create PR
|
|
144
|
-
gh pr create \
|
|
145
|
-
--repo upstream-org/upstream-repo \
|
|
146
|
-
--title "Add async-patterns skill" \
|
|
147
|
-
--body "## Summary
|
|
148
|
-
Patterns for handling asynchronous operations correctly in tests and application code.
|
|
149
|
-
|
|
150
|
-
## Testing
|
|
151
|
-
Tested with multiple application scenarios. Agents successfully apply patterns to new code.
|
|
152
|
-
|
|
153
|
-
## Context
|
|
154
|
-
Addresses common async pitfalls like race conditions, improper error handling, and timing issues."
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## After PR is Merged
|
|
158
|
-
|
|
159
|
-
Once your PR is merged:
|
|
160
|
-
|
|
161
|
-
1. Sync your local main branch:
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
cd .opencode/skill/
|
|
165
|
-
git checkout main
|
|
166
|
-
git pull upstream main
|
|
167
|
-
git push origin main
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
2. Delete the feature branch:
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
git branch -d "add-${skill_name}-skill"
|
|
174
|
-
git push origin --delete "add-${skill_name}-skill"
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
## Troubleshooting
|
|
178
|
-
|
|
179
|
-
**"gh: command not found"**
|
|
180
|
-
|
|
181
|
-
- Install GitHub CLI: https://cli.github.com/
|
|
182
|
-
- Authenticate: `gh auth login`
|
|
183
|
-
|
|
184
|
-
**"Permission denied (publickey)"**
|
|
185
|
-
|
|
186
|
-
- Check SSH keys: `gh auth status`
|
|
187
|
-
- Set up SSH: https://docs.github.com/en/authentication
|
|
188
|
-
|
|
189
|
-
**"Skill already exists"**
|
|
190
|
-
|
|
191
|
-
- You're creating a modified version
|
|
192
|
-
- Consider different skill name or coordinate with the skill's maintainer
|
|
193
|
-
|
|
194
|
-
**PR merge conflicts**
|
|
195
|
-
|
|
196
|
-
- Rebase on latest upstream: `git fetch upstream && git rebase upstream/main`
|
|
197
|
-
- Resolve conflicts
|
|
198
|
-
- Force push: `git push -f origin your-branch`
|
|
199
|
-
|
|
200
|
-
## Multi-Skill Contributions
|
|
201
|
-
|
|
202
|
-
**Do NOT batch multiple skills in one PR.**
|
|
203
|
-
|
|
204
|
-
Each skill should:
|
|
205
|
-
|
|
206
|
-
- Have its own feature branch
|
|
207
|
-
- Have its own PR
|
|
208
|
-
- Be independently reviewable
|
|
209
|
-
|
|
210
|
-
**Why?** Individual skills can be reviewed, iterated, and merged independently.
|
|
211
|
-
|
|
212
|
-
## Related Skills
|
|
213
|
-
|
|
214
|
-
- **writing-skills** - REQUIRED: How to create well-tested skills before sharing
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-creator
|
|
3
|
-
description: Guide for creating effective skills. Use when creating a new skill or updating an existing skill that extends an agent's capabilities with specialized knowledge, workflows, or tool integrations.
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
tags: [documentation, workflow]
|
|
6
|
-
dependencies: []
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Skill Creator
|
|
10
|
-
|
|
11
|
-
## When to Use
|
|
12
|
-
|
|
13
|
-
- When creating a new skill or updating an existing skill with specialized workflows or tool integrations.
|
|
14
|
-
|
|
15
|
-
## When NOT to Use
|
|
16
|
-
|
|
17
|
-
- When making routine project changes that don't require a reusable skill.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## What Skills Provide
|
|
22
|
-
|
|
23
|
-
1. **Specialized workflows** - Multi-step procedures for specific domains
|
|
24
|
-
2. **Tool integrations** - Instructions for working with specific file formats or APIs
|
|
25
|
-
3. **Domain expertise** - Company-specific knowledge, schemas, business logic
|
|
26
|
-
4. **Bundled resources** - Scripts, references, and assets for complex tasks
|
|
27
|
-
|
|
28
|
-
## Skill Structure
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
skill-name/
|
|
32
|
-
├── SKILL.md (required)
|
|
33
|
-
│ ├── YAML frontmatter (name, description)
|
|
34
|
-
│ └── Markdown instructions
|
|
35
|
-
└── Bundled Resources (optional)
|
|
36
|
-
├── scripts/ - Executable code (Python/Bash/etc.)
|
|
37
|
-
├── references/ - Documentation loaded as needed
|
|
38
|
-
└── assets/ - Files used in output (templates, icons)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Requirements
|
|
42
|
-
|
|
43
|
-
- `SKILL.md` should be **less than 200 lines**
|
|
44
|
-
- Use `references/` for detailed documentation
|
|
45
|
-
- Each script or reference file also **less than 200 lines**
|
|
46
|
-
- Descriptions must be specific about WHEN to use the skill
|
|
47
|
-
|
|
48
|
-
## SKILL.md Format
|
|
49
|
-
|
|
50
|
-
**REQUIRED - DO NOT SKIP**
|
|
51
|
-
|
|
52
|
-
```yaml
|
|
53
|
-
---
|
|
54
|
-
name: skill-name
|
|
55
|
-
description: What this skill does and when to use it. Use third-person.
|
|
56
|
-
---
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
**Required fields:**
|
|
60
|
-
|
|
61
|
-
- `name` — hyphen-case identifier matching directory name
|
|
62
|
-
- `description` — activation trigger; be specific about WHEN to use
|
|
63
|
-
|
|
64
|
-
**Optional fields:**
|
|
65
|
-
|
|
66
|
-
```yaml
|
|
67
|
-
---
|
|
68
|
-
name: skill-name
|
|
69
|
-
description: What this skill does and when to use it.
|
|
70
|
-
references:
|
|
71
|
-
- references/guide.md
|
|
72
|
-
- references/api.md
|
|
73
|
-
license: Apache-2.0
|
|
74
|
-
---
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**INVALID - Do NOT use:**
|
|
78
|
-
|
|
79
|
-
- XML-style tags (`<purpose>`, `<references>`)
|
|
80
|
-
- Missing `---` delimiters
|
|
81
|
-
- Frontmatter that doesn't start at line 1
|
|
82
|
-
|
|
83
|
-
## Bundled Resources
|
|
84
|
-
|
|
85
|
-
### Scripts (`scripts/`)
|
|
86
|
-
|
|
87
|
-
- When the same code is being rewritten repeatedly
|
|
88
|
-
- When deterministic reliability is needed
|
|
89
|
-
- Prefer Node.js or Python over Bash (Windows support)
|
|
90
|
-
|
|
91
|
-
### References (`references/`)
|
|
92
|
-
|
|
93
|
-
- Documentation that agent should reference while working
|
|
94
|
-
- Database schemas, API docs, domain knowledge
|
|
95
|
-
- If files are large (>10k words), include grep patterns in SKILL.md
|
|
96
|
-
|
|
97
|
-
### Assets (`assets/`)
|
|
98
|
-
|
|
99
|
-
- Files used in the final output (not loaded into context)
|
|
100
|
-
- Templates, images, icons, boilerplate code
|
|
101
|
-
|
|
102
|
-
## Progressive Disclosure
|
|
103
|
-
|
|
104
|
-
Skills use three-level loading:
|
|
105
|
-
|
|
106
|
-
1. **Metadata (name + description)** - Always in context (~100 words)
|
|
107
|
-
2. **SKILL.md body** - When skill triggers (<5k words)
|
|
108
|
-
3. **Bundled resources** - As needed by agent (Unlimited)
|
|
109
|
-
|
|
110
|
-
## Skill Creation Process
|
|
111
|
-
|
|
112
|
-
### Step 1: Understand with Examples
|
|
113
|
-
|
|
114
|
-
- "What functionality should the skill support?"
|
|
115
|
-
- "Can you give examples of how this would be used?"
|
|
116
|
-
- "What would a user say that should trigger this skill?"
|
|
117
|
-
|
|
118
|
-
### Step 2: Plan Reusable Contents
|
|
119
|
-
|
|
120
|
-
For each example, identify:
|
|
121
|
-
|
|
122
|
-
- What scripts would be helpful to store?
|
|
123
|
-
- What references/documentation needed?
|
|
124
|
-
- What assets/templates needed?
|
|
125
|
-
|
|
126
|
-
### Step 3: Create the Skill
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
mkdir -p .opencode/skill/my-skill
|
|
130
|
-
touch .opencode/skill/my-skill/SKILL.md
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Step 4: Edit SKILL.md
|
|
134
|
-
|
|
135
|
-
Answer these questions:
|
|
136
|
-
|
|
137
|
-
1. What is the purpose of the skill?
|
|
138
|
-
2. When should it be used?
|
|
139
|
-
3. How should the agent use it?
|
|
140
|
-
|
|
141
|
-
### Step 5: Iterate
|
|
142
|
-
|
|
143
|
-
1. Use the skill on real tasks
|
|
144
|
-
2. Notice struggles or inefficiencies
|
|
145
|
-
3. Update SKILL.md or bundled resources
|
|
146
|
-
4. Test again
|
|
147
|
-
|
|
148
|
-
## Pre-Submission Checklist
|
|
149
|
-
|
|
150
|
-
- [ ] **SKILL.md starts with `---`** (YAML frontmatter, line 1)
|
|
151
|
-
- [ ] **`name:` field present** and matches directory name
|
|
152
|
-
- [ ] **`description:` field present** with specific activation triggers
|
|
153
|
-
- [ ] **Closing `---`** after frontmatter
|
|
154
|
-
- [ ] **No XML-style tags**
|
|
155
|
-
- [ ] **SKILL.md under 200 lines**
|
|
156
|
-
- [ ] **All referenced files exist**
|
|
157
|
-
|
|
158
|
-
## Recommended Sections for SKILL.md
|
|
159
|
-
|
|
160
|
-
Beyond the required structure, include these sections when applicable:
|
|
161
|
-
|
|
162
|
-
### `## Gotchas`
|
|
163
|
-
|
|
164
|
-
Every skill should accumulate a Gotchas section over time. This is **failure-driven documentation** — each entry should trace to a specific failure encountered during real use.
|
|
165
|
-
|
|
166
|
-
```markdown
|
|
167
|
-
## Gotchas
|
|
168
|
-
|
|
169
|
-
- **[Short description of what went wrong]** — [What the agent did wrong, why, and the fix]. Discovered [date or session reference].
|
|
170
|
-
- **[Another failure]** — [Details]. Discovered [date].
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
**Rules for Gotchas:**
|
|
174
|
-
|
|
175
|
-
1. Every entry must trace to an actual failure, not a hypothetical risk
|
|
176
|
-
2. Include what the agent did, why it failed, and how to avoid it
|
|
177
|
-
3. New entries are added when a skill causes a failure — the fix PR should include a gotcha entry
|
|
178
|
-
4. Keep entries concise (1-3 sentences each)
|
|
179
|
-
5. This section grows over time and is never cleared — it's the skill's scar tissue
|
|
180
|
-
|
|
181
|
-
**Why this matters:** Skills without gotchas are untested skills. A skill with 5 gotchas has been battle-tested through 5 real failures and is structurally better than a pristine skill with zero. When a skill causes a failure, always ask: "Should this become a gotcha entry?"
|