/claude-engineering-skills:security-strategyfrom Claude Engineering Skills
On-demand maintenance of the per-repo security memory: bootstrap an initial threat model + add/append incidents to docs/security-strategy.md with proper marker comments, then refresh the Supabase index. NEVER gates planning — /plan reads the resulting memory automatically via Phase 0.5b. Triggers on: "security strategy", "add security incident", "draft incident", "/security-strategy", "bootstrap security memory". Usage: /security-strategy bootstrap — interview to seed initial threat model + first incident /security-strategy add-incident — interactive draft of one new incident entry /security-strategy add-incident from-commit <sha> — pre-fill from commit subject + changed files
Ships in Claude Engineering Skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Explicit invocation only — host-neutral.
disable-model-invocation: trueenforces this in Claude Code and in VS Code Copilot, which reads.claude/skills/and honours that key (verified against VS Code Agent Skills docs 2026-09-02). Hosts beyond those two are unverified, and a key cannot carry the reasoning anyway, so the rule is stated here as well.Run this only when the user asked for it. It writes
docs/security-strategy.mdand publishes to the shared index, and an incident drafted from a passing mention is a false record in a security memory other people will later trust.
This skill maintains the markdown source-of-truth at
docs/security-strategy.md. After any edit, it runs
node scripts/security-memory/refresh-incidents.mjs so the Supabase embedding
index stays current.
Always by path, never via an npm run alias. The sync never merges npm
scripts into a consumer's package.json, so a security:refresh alias exists
in the source repo only. The earlier workaround appended --if-present to that
alias, which made the Missing script error disappear by exiting 0 without
running anything — so a consumer's index silently never refreshed. The
refresher is itself synced, so the path always resolves.
The skill is on-demand only — it never blocks /cycle, /plan, or
/ship-checked. The planner (Phase 0.5b) consults the memory via the cross-skill
bridge regardless of whether this skill has run recently.
Worktree preflight — in a linked git worktree the gitignored tooling tree
scripts/.claude-skills/is absent (git worktree adddoes not populate it), so every command below that uses it dies onMODULE_NOT_FOUND. Runnpm run skills:hydratefirst; if no such script exists,references/worktree-preflight.mdholds the entry to add (ask the user first: it editspackage.json). Keys are not copied: put them in~/.audit-loop.env, which every worktree reads.
| Input | Mode |
|---|---|
/security-strategy bootstrap | BOOTSTRAP — first-time seed of threat model + optional first incident |
/security-strategy add-incident | ADD — interactive draft of one new incident |
/security-strategy add-incident from-commit <sha> | ADD_FROM_COMMIT — pre-fill from a security-relevant commit |
If no mode given → ask the user which one.
The repo template at docs/security-strategy.md is the canonical
skeleton. Bootstrap fills in placeholders rather than emitting a
parallel template — so changes to the template's structure (parser
sections, comment markers, header text) only need to happen in one
place and bootstrap stays automatically in sync.
If the file is already populated (the threat-model placeholder text
"_(no threat model recorded yet" is absent), ask: "File appears already
bootstrapped — overwrite the threat-model section, or skip to add-incident?"
On overwrite, take a .bak copy first.
Otherwise interview the user briefly:
Then read the existing checked-in template at
docs/security-strategy.md, replace the ## Threat model body
between the heading and ## Incidents with a paragraph synthesising
the user's answers (Assets / Actors / Compliance / Concerns), and
write back via the round-trip parse + atomicWriteFileSync protocol
(R3-M4):
## Threat model … ## Incidents span.## Incidents placeholder
comments untouched.parseSecurityStrategy() — assert no
parse warnings; if any, fail loudly and don't write.atomicWriteFileSync('docs/security-strategy.md', content).Then run node scripts/security-memory/refresh-incidents.mjs and surface its summary line.
Determine the incident's id: scan existing markdown for highest
INC-NNN, increment by 1. Pad to 3 digits (INC-001, INC-002, …).
For ADD_FROM_COMMIT: pre-fill from git show <sha>:
git show --name-only <sha> filtered to source filessemgrep/, reference it; else "manual"For interactive ADD, prompt the user for each field with examples.
Write protocol (R3-M4):
docs/security-strategy.md.## Incidents
section, BEFORE any ## Historical incidents heading if present.<!-- incident:start id="INC-NNN" -->
**Description**: <text>
**Affected paths**: `<path1>`, `<path2>`
**Mitigation**: `<semgrep:rule-id | scripts/path | manual>`
**Lessons learned**: <text>
<!-- incident:end -->
parseSecurityStrategy() — assert the new entry appears in
incidents[] with non-null description AND no parse warnings
reference the new ID.atomicWriteFileSync().node scripts/security-memory/refresh-incidents.mjs and surface result summary.═══════════════════════════════════════
/security-strategy — DONE
Mode: <BOOTSTRAP | ADD | ADD_FROM_COMMIT>
File: docs/security-strategy.md (<N> incidents total)
Refresh: <upserted N, swept M, on-default-branch=Y/N>
═══════════════════════════════════════
If on a feature branch and the user added an incident, gently note: "Incidents from feature branches UPSERT but don't trigger sweep — the canonical retired-set updates when the default branch refreshes."
docs/security-strategy.md without round-trip parse first. A malformed entry that the parser silently skips is worse than a noisy warning.redactSecrets() runs before egress, the markdown itself goes to PR review and git history.| File | Summary | Read when |
|---|---|---|
references/worktree-preflight.md | Worktree preflight remedy — the skills:hydrate npm script to add when a linked worktree lacks the tooling tree. | A command dies with MODULE_NOT_FOUND in a linked worktree AND this repo has no skills:hydrate script. |
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (lbstrydom/claude-engineering-skills) — no native marketplace selected
npx claudepluginhub p/lbstrydom-claude-engineering-skills18 skills in this plugin
/ai-context-managementManage AGENTS.md and CLAUDE.md alignment across a repo so Claude, Copilot,
Cursor, Windsurf, and other AI agents share the same project context.
Detects drift, reconciles manually-introduced divergence, and migrates legacy
CLAUDE.md-canonical repos to AGENTS.md-canonical.
Triggers on: "audit AGENTS.md", "check context drift", "AGENTS.md vs CLAUDE.md",
"fix context drift", "migrate to AGENTS.md",
"context sync", "what tools read which file", "ai-context-management".
Usage: /ai-context-management audit — Score drift + report findings
Usage: /ai-context-management reconcile — Apply patches to fix drift
Usage: /ai-context-management migrate — Flip legacy repo to AGENTS.md canonical
/audit-codeIteratively audit code against a plan with GPT + an independent final gate (Gemini, else Claude).
5-pass parallel static analysis (structure, wiring, backend, frontend,
sustainability), R2+ ledger-driven suppression, debt capture for
out-of-scope findings, max 6 rounds with 2-stable-rounds convergence.
Invoke this for ANY code-correctness review, even a small pasted snippet
or diff — don't just review it yourself directly; a single read-through
is not a substitute for the multi-pass GPT + final-gate adjudication this skill
performs, and skipping it means the review didn't actually happen.
Triggers on: "audit my code", "audit my changes", "audit my PR",
"check the implementation", "review my code", "audit code", "/audit-code",
"audit this", "verify the implementation".
Usage: /audit-code <plan-file> — Audit code against plan (--scope diff default)
Usage: /audit-code <plan-file> --scope plan — Audit only files mentioned in the plan
Usage: /audit-code <plan-file> --scope full — Full repo audit
Other plugins' skills for the same job