Skip to content

Commit c3549f6

Browse files
committed
docs: canonicalize skill format guidance
1 parent ce2a2b9 commit c3549f6

1 file changed

Lines changed: 35 additions & 48 deletions

File tree

CONTRIBUTING.md

Lines changed: 35 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Improve an existing skill by submitting a Pull Request.
7777
**To submit an improvement:**
7878
1. Fork the repo and create a branch named `improve/[skill-name]-[brief-description]`
7979
2. Make your changes
80-
3. Add or update test cases demonstrating the improvement
80+
3. Add evidence demonstrating the improvement, such as minimal vulnerable and benign examples in the PR description or, once a test harness exists, repo fixtures
8181
4. Open a PR using the "Skill Improvement" template
8282
5. In the PR description, clearly explain what was wrong and what you fixed
8383

@@ -95,70 +95,57 @@ Author a completely new security skill from scratch.
9595
skills/
9696
[category]/
9797
[skill-name]/
98-
skill.yaml # Skill definition (detection + remediation)
99-
README.md # Human-readable description, examples, rationale
100-
tests/
101-
vulnerable/ # Code samples that SHOULD trigger the skill
102-
benign/ # Code samples that should NOT trigger the skill
98+
SKILL.md # Canonical skill entrypoint
99+
*.md # Optional sibling reference files for long detail
103100
```
104101

102+
`SKILL.md` is the only required skill definition file. Do not submit `skill.yaml`
103+
or a per-skill `README.md` as the primary definition. If guidance would make
104+
`SKILL.md` exceed roughly 500 lines, keep the entrypoint lean and move detailed
105+
patterns, benchmark checklists, or language-specific guidance into sibling
106+
Markdown files that are linked from `SKILL.md`.
107+
105108
**To submit a new skill:**
106109
1. Fork the repo and create a branch named `new-skill/[skill-name]`
107110
2. Follow the skill structure above
108-
3. Include at least 3 vulnerable test cases and 3 benign test cases
111+
3. Include at least 3 vulnerable examples and 3 benign examples in the PR description or, once a test harness exists, repo fixtures
109112
4. Open a PR using the "New Skill" template
110113
5. Be prepared for review feedback — most new skills go through 1-2 revision cycles
111114

112115
---
113116

114117
## Skill Format Reference
115118

116-
Each skill is defined in `skill.yaml` with the following structure:
119+
Each skill is a directory at `skills/<domain>/<skill-name>/` with `SKILL.md` as
120+
the canonical entrypoint. The file starts with YAML frontmatter, followed by
121+
Markdown sections that define when to use the skill, what to detect, hard rules,
122+
remediation, verification, gotchas, and references.
123+
124+
### `SKILL.md` frontmatter
117125

118126
```yaml
119-
name: descriptive-skill-name
120-
version: "1.0"
127+
---
128+
name: descriptive-skill-name # kebab-case, matches the directory
129+
description: > # what it does + when it auto-invokes
130+
Reviews a target for a specific security outcome...
131+
tags: [appsec, review] # domain + activity keywords
132+
role: [security-engineer, appsec-engineer]
133+
phase: [build, review]
134+
frameworks: [OWASP-ASVS-4.0.3, CWE] # real framework IDs only
135+
difficulty: intermediate # beginner | intermediate | advanced
136+
time_estimate: "30-60min"
137+
version: "1.0.0"
121138
author: your-github-handle
122-
category: injection | xss | auth | crypto | secrets | config | dependency | other
123-
severity: critical | high | medium | low
124-
languages:
125-
- python
126-
- javascript
127-
# ... applicable languages
128-
129-
description: |
130-
One paragraph explaining what this skill detects, why it matters,
131-
and what the real-world impact of this vulnerability class is.
132-
133-
detection:
134-
patterns:
135-
- pattern: "the detection pattern or rule"
136-
description: "what this specific pattern catches"
137-
exceptions:
138-
- pattern: "patterns to exclude (reduce false positives)"
139-
description: "why this is safe"
140-
141-
remediation:
142-
approach: |
143-
Describe the fix strategy in plain English.
144-
automated: true | false
145-
fix:
146-
description: "what the automated fix does"
147-
# fix implementation details
148-
149-
references:
150-
- url: "https://cwe.mitre.org/data/definitions/XXX.html"
151-
description: "CWE reference"
152-
- url: "https://owasp.org/..."
153-
description: "OWASP reference"
154-
155-
metadata:
156-
cwe: ["CWE-XXX"]
157-
owasp: ["A01:2021"]
158-
created: "YYYY-MM-DD"
159-
last_updated: "YYYY-MM-DD"
139+
license: MIT
140+
allowed-tools: Read, Grep, Glob
141+
injection-hardened: true
142+
argument-hint: "[target-file-or-directory]"
143+
---
160144
```
161145

146+
Use [SKILL_TEMPLATE.md](SKILL_TEMPLATE.md) as the source of truth for the
147+
required body sections and submission checklist.
148+
162149
---
163150

164151
## Getting Started

0 commit comments

Comments
 (0)