Borrowing it
Nothing to install: this file belongs to AlexanderMattTurner/agent-glovebox. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/AlexanderMattTurner/agent-glovebox/main/.claude/skills/defect-to-guard/SKILL.mdgit clone --depth 1 https://github.com/AlexanderMattTurner/agent-gloveboxWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/alexandermattturner/agent-glovebox/defect-to-guard)<a href="https://agentmods.dev/skills/alexandermattturner/agent-glovebox/defect-to-guard"><img src="https://agentmods.dev/badge/skills/alexandermattturner/agent-glovebox/defect-to-guard/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/alexandermattturner/agent-glovebox/defect-to-guard"><img src="https://agentmods.dev/badge/skills/alexandermattturner/agent-glovebox/defect-to-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Prompt Injection · line 44 Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
- medium Rogue Agent · line 40 Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00222 | $0.04466 |
| Opus 5.5 | $0.00089 | $0.01786 |
| Sonnet 5.5 | $0.00044 | $0.00893 |
| Haiku 4.5 | $0.00022 | $0.00447 |
Grade A, and why
defect-to-guard scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
From one defect to a standing invariant
When a defect earns a guard proposal
A defect you fixed does not owe a guard. Propose one only when a GENERIC CI check would have caught the whole CLASS without anticipating this specific error, AND that class can recur. A one-off, a class the fix itself makes unreachable, and a class an existing check already covers each get no entry. When one does qualify, the output is a ## Proposed guards entry in the PR body, never a guard shipped in the same PR — root CLAUDE.md § Guard budget owns that rule and the cost/benefit arithmetic the entry must show, and it charges a substantial expansion of an existing check the same way. The steps:
- Name the class the bug belongs to — a documented-but-unrouted subcommand, a parsed-but-undeclared flag, a referenced-but-undocumented env var, a feature whose lib code is written but never wired onto the live path, a portability divergence, a swallowed error.
- Find whether a guard for that class already exists (
cli-dispatch-sync,check-cli-flags-documented,check-env-documented, the layer-engagement self-test,check-exit-suppression) and, if so, why it didn't fire — a gap in the existing guard is itself the bug. - If none exists, prefer a check that iterates the SSOT and asserts the second copy, so it covers every future member for free and never names the instance (the anti-lockstep doctrine's forward form — a generic guard is an SSOT-completeness check, not a per-case assertion).
- Pick the cheapest mechanism that can express the class, in this order: a type the compiler already tracks, then an AST rule, then a line or regex lint. The order tracks the false-positive rate. A type follows the value, so it never guesses at a shape; an AST rule sees structure, so it skips a match inside a string literal, a comment or a fixture; a text lint matches characters, so every legitimate use of those characters earns a disable comment, and each one hides the next real finding on its line.
tsc --noEmit(pnpm check) covers the non-test*.mjsunderscripts/,.claude/hooks/,.github/actions/,glovebox-github-app/andvm-kit/, and nothing else there —tsconfig.jsonincludenames those globs andexcludedrops**/*.test.mjs, so the Python and shell beside them get no type check at all. For a file it does cover, a provenance type needs no new machinery: brand the safe constructor's return value and make the dangerous sink accept only the brand. Reach for a line lint only when the class has no syntax to bind to — a banned word in prose, a path convention — and say in the proposal why. Show the mechanism, never just name it: the proposal carries the smallest snippet a reader can check — the signature that changes and the one line that now fails. "A provenance type" is a label; the three lines below are the thing, and a reviewer can judge them in ten seconds.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago Changed · -2 lines 94da6c97f0b6
- 14d ago Changed 734b2b3040fb
- 19d ago Changed e198d5321e24
- 1mo ago Changed 2bd720adb82b
- 1mo ago Changed · +2 lines 3530491608a6
- 1mo ago Changed cd3cc1835ac4
- 1mo ago Changed 1f391c5762ef
- 1mo ago First seen · 110 lines · 222 tokens per session scan A 1c92976a50b6
defect-to-guard is a skill published in the GitHub repository AlexanderMattTurner/agent-glovebox (68 stars, last pushed today), licensed Apache-2.0. It adds 222 tokens to every session and 4,466 once invoked, about $0.0009 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…