Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add event4u-app/agent-config --skill defense-in-depthgit clone --depth 1 https://github.com/event4u-app/agent-configWrote 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/event4u-app/agent-config/defense-in-depth)<a href="https://agentmods.dev/skills/event4u-app/agent-config/defense-in-depth"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/defense-in-depth/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/event4u-app/agent-config/defense-in-depth"><img src="https://agentmods.dev/badge/skills/event4u-app/agent-config/defense-in-depth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 1 finding, 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 Data Exfiltration · line 92 Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.Fix: Remove any code that sends prompts, responses, or session data externally. Preserve user privacy; never exfiltrate conversation content.
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.00040 | $0.01350 |
| Opus 5.5 | $0.00016 | $0.00540 |
| Sonnet 5.5 | $0.00008 | $0.00270 |
| Haiku 4.5 | $0.00004 | $0.00135 |
Grade A, and why
defense-in-depth 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 3mo 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 — 158 lines — stays where its author put it; the contents beside it link to each section on GitHub.
defense-in-depth
Validate at every layer the value passes through. Fixing the bug at one layer is locally sufficient and globally fragile — the next refactor, code path, mock, or platform edge case will rediscover it. Four-layer validation makes the bug structurally impossible.
When to use
- Bug fix where invalid data caused failure several frames deep.
- New entry point that funnels external input into existing internals.
- Refactor that adds a second caller to a previously single-caller routine.
- Test setup that shortcuts production guards (mocks bypassing entry validation).
Do NOT use when:
- Pure formatting / style change — no data flow, no layers to defend.
- Boundary validation alone is correct (e.g. immutable value object with constructor invariant) — route to
laravel-validation. - The fix belongs at a single architectural seam — adding three more guards is over-engineering. Use the gate function below to stop early.
Procedure: Apply the four-layer pattern
Step 0: Analyze the data flow before adding guards
- Identify where the bad value originates (test fixture, request body, env var, config).
- List every function that receives the value before the failure point.
- Mark which functions are reachable from production paths and which only from tests.
Step 1: Layer 1 — Entry-point validation
Reject obviously invalid input at the API / route / command boundary. In Laravel this is FormRequest rules; in Express a zod-validated middleware; in pure services it is the public method on the service.
public function createProject(string $name, string $workingDirectory): Project
{
if (trim($workingDirectory) === '') {
throw new InvalidArgumentException('workingDirectory cannot be empty');
}
if (! is_dir($workingDirectory)) {
throw new InvalidArgumentException("workingDirectory does not exist: {$workingDirectory}");
}
if (! is_writable($workingDirectory)) {
throw new InvalidArgumentException("workingDirectory is not writable: {$workingDirectory}");
}
// ... proceed
}
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.
- 3mo ago First seen · 158 lines · 40 tokens per session scan A d8bdc8e520d6
defense-in-depth is a skill published in the GitHub repository event4u-app/agent-config (20 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 1,350 once invoked, about $0.0002 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-09-03.
defense-in-depth compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| defense-in-depthevent4u-app/agent-config | Skill | 20 | today | MIT | A | 40 | Claude Code, Codex |
| diagnose-backend-bugQoderAI/better-harness | Skill | 2.5k | 23d ago | MIT | A | 87 | Claude Code, Codex |
| kiro-verify-completiongotalab/cc-sdd | Skill | 3.8k | 1mo ago | MIT | A | 39 | Codex |
| memorix-troubleshootingAVIDS2/memorix | Skill | 963 | 7d ago | Apache-2.0 | A | 36 | Claude Code |
| roblox-performanceTabooHarmony/roblox-brain | Skill | 239 | 2d ago | MIT | A | 30 | Claude Code |
| lov-app-professional-designlovstudio/skills | Skill | 72 | today | MIT | A | 79 | Claude Code |
| chatcrystal-debug-recallZengLiangYi/ChatCrystal | Skill | 65 | 5d ago | Apache-2.0 | A | 54 | Codex |