@softspark/ai-toolkit 1.3.13 → 1.3.15

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/LICENSE +1 -1
  3. package/README.md +59 -18
  4. package/app/ARCHITECTURE.md +2 -1
  5. package/app/agents/backend-specialist.md +8 -0
  6. package/app/agents/code-reviewer.md +9 -0
  7. package/app/agents/database-architect.md +8 -0
  8. package/app/agents/debugger.md +8 -0
  9. package/app/agents/devops-implementer.md +8 -0
  10. package/app/agents/documenter.md +8 -0
  11. package/app/agents/frontend-specialist.md +8 -0
  12. package/app/agents/performance-optimizer.md +8 -0
  13. package/app/agents/security-auditor.md +25 -1
  14. package/app/agents/test-engineer.md +9 -0
  15. package/app/skills/analyze/SKILL.md +15 -0
  16. package/app/skills/api-patterns/SKILL.md +10 -0
  17. package/app/skills/ci-cd-patterns/SKILL.md +10 -0
  18. package/app/skills/clean-code/SKILL.md +10 -0
  19. package/app/skills/cve-scan/SKILL.md +134 -0
  20. package/app/skills/cve-scan/scripts/cve_scan.py +412 -0
  21. package/app/skills/database-patterns/SKILL.md +10 -0
  22. package/app/skills/debug/SKILL.md +16 -0
  23. package/app/skills/docs/SKILL.md +16 -0
  24. package/app/skills/git-mastery/SKILL.md +10 -0
  25. package/app/skills/onboard/SKILL.md +15 -0
  26. package/app/skills/performance-profiling/SKILL.md +10 -0
  27. package/app/skills/plan/SKILL.md +16 -0
  28. package/app/skills/refactor/SKILL.md +16 -0
  29. package/app/skills/review/SKILL.md +58 -3
  30. package/app/skills/security-patterns/SKILL.md +10 -0
  31. package/app/skills/tdd/SKILL.md +6 -0
  32. package/app/skills/testing-patterns/SKILL.md +10 -0
  33. package/app/skills/workflow/SKILL.md +3 -3
  34. package/kb/reference/architecture-overview.md +20 -3
  35. package/kb/reference/skills-catalog.md +60 -3
  36. package/llms-full.txt +81 -6
  37. package/manifest.json +3 -3
  38. package/package.json +2 -2
  39. package/scripts/check_deps.py +52 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,40 @@ Versioning follows [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## v1.3.15 — Quality Guardrails: Anti-Rationalization, Confidence Scoring, Verification Checklists (2026-04-08)
11
+
12
+ ### Added
13
+ - **Anti-rationalization tables** — 15 core skills now include `## Common Rationalizations` sections with domain-specific excuse/rebuttal tables that prevent agent drift and shortcut-taking. Inspired by [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills).
14
+ - **Confidence scoring** (`/review`) — review findings now include per-issue confidence scores (1-10) and severity classification (critical/major/minor/nit) with a calibration guide.
15
+ - **LLM-as-Judge self-evaluation** (`/review`) — structured self-check after review: blind spot detection, anchoring bias check, and confidence calibration.
16
+ - **Agent verification checklists** — 10 key agents (`code-reviewer`, `test-engineer`, `security-auditor`, `debugger`, `backend-specialist`, `frontend-specialist`, `database-architect`, `performance-optimizer`, `devops-implementer`, `documenter`) now include `## Verification Checklist` exit criteria.
17
+ - **Skill reference routing** — 7 core skills (`/review`, `/debug`, `/plan`, `/refactor`, `/tdd`, `/docs`, `/analyze`) include `## Related Skills` sections for follow-up discoverability.
18
+ - **Intent Capture Interview** (`/onboard`) — Step 0 interview phase with 5 targeted questions to capture undocumented project intent before setup.
19
+
20
+ ---
21
+
22
+ ## v1.3.14 — CVE Scanner + Open Contributions (2026-04-08)
23
+
24
+ ### Added
25
+ - **`/cve-scan` skill** — auto-detect project ecosystems (npm, pip, composer, cargo, go, ruby, dart) and scan dependencies for known CVEs using native audit tools. Includes `cve_scan.py` scanner script with parsers for npm and pip-audit, unified severity report, `--fix` and `--json` modes.
26
+ - **CVE scan in security-auditor agent** — `/cve-scan` is now a mandatory first step in the OWASP A06 (Vulnerable Components) checklist.
27
+ - **CVE scan in `/workflow security-audit`** — security-auditor agent runs CVE scan as part of the parallel audit phase.
28
+ - **`security-audit` CI job** — `audit_skills.py --ci` now runs in GitHub Actions pipeline.
29
+ - **`CODE_OF_CONDUCT.md` in CI** — added to required files check.
30
+ - **`.github/CODEOWNERS`** — auto-assigns maintainer for review.
31
+ - **`.github/FUNDING.yml`** — GitHub Sponsors configuration.
32
+ - **GitHub Security Advisories** — added CVE/advisory procedure to `SECURITY.md`.
33
+ - **Open contribution workflow** — full `CONTRIBUTING.md` rewrite (fork, branch naming, commit conventions, CI requirements), PR checklist template, blank issues enabled.
34
+
35
+ ### Removed
36
+ - **`close-prs.yml`** — removed auto-close workflow to accept external PRs.
37
+
38
+ ### Fixed
39
+ - **Copyright** — `LICENSE` updated from `2024-present` to `2024-2026`.
40
+ - **`SECURITY.md`** — removed duplicate Scope section.
41
+
42
+ ---
43
+
10
44
  ## v1.3.13 — CLI --version flag (2026-04-08)
11
45
 
12
46
  ### Added
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024-present Lukasz Krzemien (biuro@softspark.eu)
3
+ Copyright (c) 2024-2026 Lukasz Krzemien (biuro@softspark.eu)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # ai-toolkit
2
2
 
3
- > Professional-grade AI coding toolkit with multi-platform support. Machine-enforced safety, 90 skills, 44 agents, expanded lifecycle hooks, persona presets, experimental opt-in plugin packs, and benchmark tooling — works with Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, and Augment, ready in 60 seconds.
3
+ > Professional-grade AI coding toolkit with multi-platform support. Machine-enforced safety, 91 skills, 44 agents, expanded lifecycle hooks, persona presets, experimental opt-in plugin packs, and benchmark tooling — works with Claude, Cursor, Windsurf, Copilot, Gemini, Cline, Roo Code, Aider, and Augment, ready in 60 seconds.
4
4
 
5
5
  [![CI](https://github.com/softspark/ai-toolkit/actions/workflows/ci.yml/badge.svg)](https://github.com/softspark/ai-toolkit/actions/workflows/ci.yml)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
- [![Skills](https://img.shields.io/badge/skills-90-brightgreen)](app/skills/)
7
+ [![Skills](https://img.shields.io/badge/skills-91-brightgreen)](app/skills/)
8
8
  [![Agents](https://img.shields.io/badge/agents-44-blue)](app/agents/)
9
9
  [![Tests](https://img.shields.io/badge/tests-377%20passing-success)](tests/)
10
10
 
@@ -21,7 +21,7 @@ ai-toolkit install
21
21
  npx @softspark/ai-toolkit install
22
22
  ```
23
23
 
24
- **That's it.** Claude Code picks up 90 skills, 44 agents, quality hooks, and the safety constitution automatically.
24
+ **That's it.** Claude Code picks up 91 skills, 44 agents, quality hooks, and the safety constitution automatically.
25
25
 
26
26
  ### Update
27
27
 
@@ -134,7 +134,7 @@ Replaces all symlinks with real files, inlines rules into CLAUDE.md, copies cons
134
134
  | Component | Count | Description |
135
135
  |-----------|-------|-------------|
136
136
  | `skills/` (task) | 28 | Slash commands: `/commit`, `/build`, `/deploy`, `/test`, `/skill-audit`, ... |
137
- | `skills/` (hybrid) | 30 | Slash commands with agent knowledge base |
137
+ | `skills/` (hybrid) | 31 | Slash commands with agent knowledge base |
138
138
  | `skills/` (knowledge) | 32 | Domain knowledge auto-loaded by agents |
139
139
  | `agents/` | 44 | Specialized agents across 10 categories |
140
140
  | `hooks/` | 21 global + 5 skill-scoped | Quality gates, path safety, CLAUDE.md enforcement, notifications, prompt governance, subagent lifecycle, session-end handoff, usage tracking, config protection, MCP health, governance audit |
@@ -156,7 +156,7 @@ ai-toolkit/
156
156
  │ │ ├── backend-specialist.md
157
157
  │ │ ├── security-architect.md
158
158
  │ │ └── ... (41 more)
159
- │ ├── skills/ # 90 skills (task / hybrid / knowledge)
159
+ │ ├── skills/ # 91 skills (task / hybrid / knowledge)
160
160
  │ │ ├── commit/ # /commit slash command
161
161
  │ │ ├── review/ # /review slash command
162
162
  │ │ ├── clean-code/ # knowledge skill (auto-loaded)
@@ -223,6 +223,7 @@ ai-toolkit/
223
223
  | `/agent-creator` | Scaffold a new specialized agent with tools and trigger guidance | high |
224
224
  | `/plugin-creator` | Scaffold an experimental plugin pack with manifest and optional modules | high |
225
225
  | `/skill-audit` | Scan skills/agents for security risks: dangerous patterns, secrets, permissions | medium |
226
+ | `/cve-scan` | Scan project dependencies for known CVEs using native audit tools (npm, pip, composer, cargo, go, ruby, dart) | medium |
226
227
  | `/analyze` | Code quality, complexity, and pattern analysis | medium |
227
228
  | `/fix` | Auto-fix lint/type errors | low |
228
229
  | `/build` | Build with issue detection | low |
@@ -329,25 +330,28 @@ Hook logic lives in `app/hooks/*.sh` — not inline JSON one-liners. Scripts are
329
330
  | `/migrate` | Pre | Backup verification |
330
331
  | `/rollback` | Post | State verification |
331
332
 
332
- ### 3. Skill Security Auditing
333
+ ### 3. Security Scanning
333
334
 
334
- Scan all skills and agents for security risks — both interactively and in CI:
335
+ Two complementary security tools:
336
+
337
+ **`/skill-audit`** — scan skills and agents for code-level risks:
335
338
 
336
339
  ```bash
337
- # Interactive (Claude provides remediation suggestions)
338
- /skill-audit
340
+ /skill-audit # Interactive (Claude remediation)
341
+ python3 scripts/audit_skills.py --ci # CI mode: exit 1 on HIGH
342
+ ```
343
+
344
+ Detects: `eval()`/`exec()`, hardcoded secrets, permission issues, bash risks.
339
345
 
340
- # Deterministic Python scanner for CI pipelines
341
- python3 scripts/audit_skills.py # human-readable report
342
- python3 scripts/audit_skills.py --json # machine-readable JSON
343
- python3 scripts/audit_skills.py --ci # exit 1 on any HIGH finding
346
+ **`/cve-scan`** scan project dependencies for known CVEs:
347
+
348
+ ```bash
349
+ /cve-scan # Auto-detect ecosystems, scan all
350
+ python3 app/skills/cve-scan/scripts/cve_scan.py # Direct invocation
351
+ python3 app/skills/cve-scan/scripts/cve_scan.py --json # Machine-readable
344
352
  ```
345
353
 
346
- **What it detects:**
347
- - Dangerous code: `eval()`, `exec()`, `subprocess(shell=True)`, `pickle.loads`
348
- - Hardcoded secrets: AWS keys, GitHub PATs, private keys, API tokens
349
- - Permission issues: knowledge skills with Bash, missing `allowed-tools`
350
- - Bash risks: `curl | bash`, `chmod 777`, unquoted variables
354
+ Supports: npm, pip, composer, cargo, go, ruby, dart. Uses native audit tools — zero external deps.
351
355
 
352
356
  **Severity levels:** HIGH (blocks CI), WARN (should fix), INFO (review)
353
357
 
@@ -381,6 +385,43 @@ Three skills enforce non-negotiable quality gates with anti-rationalization tabl
381
385
  | `debugging-tactics` | `NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST` | 4-phase debugging: root cause → pattern → hypothesis → fix. 3+ failed fixes → question architecture. |
382
386
  | `verification-before-completion` | `NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE` | Gate function: IDENTIFY → RUN → READ → VERIFY → CLAIM. "Should work now" is not evidence. |
383
387
 
388
+ Additionally, **15 core skills** include `## Common Rationalizations` tables — domain-specific excuses with rebuttals that prevent agent drift and shortcut-taking. Skills with rationalization tables: `/review`, `/debug`, `/refactor`, `/tdd`, `/plan`, `/docs`, `/analyze`, `security-patterns`, `testing-patterns`, `api-patterns`, `ci-cd-patterns`, `clean-code`, `performance-profiling`, `git-mastery`, `database-patterns`.
389
+
390
+ ### Confidence Scoring & Self-Evaluation (`/review`)
391
+
392
+ The `/review` skill outputs findings with per-issue confidence scores (1-10) and severity classification (critical/major/minor/nit). After completing a review, an LLM-as-Judge self-evaluation pass checks for blind spots: anchoring bias, assumption vs verification, missing unhappy paths, and calibrates confidence scores.
393
+
394
+ ### Agent Verification Checklists
395
+
396
+ 10 key agents include `## Verification Checklist` — exit criteria that MUST be met before presenting results. Each checklist is domain-specific:
397
+
398
+ | Agent | Key exit criteria |
399
+ |-------|------------------|
400
+ | `code-reviewer` | Every finding has file:line + evidence, not just opinion |
401
+ | `security-auditor` | Each finding includes proof-of-concept or exploit path |
402
+ | `test-engineer` | No empty/placeholder tests, mocks only at boundaries |
403
+ | `debugger` | Root cause identified, regression test added |
404
+ | `backend-specialist` | Input validation, error format, query optimization |
405
+ | `frontend-specialist` | Empty/loading/error states, accessibility, responsive |
406
+ | `database-architect` | Migration tested on prod-like volume, rollback tested |
407
+ | `performance-optimizer` | Baseline measured, profiler evidence attached |
408
+ | `devops-implementer` | Dry run passed, rollback documented, no hardcoded secrets |
409
+ | `documenter` | Code examples runnable, no placeholders, valid links |
410
+
411
+ ### Skill Reference Routing
412
+
413
+ 7 core skills include `## Related Skills` sections that suggest logical follow-up skills, improving discoverability:
414
+
415
+ ```
416
+ /review → found issues? → /debug, /tdd, /cve-scan, /analyze
417
+ /debug → bug fixed? → /review, /tdd, /workflow incident-response
418
+ /plan → approved? → /orchestrate, /write-a-prd, /grill-me
419
+ ```
420
+
421
+ ### Intent Capture Interview (`/onboard`)
422
+
423
+ The `/onboard` skill now includes a Step 0 interview phase before setup — asking 5 targeted questions to capture undocumented project intent (common contributor mistakes, protected files, deployment model, non-obvious constraints, review culture). Answers customize the generated `CLAUDE.md`.
424
+
384
425
  ### 7. Two-Stage Review (`/subagent-development`)
385
426
 
386
427
  Per-task review pipeline inspired by [obra/superpowers](https://github.com/obra/superpowers):
@@ -134,7 +134,7 @@ Universal multi-agent system for software development. Works across all reposito
134
134
  | `prd-to-issues` | `/prd-to-issues` | Break PRD into GitHub issues with vertical slices and HITL/AFK tagging |
135
135
  | `skill-audit` | `/skill-audit` | Scan skills and agents for security risks, dangerous patterns, secrets |
136
136
 
137
- ### Hybrid Skills (30)
137
+ ### Hybrid Skills (31)
138
138
  | Skill | Slash Command | Purpose |
139
139
  |-------|---------------|---------|
140
140
  | `explore` | `/explore` | Codebase exploration and tech stack discovery |
@@ -143,6 +143,7 @@ Universal multi-agent system for software development. Works across all reposito
143
143
  | `plan` | `/plan` | Create structured plan with task breakdown |
144
144
  | `refactor` | `/refactor` | Plan and execute code refactoring with safety checks |
145
145
  | `analyze` | `/analyze` | Analyze code quality, complexity, and patterns |
146
+ | `cve-scan` | `/cve-scan` | Scan project dependencies for CVEs using native tools (npm, pip, composer, cargo, go, ruby, dart) |
146
147
  | `docs` | `/docs` | Generate/update documentation (README, API docs, architecture notes) |
147
148
  | `search` | `/search` | Search knowledge base (MCP + local fallback) |
148
149
  | `explain` | `/explain` | Explain file/module architecture with Mermaid diagrams |
@@ -184,6 +184,14 @@ After implementing significant changes, update documentation:
184
184
  ### Delegation
185
185
  For large documentation tasks, hand off to `documenter` agent.
186
186
 
187
+ ## Verification Checklist
188
+ Before presenting implementation:
189
+ - [ ] All new endpoints have input validation
190
+ - [ ] Error responses follow the project's error format
191
+ - [ ] Database queries are optimized (checked with EXPLAIN if applicable)
192
+ - [ ] New dependencies are justified and audited
193
+ - [ ] Migration is reversible
194
+
187
195
  ## KB Integration
188
196
 
189
197
  Before coding, search knowledge base:
@@ -177,6 +177,15 @@ After significant reviews, update documentation:
177
177
  ### Delegation
178
178
  For large documentation tasks, hand off to `documenter` agent.
179
179
 
180
+ ## Verification Checklist
181
+ Before presenting review results:
182
+ - [ ] Every finding includes file:line reference
183
+ - [ ] Each finding has evidence (code snippet or reasoning), not just opinion
184
+ - [ ] Severity rating reflects actual impact, not gut feeling
185
+ - [ ] "No findings" includes list of specific checks performed
186
+ - [ ] Security-sensitive files received deeper scrutiny
187
+ - [ ] Test coverage gaps are flagged, not assumed covered
188
+
180
189
  ## Limitations
181
190
 
182
191
  - **Security penetration testing** → Use `security-auditor`
@@ -308,6 +308,14 @@ After schema/database changes, update documentation:
308
308
  ### Delegation
309
309
  For large documentation tasks, hand off to `documenter` agent.
310
310
 
311
+ ## Verification Checklist
312
+ Before presenting schema changes:
313
+ - [ ] Migration tested on production-like data volume
314
+ - [ ] Rollback script exists and was tested
315
+ - [ ] Indexes cover the expected query patterns
316
+ - [ ] No long-running locks on large tables
317
+ - [ ] Application handles both old and new schema during migration
318
+
311
319
  ## KB Integration
312
320
 
313
321
  Before designing, search knowledge base:
@@ -231,6 +231,14 @@ After fixing significant bugs, update documentation:
231
231
  ### Delegation
232
232
  For large documentation tasks, hand off to `documenter` agent.
233
233
 
234
+ ## Verification Checklist
235
+ Before claiming a bug is fixed:
236
+ - [ ] Root cause identified, not just symptoms addressed
237
+ - [ ] Fix was verified by reproducing the original failure first
238
+ - [ ] Regression test added to prevent recurrence
239
+ - [ ] Related code paths checked for similar issues
240
+ - [ ] Fix doesn't introduce new side effects
241
+
234
242
  ## Limitations
235
243
 
236
244
  - **Performance profiling** → Use `performance-optimizer`
@@ -187,6 +187,14 @@ instructions: |
187
187
  ---
188
188
  ```
189
189
 
190
+ ## Verification Checklist
191
+ Before presenting infrastructure changes:
192
+ - [ ] Dry run completed successfully
193
+ - [ ] Rollback procedure documented and tested
194
+ - [ ] Secrets are not hardcoded or logged
195
+ - [ ] Health checks configured for new services
196
+ - [ ] Resource limits set to prevent runaway costs
197
+
190
198
  ## Limitations
191
199
 
192
200
  - **Architectural decisions** → Use `infrastructure-architect`
@@ -357,6 +357,14 @@ last_updated: "YYYY-MM-DD"
357
357
  - Add diagrams where helpful
358
358
  - Version documentation with code
359
359
 
360
+ ## Verification Checklist
361
+ Before presenting documentation:
362
+ - [ ] Code examples are tested and runnable
363
+ - [ ] No placeholder text or TODO markers remain
364
+ - [ ] Links and references are valid
365
+ - [ ] Architecture decisions include rationale (not just "what")
366
+ - [ ] KB documents have complete YAML frontmatter
367
+
360
368
  ## Limitations
361
369
 
362
370
  - **Code implementation** → Use `devops-implementer`
@@ -200,6 +200,14 @@ After implementing significant changes, update documentation:
200
200
  ### Delegation
201
201
  For large documentation tasks, hand off to `documenter` agent.
202
202
 
203
+ ## Verification Checklist
204
+ Before presenting implementation:
205
+ - [ ] Components render correctly with empty/loading/error states
206
+ - [ ] Accessibility basics checked (keyboard nav, aria labels, contrast)
207
+ - [ ] No console errors or warnings in dev tools
208
+ - [ ] Responsive behavior verified at mobile/tablet/desktop breakpoints
209
+ - [ ] Bundle size impact assessed for new dependencies
210
+
203
211
  ## KB Integration
204
212
 
205
213
  Before coding, search knowledge base:
@@ -247,6 +247,14 @@ After performance optimizations, update documentation:
247
247
  ### Delegation
248
248
  For large documentation tasks, hand off to `documenter` agent.
249
249
 
250
+ ## Verification Checklist
251
+ Before presenting optimization:
252
+ - [ ] Baseline measurement taken before changes
253
+ - [ ] Improvement measured with realistic data, not synthetic benchmarks
254
+ - [ ] No regressions in other metrics (memory, latency, correctness)
255
+ - [ ] Optimization targets the actual bottleneck (profiler evidence attached)
256
+ - [ ] Cache invalidation strategy documented if caching was added
257
+
250
258
  ## Limitations
251
259
 
252
260
  - **Production incidents** → Use `incident-responder`
@@ -63,7 +63,7 @@ hybrid_search_kb(query="vulnerability {type}", limit=10)
63
63
  - [ ] Unnecessary features disabled
64
64
 
65
65
  ### A06:2021 - Vulnerable Components
66
- - [ ] Dependencies scanned for CVEs
66
+ - [ ] Dependencies scanned for CVEs — **run `/cve-scan` or `python3 ${SKILL_DIR}/cve-scan/scripts/cve_scan.py`**
67
67
  - [ ] Components up to date
68
68
  - [ ] SBOM maintained
69
69
 
@@ -91,6 +91,21 @@ hybrid_search_kb(query="vulnerability {type}", limit=10)
91
91
 
92
92
  ## Security Audit Commands
93
93
 
94
+ ### Dependency CVE Scan (MANDATORY — run FIRST)
95
+
96
+ ```bash
97
+ # Auto-detect ecosystems and scan all dependencies for CVEs
98
+ python3 app/skills/cve-scan/scripts/cve_scan.py
99
+
100
+ # JSON output for structured analysis
101
+ python3 app/skills/cve-scan/scripts/cve_scan.py --json
102
+
103
+ # Or use the skill interactively
104
+ /cve-scan
105
+ ```
106
+
107
+ ### Code & Infrastructure Scans
108
+
94
109
  ```bash
95
110
  # Check for secrets in code
96
111
  docker exec {app-container} gitleaks detect --source=/app
@@ -286,6 +301,15 @@ For large documentation tasks, hand off to `documenter` agent.
286
301
  - No destructive testing without explicit approval
287
302
  - Report findings responsibly
288
303
 
304
+ ## Verification Checklist
305
+ Before presenting security findings:
306
+ - [ ] Each finding includes proof-of-concept or exploit path
307
+ - [ ] Severity ratings reference actual impact, not theoretical risk
308
+ - [ ] "No findings" includes the specific checks performed
309
+ - [ ] Dependencies were scanned, not just application code
310
+ - [ ] Secrets scan covered all file types (not just source code)
311
+ - [ ] Auth flows were traced end-to-end, not spot-checked
312
+
289
313
  ## Limitations
290
314
 
291
315
  - **Code implementation** → Use `devops-implementer`
@@ -257,6 +257,15 @@ After writing significant tests, update documentation:
257
257
  ### Delegation
258
258
  For large documentation tasks, hand off to `documenter` agent.
259
259
 
260
+ ## Verification Checklist
261
+ Before presenting test results:
262
+ - [ ] Every test has a clear assertion (no empty or placeholder tests)
263
+ - [ ] Edge cases are explicitly tested, not assumed
264
+ - [ ] Mocks are only at system boundaries, not internal collaborators
265
+ - [ ] Test names describe behavior, not implementation
266
+ - [ ] Flaky test patterns (time, network, order-dependent) are flagged
267
+ - [ ] Coverage gaps are reported with specific uncovered paths
268
+
260
269
  ## Limitations
261
270
 
262
271
  - **Code implementation** → Use `devops-implementer`
@@ -82,6 +82,15 @@ python3 ${CLAUDE_SKILL_DIR}/scripts/complexity.py .
82
82
 
83
83
  Reports file counts by type, largest files, TODO/FIXME counts, and total code lines.
84
84
 
85
+ ## Common Rationalizations
86
+
87
+ | Excuse | Why It's Wrong |
88
+ |--------|----------------|
89
+ | "The linter is green, the code is fine" | Linters catch syntax, not design flaws — analysis covers architecture and patterns |
90
+ | "We know where the problems are" | Intuition misses systemic issues — data-driven analysis reveals hidden hotspots |
91
+ | "Analysis takes too long" | A 5-minute scan prevents weeks of debugging — front-load the investment |
92
+ | "It's legacy code, analysis won't help" | Legacy code benefits most — find the critical paths before they break |
93
+
85
94
  ## Tools Used
86
95
 
87
96
  | Language | Tools |
@@ -90,3 +99,9 @@ Reports file counts by type, largest files, TODO/FIXME counts, and total code li
90
99
  | JavaScript | eslint, tsc |
91
100
  | Go | golangci-lint |
92
101
  | Rust | clippy |
102
+
103
+ ## Related Skills
104
+ - Found quality issues? → `/refactor` to fix them systematically
105
+ - Security issues detected? → `/cve-scan` for dependency audit
106
+ - Want deeper architecture review? → `/architecture-audit` for friction discovery
107
+ - Performance hotspots found? → `/workflow performance-optimization`
@@ -292,6 +292,16 @@ Accept: application/vnd.myapi.v1+json
292
292
 
293
293
  ---
294
294
 
295
+ ## Common Rationalizations
296
+
297
+ | Excuse | Why It's Wrong |
298
+ |--------|----------------|
299
+ | "We'll version the API later" | Unversioned APIs break clients on every change — version from day one |
300
+ | "Retries are the client's problem" | Server-side idempotency prevents data corruption — design for at-least-once delivery |
301
+ | "We'll add rate limiting later" | Unprotected endpoints get abused within hours of deployment |
302
+ | "Error messages are just for debugging" | Error responses are your API's UX — clients depend on consistent, parseable errors |
303
+ | "PATCH and PUT are the same thing" | PUT replaces the resource, PATCH modifies it — wrong semantics cause data loss |
304
+
295
305
  ## Best Practices
296
306
 
297
307
  - [ ] Use HTTPS only
@@ -291,6 +291,16 @@ env:
291
291
  | `feat:` | Minor (0.x.0) | `feat: add user search endpoint` |
292
292
  | `feat!:` / `BREAKING CHANGE:` | Major (x.0.0) | `feat!: change API response format` |
293
293
 
294
+ ## Common Rationalizations
295
+
296
+ | Excuse | Why It's Wrong |
297
+ |--------|----------------|
298
+ | "CI is green, ship it" | CI tests the happy path — verify edge cases, security, and performance separately |
299
+ | "Manual deploys give us more control" | Manual deploys give you more human error — automate the repeatable parts |
300
+ | "We'll set up CI when the project is bigger" | Small projects grow fast — CI debt compounds and retrofitting is painful |
301
+ | "Caching isn't worth the complexity" | Uncached builds waste developer time daily — caching pays for itself in a week |
302
+ | "Feature flags are over-engineering" | Feature flags decouple deploy from release — they're the cheapest safety net |
303
+
294
304
  ## Anti-Patterns
295
305
  - Secrets in pipeline logs or environment dumps
296
306
  - No caching (slow builds)
@@ -100,6 +100,16 @@ Keep modules focused. Order contents consistently: imports (stdlib, third-party,
100
100
 
101
101
  ---
102
102
 
103
+ ## Common Rationalizations
104
+
105
+ | Excuse | Why It's Wrong |
106
+ |--------|----------------|
107
+ | "It's readable enough" | "Enough" means someone will misread it eventually — clarity prevents incidents |
108
+ | "Refactoring for readability is gold-plating" | Readability is maintainability — future you will thank present you |
109
+ | "Short variable names are faster to type" | You type it once, readers parse it hundreds of times — optimize for reading |
110
+ | "DRY means never repeat anything" | Wrong DRY creates coupling — duplicate until you see the real abstraction |
111
+ | "More abstractions = cleaner code" | Premature abstraction is worse than duplication — wait for the third use |
112
+
103
113
  ## Language-Specific References
104
114
 
105
115
  For detailed patterns, type hints, linting configuration, and idiomatic code per language:
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: cve-scan
3
+ description: "Scan project dependencies for known CVEs using native audit tools (npm, pip, composer, cargo, go, bundler, dart)"
4
+ user-invocable: true
5
+ effort: medium
6
+ argument-hint: "[--ecosystem npm|pip|composer|cargo|go|ruby|dart] [--fix] [--json]"
7
+ allowed-tools: Read, Grep, Glob, Bash
8
+ ---
9
+
10
+ # /cve-scan - Dependency CVE Scanner
11
+
12
+ $ARGUMENTS
13
+
14
+ Detect project ecosystems and scan dependencies for known vulnerabilities using native audit tools. Zero external dependencies — uses tools already installed in the project environment.
15
+
16
+ ## Usage
17
+
18
+ ```
19
+ /cve-scan # Auto-detect all ecosystems, scan all
20
+ /cve-scan --ecosystem npm # Force specific ecosystem
21
+ /cve-scan --fix # Auto-fix where possible (npm audit fix, etc.)
22
+ /cve-scan --json # Machine-readable JSON output
23
+ ```
24
+
25
+ ## What This Command Does
26
+
27
+ 1. **Detect** package managers by lock/manifest files in the project
28
+ 2. **Run** the native audit command for each detected ecosystem
29
+ 3. **Parse** results into a unified severity-based report
30
+ 4. **Report** CVE IDs, affected packages, installed vs fixed versions, advisory links
31
+ 5. **Fix** automatically when `--fix` is passed (where the tool supports it)
32
+
33
+ ## Ecosystem Detection & Commands
34
+
35
+ | Manifest File | Lock File | Ecosystem | Audit Command | CVE Database |
36
+ |---------------|-----------|-----------|---------------|--------------|
37
+ | `package.json` | `package-lock.json` / `yarn.lock` / `pnpm-lock.yaml` | npm/yarn/pnpm | `npm audit --json` / `yarn audit --json` / `pnpm audit --json` | GitHub Advisory DB |
38
+ | `requirements.txt` / `pyproject.toml` / `setup.py` | `requirements.txt` | pip | `pip-audit --format=json` | OSV / PyPI Advisory |
39
+ | `composer.json` | `composer.lock` | composer | `composer audit --format=json` | Packagist / FriendsOfPHP |
40
+ | `Cargo.toml` | `Cargo.lock` | cargo | `cargo audit --json` | RustSec Advisory DB |
41
+ | `go.mod` | `go.sum` | go | `govulncheck ./...` | Go Vulnerability DB |
42
+ | `Gemfile` | `Gemfile.lock` | bundler | `bundle-audit check` | Ruby Advisory DB |
43
+ | `pubspec.yaml` | `pubspec.lock` | dart/flutter | `dart pub outdated --json` | pub.dev |
44
+
45
+ ## Steps
46
+
47
+ 1. **Detect ecosystems**: Glob for manifest/lock files at project root and common subdirectories
48
+ 2. **Check tool availability**: Verify audit tool is installed for each detected ecosystem
49
+ 3. **Run audit**: Execute native audit command, capture JSON output where available
50
+ 4. **Parse results**: Extract CVE ID, package name, installed version, fixed version, severity, advisory URL
51
+ 5. **Unified report**: Merge all ecosystems into single report sorted by severity
52
+ 6. **Fix mode**: If `--fix` passed, run `npm audit fix`, `pip-audit --fix`, `cargo audit fix` etc.
53
+ 7. **Exit code**: Non-zero if any CRITICAL or HIGH vulnerabilities found
54
+
55
+ ## Detection Script
56
+
57
+ Run the bundled detection script to quickly identify ecosystems and tool availability:
58
+
59
+ ```bash
60
+ python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py
61
+ ```
62
+
63
+ Options:
64
+ ```bash
65
+ python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py --json # JSON output
66
+ python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py --fix # Auto-fix mode
67
+ python3 ${CLAUDE_SKILL_DIR}/scripts/cve_scan.py --ecosystem npm # Specific ecosystem
68
+ ```
69
+
70
+ ## Output Format
71
+
72
+ ```markdown
73
+ ## CVE Scan Report
74
+
75
+ ### Ecosystems Detected
76
+ - npm (package-lock.json) — `npm audit` available ✓
77
+ - pip (requirements.txt) — `pip-audit` not installed ⚠️
78
+
79
+ ### Summary
80
+ | Severity | Count |
81
+ |----------|-------|
82
+ | CRITICAL | 1 |
83
+ | HIGH | 3 |
84
+ | MEDIUM | 5 |
85
+ | LOW | 2 |
86
+
87
+ ### Findings
88
+
89
+ #### [CRITICAL] lodash@4.17.20 (npm)
90
+ - **CVE**: CVE-2021-23337
91
+ - **Title**: Prototype Pollution
92
+ - **Fixed in**: 4.17.21
93
+ - **Advisory**: https://github.com/advisories/GHSA-35jh-r3h4-6jhm
94
+
95
+ #### [HIGH] django@3.2.0 (pip)
96
+ - **CVE**: CVE-2023-36053
97
+ - **Title**: Potential ReDoS in EmailValidator
98
+ - **Fixed in**: 3.2.20
99
+ - **Advisory**: https://osv.dev/vulnerability/PYSEC-2023-100
100
+
101
+ ### Tool Availability
102
+ | Ecosystem | Tool | Status | Install Hint |
103
+ |-----------|------|--------|--------------|
104
+ | npm | npm audit | ✓ installed | — |
105
+ | pip | pip-audit | ✗ missing | `pip install pip-audit` |
106
+ | cargo | cargo-audit | ✗ missing | `cargo install cargo-audit` |
107
+ ```
108
+
109
+ ## Handling Missing Tools
110
+
111
+ When an audit tool is not installed, the skill:
112
+ 1. Reports it as a warning (not a failure)
113
+ 2. Provides the install command for the missing tool
114
+ 3. Continues scanning other detected ecosystems
115
+
116
+ Install hints per ecosystem:
117
+
118
+ | Tool | Install Command |
119
+ |------|----------------|
120
+ | `pip-audit` | `pip install pip-audit` |
121
+ | `cargo-audit` | `cargo install cargo-audit` |
122
+ | `govulncheck` | `go install golang.org/x/vuln/cmd/govulncheck@latest` |
123
+ | `bundle-audit` | `gem install bundler-audit` |
124
+ | `composer` | Built-in since Composer 2.4 |
125
+
126
+ ## Rules
127
+
128
+ - Never modify `package-lock.json`, `Cargo.lock`, or other lock files without `--fix` flag
129
+ - Always report tool availability — missing tool is a finding, not a failure
130
+ - Parse JSON output when available for structured data; fall back to text parsing
131
+ - CRITICAL and HIGH findings should be highlighted prominently
132
+ - Include advisory URLs for every CVE when available
133
+ - This skill is READ-ONLY by default (no installs, no upgrades) unless `--fix` is passed
134
+ - Respect `.auditrc`, `.nsprc`, or equivalent ignore files if present