Tool Skill Template
Use this template for static analysis tools (Semgrep, CodeQL), web tools (Burp Suite), and similar standalone tools.
Template Structure
---
name: {tool-name-lowercase}
type: tool
description: >
{Summary from handbook}. Use when {trigger conditions based on tool purpose}.
---
# {Tool Name}
{Brief introduction from handbook _index.md - 1-2 paragraphs max}
## When to Use
{Decision criteria from handbook "Ideal use case" or similar section}
**Use {Tool Name} when:**
- {Criterion 1}
- {Criterion 2}
- {Criterion 3}
**Consider alternatives when:**
- {Limitation 1} → Consider {Alternative Tool}
- {Limitation 2} → Consider {Alternative Tool}
## Quick Reference
| Task | Command |
|------|---------|
| {Task 1} | `{command 1}` |
| {Task 2} | `{command 2}` |
| {Task 3} | `{command 3}` |
## Installation
{Content from 00-installation.md or installation section}
### Prerequisites
{System requirements}
### Install Steps
{Step-by-step installation - preserve code blocks exactly}
### Verification
\```bash
{Command to verify installation}
\```
## Core Workflow
{Main usage patterns from handbook - the typical workflow}
### Step 1: {First Step}
{Instructions}
### Step 2: {Second Step}
{Instructions}
### Step 3: {Third Step}
{Instructions}
## How to Customize
{Include this section for tools that support custom rules/queries like Semgrep, CodeQL, etc.
Skip this section for simple CLI tools like golint that don't support user-defined rules.}
### Writing Custom {Rules/Queries}
{Basic structure and syntax}
\```{language}
{Template for custom rule/query with comments}
\```
### Key Syntax Reference
| Syntax/Operator | Description | Example |
|-----------------|-------------|---------|
| {Syntax 1} | {What it does} | `{example}` |
| {Syntax 2} | {What it does} | `{example}` |
### Example: {Common Use Case}
{Complete example of a custom rule/query for a realistic use case}
\```{language}
{Full working custom rule/query}
\```
### Testing Custom {Rules/Queries}
{How to validate that custom rules/queries work correctly}
\```bash
{Test command}
\```
## Configuration
{Settings, config files, ignore files}
### Configuration File
{Location and format of main config file}
\```{format}
{Example config file content}
\```
### Ignore Patterns
{How to exclude files/paths - .semgrepignore, .codeqlignore, etc.}
\```
{Example ignore patterns}
\```
### Suppressing False Positives
{How to suppress specific findings inline}
\```{language}
{Example suppression comment}
\```
## Advanced Usage
{Content from 10-advanced.md or advanced section}
### Tips and Tricks
{Practical tips from experienced users - extract from handbook hints/warnings}
| Tip | Why It Helps |
|-----|--------------|
| {Tip 1} | {Explanation} |
| {Tip 2} | {Explanation} |
### {Advanced Topic 1}
{Details}
### {Advanced Topic 2}
{Details}
### Performance Optimization
{How to speed up analysis for large codebases}
\```bash
{Performance-related flags or commands}
\```
## CI/CD Integration
{Content from 20-ci.md if available}
### GitHub Actions
\```yaml
{Example workflow - preserve exactly from handbook}
\```
### Other CI Systems
{General guidance for Jenkins, GitLab CI, etc.}
## Common Mistakes
{Extracted from handbook tips, hints, and warnings}
| Mistake | Why It's Wrong | Correct Approach |
|---------|----------------|------------------|
| {Mistake 1} | {Reason} | {Fix} |
| {Mistake 2} | {Reason} | {Fix} |
## Limitations
{What the tool cannot do - important for setting expectations}
- **{Limitation 1}:** {Explanation and when this matters}
- **{Limitation 2}:** {Explanation and when this matters}
- **{Limitation 3}:** {Explanation and when this matters}
## Related Skills
{Link to complementary skills - helps discoverability}
| Skill | When to Use Together |
|-------|---------------------|
| **{skill-name-1}** | {Integration scenario - e.g., "For advanced taint tracking beyond intraprocedural"} |
| **{skill-name-2}** | {Integration scenario} |
## Resources
{From 99-resources.md - fetch non-video URLs with WebFetch, extract insights}
### Key External Resources
{For each non-video URL: fetch with WebFetch, summarize key techniques/insights}
**[{Title 1}]({URL})**
{Summarized insights: key techniques, patterns, examples extracted from the page}
**[{Title 2}]({URL})**
{Summarized insights from fetched content}
### Video Resources
{Videos - title and URL only, no fetching}
- [{Video Title}]({YouTube/Vimeo URL}) - {Brief description from handbook}
Field Extraction Guide
| Template Field |
Handbook Source |
{tool-name-lowercase} |
Slugified title from _index.md |
{Summary from handbook} |
summary field from frontmatter |
{Tool Name} |
title field from frontmatter |
{trigger conditions} |
Derive from "Ideal use case" or benefits |
| Quick Reference commands |
Extract from code blocks in main content |
| Installation |
00-installation.md or installation section |
| How to Customize |
From custom rules/queries section (if tool supports it) |
| Configuration |
From config file documentation |
| Advanced Usage |
10-advanced.md or advanced section |
| CI/CD Integration |
20-ci.md if exists |
| Limitations |
Extract from "when not to use" or caveats |
| Resources |
99-resources.md or 91-resources.md |
Section Applicability Guide
Not all sections apply to every tool. Use this guide:
| Section |
When to Include |
| How to Customize |
Tool supports custom rules/queries (Semgrep, CodeQL, Bandit) |
| Configuration |
Tool has config files or significant options |
| CI/CD Integration |
Tool is commonly used in CI pipelines |
| Related Skills |
Complementary skills exist in the handbook |
Example: Semgrep
---
name: semgrep
type: tool
description: >
Fast static analysis for finding bugs, detecting vulnerabilities, and enforcing code standards.
Use when scanning code for security issues, enforcing patterns, or integrating into CI/CD pipelines.
---
# Semgrep
Semgrep is a highly efficient static analysis tool for finding low-complexity bugs and locating
specific code patterns. Because of its ease of use, no need to build the code, and convenient
creation of custom rules, it is usually the first tool to run on an audited codebase.
## When to Use
**Use Semgrep when:**
- Looking for low-complexity bugs with identifiable patterns
- Scanning single files (intraprocedural analysis)
- Detecting systemic bugs across codebase
- Enforcing secure defaults and code standards
**Consider alternatives when:**
- Analysis requires multiple files (cross-file) → Consider CodeQL
- Complex taint tracking is needed → Consider CodeQL
- Need to analyze build artifacts → Consider binary analysis tools
## Quick Reference
| Task | Command |
|------|---------|
| Scan with default rules | `semgrep --config=auto .` |
| Scan with specific rule | `semgrep --config=path/to/rule.yaml .` |
| Output JSON | `semgrep --json --config=auto .` |
## How to Customize
### Writing Custom Rules
Semgrep rules are YAML files with pattern matching. Basic structure:
\```yaml
rules:
- id: rule-id
languages: [python]
message: "Description of the issue: $VAR"
severity: ERROR
pattern: dangerous_function($VAR)
\```
### Key Syntax Reference
| Syntax | Description | Example |
|--------|-------------|---------|
| `...` | Match anything | `func(...)` |
| `$VAR` | Capture metavariable | `$FUNC($INPUT)` |
| `<... ...>` | Deep expression match | `<... user_input ...>` |
### Example: SQL Injection Detection
\```yaml
rules:
- id: sql-injection
languages: [python]
message: "Potential SQL injection with user input"
severity: ERROR
mode: taint
pattern-sources:
- pattern: request.args.get(...)
pattern-sinks:
- pattern: cursor.execute($QUERY)
pattern-sanitizers:
- pattern: int(...)
\```
### Testing Custom Rules
\```bash
# Create test file with # ruleid: and # ok: annotations
semgrep --test rules/
\```
## Limitations
- **Single-file analysis:** Cannot track data flow across files without Pro
- **No build required:** Cannot analyze compiled code or resolve dynamic dependencies
- **Pattern-based:** May miss vulnerabilities requiring semantic understanding
## Related Skills
| Skill | When to Use Together |
|-------|---------------------|
| **codeql** | For cross-file taint tracking and complex data flow |
| **sarif-parsing** | For processing Semgrep SARIF output in pipelines |
...
Notes
- Keep total lines under 500
- Preserve code blocks exactly from handbook
- Strip Hugo shortcodes (hints, tabs, etc.)
- Fetch non-video external resources with WebFetch, extract key insights
- For videos (YouTube, Vimeo): include title/URL only, do not fetch
- Include "How to Customize" ONLY for tools with extensibility (not simple linters)
- Include "Related Skills" to help users discover complementary tools
- If section doesn't exist in handbook, omit from skill
1---2name: tool-skill3description: Use this template for static analysis tools (Semgrep, CodeQL), web tools (Burp Suite), and similar standalone tools.4---5
6# Tool Skill Template
7
8Use this template for static analysis tools (Semgrep, CodeQL), web tools (Burp Suite), and similar standalone tools.
9
10## Template Structure
11
12```markdown
13---
14name: {tool-name-lowercase}
15type: tool
16description: >
17 {Summary from handbook}. Use when {trigger conditions based on tool purpose}.
18---
19
20# {Tool Name}
21
22{Brief introduction from handbook _index.md - 1-2 paragraphs max}
23
24## When to Use
25
26{Decision criteria from handbook "Ideal use case" or similar section}
27
28**Use {Tool Name} when:**
29- {Criterion 1}
30- {Criterion 2}
31- {Criterion 3}
32
33**Consider alternatives when:**
34- {Limitation 1} → Consider {Alternative Tool}
35- {Limitation 2} → Consider {Alternative Tool}
36
37## Quick Reference
38
39| Task | Command |
40|------|---------|
41| {Task 1} | `{command 1}` |
42| {Task 2} | `{command 2}` |
43| {Task 3} | `{command 3}` |
44
45## Installation
46
47{Content from 00-installation.md or installation section}
48
49### Prerequisites
50
51{System requirements}
52
53### Install Steps
54
55{Step-by-step installation - preserve code blocks exactly}
56
57### Verification
58
59\```bash
60{Command to verify installation}
61\```
62
63## Core Workflow
64
65{Main usage patterns from handbook - the typical workflow}
66
67### Step 1: {First Step}
68
69{Instructions}
70
71### Step 2: {Second Step}
72
73{Instructions}
74
75### Step 3: {Third Step}
76
77{Instructions}
78
79## How to Customize
80
81{Include this section for tools that support custom rules/queries like Semgrep, CodeQL, etc.
82Skip this section for simple CLI tools like golint that don't support user-defined rules.}
83
84### Writing Custom {Rules/Queries}
85
86{Basic structure and syntax}
87
88\```{language}
89{Template for custom rule/query with comments}
90\```
91
92### Key Syntax Reference
93
94| Syntax/Operator | Description | Example |
95|-----------------|-------------|---------|
96| {Syntax 1} | {What it does} | `{example}` |
97| {Syntax 2} | {What it does} | `{example}` |
98
99### Example: {Common Use Case}
100
101{Complete example of a custom rule/query for a realistic use case}
102
103\```{language}
104{Full working custom rule/query}
105\```
106
107### Testing Custom {Rules/Queries}
108
109{How to validate that custom rules/queries work correctly}
110
111\```bash
112{Test command}
113\```
114
115## Configuration
116
117{Settings, config files, ignore files}
118
119### Configuration File
120
121{Location and format of main config file}
122
123\```{format}
124{Example config file content}
125\```
126
127### Ignore Patterns
128
129{How to exclude files/paths - .semgrepignore, .codeqlignore, etc.}
130
131\```
132{Example ignore patterns}
133\```
134
135### Suppressing False Positives
136
137{How to suppress specific findings inline}
138
139\```{language}
140{Example suppression comment}
141\```
142
143## Advanced Usage
144
145{Content from 10-advanced.md or advanced section}
146
147### Tips and Tricks
148
149{Practical tips from experienced users - extract from handbook hints/warnings}
150
151| Tip | Why It Helps |
152|-----|--------------|
153| {Tip 1} | {Explanation} |
154| {Tip 2} | {Explanation} |
155
156### {Advanced Topic 1}
157
158{Details}
159
160### {Advanced Topic 2}
161
162{Details}
163
164### Performance Optimization
165
166{How to speed up analysis for large codebases}
167
168\```bash
169{Performance-related flags or commands}
170\```
171
172## CI/CD Integration
173
174{Content from 20-ci.md if available}
175
176### GitHub Actions
177
178\```yaml
179{Example workflow - preserve exactly from handbook}
180\```
181
182### Other CI Systems
183
184{General guidance for Jenkins, GitLab CI, etc.}
185
186## Common Mistakes
187
188{Extracted from handbook tips, hints, and warnings}
189
190| Mistake | Why It's Wrong | Correct Approach |
191|---------|----------------|------------------|
192| {Mistake 1} | {Reason} | {Fix} |
193| {Mistake 2} | {Reason} | {Fix} |
194
195## Limitations
196
197{What the tool cannot do - important for setting expectations}
198
199- **{Limitation 1}:** {Explanation and when this matters}
200- **{Limitation 2}:** {Explanation and when this matters}
201- **{Limitation 3}:** {Explanation and when this matters}
202
203## Related Skills
204
205{Link to complementary skills - helps discoverability}
206
207| Skill | When to Use Together |
208|-------|---------------------|
209| **{skill-name-1}** | {Integration scenario - e.g., "For advanced taint tracking beyond intraprocedural"} |
210| **{skill-name-2}** | {Integration scenario} |
211
212## Resources
213
214{From 99-resources.md - fetch non-video URLs with WebFetch, extract insights}
215
216### Key External Resources
217
218{For each non-video URL: fetch with WebFetch, summarize key techniques/insights}
219
220**[{Title 1}]({URL})**
221{Summarized insights: key techniques, patterns, examples extracted from the page}
222
223**[{Title 2}]({URL})**
224{Summarized insights from fetched content}
225
226### Video Resources
227
228{Videos - title and URL only, no fetching}
229
230- [{Video Title}]({YouTube/Vimeo URL}) - {Brief description from handbook}
231```
232
233## Field Extraction Guide
234
235| Template Field | Handbook Source |
236|----------------|-----------------|
237| `{tool-name-lowercase}` | Slugified title from `_index.md` |
238| `{Summary from handbook}` | `summary` field from frontmatter |
239| `{Tool Name}` | `title` field from frontmatter |
240| `{trigger conditions}` | Derive from "Ideal use case" or benefits |
241| Quick Reference commands | Extract from code blocks in main content |
242| Installation | `00-installation.md` or installation section |
243| How to Customize | From custom rules/queries section (if tool supports it) |
244| Configuration | From config file documentation |
245| Advanced Usage | `10-advanced.md` or advanced section |
246| CI/CD Integration | `20-ci.md` if exists |
247| Limitations | Extract from "when not to use" or caveats |
248| Resources | `99-resources.md` or `91-resources.md` |
249
250## Section Applicability Guide
251
252Not all sections apply to every tool. Use this guide:
253
254| Section | When to Include |
255|---------|-----------------|
256| How to Customize | Tool supports custom rules/queries (Semgrep, CodeQL, Bandit) |
257| Configuration | Tool has config files or significant options |
258| CI/CD Integration | Tool is commonly used in CI pipelines |
259| Related Skills | Complementary skills exist in the handbook |
260
261## Example: Semgrep
262
263```markdown
264---
265name: semgrep
266type: tool
267description: >
268 Fast static analysis for finding bugs, detecting vulnerabilities, and enforcing code standards.
269 Use when scanning code for security issues, enforcing patterns, or integrating into CI/CD pipelines.
270---
271
272# Semgrep
273
274Semgrep is a highly efficient static analysis tool for finding low-complexity bugs and locating
275specific code patterns. Because of its ease of use, no need to build the code, and convenient
276creation of custom rules, it is usually the first tool to run on an audited codebase.
277
278## When to Use
279
280**Use Semgrep when:**
281- Looking for low-complexity bugs with identifiable patterns
282- Scanning single files (intraprocedural analysis)
283- Detecting systemic bugs across codebase
284- Enforcing secure defaults and code standards
285
286**Consider alternatives when:**
287- Analysis requires multiple files (cross-file) → Consider CodeQL
288- Complex taint tracking is needed → Consider CodeQL
289- Need to analyze build artifacts → Consider binary analysis tools
290
291## Quick Reference
292
293| Task | Command |
294|------|---------|
295| Scan with default rules | `semgrep --config=auto .` |
296| Scan with specific rule | `semgrep --config=path/to/rule.yaml .` |
297| Output JSON | `semgrep --json --config=auto .` |
298
299## How to Customize
300
301### Writing Custom Rules
302
303Semgrep rules are YAML files with pattern matching. Basic structure:
304
305\```yaml
306rules:
307 - id: rule-id
308 languages: [python]
309 message: "Description of the issue: $VAR"
310 severity: ERROR
311 pattern: dangerous_function($VAR)
312\```
313
314### Key Syntax Reference
315
316| Syntax | Description | Example |
317|--------|-------------|---------|
318| `...` | Match anything | `func(...)` |
319| `$VAR` | Capture metavariable | `$FUNC($INPUT)` |
320| `<... ...>` | Deep expression match | `<... user_input ...>` |
321
322### Example: SQL Injection Detection
323
324\```yaml
325rules:
326 - id: sql-injection
327 languages: [python]
328 message: "Potential SQL injection with user input"
329 severity: ERROR
330 mode: taint
331 pattern-sources:
332 - pattern: request.args.get(...)
333 pattern-sinks:
334 - pattern: cursor.execute($QUERY)
335 pattern-sanitizers:
336 - pattern: int(...)
337\```
338
339### Testing Custom Rules
340
341\```bash
342# Create test file with # ruleid: and # ok: annotations
343semgrep --test rules/
344\```
345
346## Limitations
347
348- **Single-file analysis:** Cannot track data flow across files without Pro
349- **No build required:** Cannot analyze compiled code or resolve dynamic dependencies
350- **Pattern-based:** May miss vulnerabilities requiring semantic understanding
351
352## Related Skills
353
354| Skill | When to Use Together |
355|-------|---------------------|
356| **codeql** | For cross-file taint tracking and complex data flow |
357| **sarif-parsing** | For processing Semgrep SARIF output in pipelines |
358
359...
360```
361
362## Notes
363
364- Keep total lines under 500
365- Preserve code blocks exactly from handbook
366- Strip Hugo shortcodes (hints, tabs, etc.)
367- Fetch non-video external resources with WebFetch, extract key insights
368- For videos (YouTube, Vimeo): include title/URL only, do not fetch
369- Include "How to Customize" ONLY for tools with extensibility (not simple linters)
370- Include "Related Skills" to help users discover complementary tools
371- If section doesn't exist in handbook, omit from skill