Skip to content
secondsky avatar

Defense In Depth Validation

Multi-layer validation that makes data bugs structurally impossible, from entry checks to debug logging.

CCM score
56 of 100
skills.sh installs
439
GitHub stars
257
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers four validation layers: entry point, business logic, environment guards, and debug instrumentation
  • Includes a worked example tracing an empty projectDir through Project.create to a git init guard
  • Enforces a rule that re-derives authorization server-side and re-checks ownership in the database query
  • Designed for bugs caused by invalid data that fail deep in execution across multiple system layers

Install

$ npx -y skills add secondsky/claude-skills --skill defense-in-depth-validation -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Defense-in-Depth Validation

Overview

When you fix a bug caused by invalid data, adding validation at one place feels sufficient. But that single check can be bypassed by different code paths, refactoring, or mocks.

Core principle: Validate at EVERY layer data passes through. Make the bug structurally impossible.

Why Multiple Layers

Single validation: "We fixed the bug" Multiple layers: "We made the bug impossible"

Different layers catch different cases:

  • Entry validation catches most bugs
  • Business logic catches edge cases
  • Environment guards prevent context-specific dangers
  • Debug logging helps when other layers fail

The Four Layers

Layer 1: Entry Point Validation

Purpose: Reject obviously invalid input at API boundary

Details

Repository
github.com/secondsky/claude-skills
Categories
Debugging, Security
First seen
Jun 3, 2026

Questions

What is defense-in-depth-validation?

defense-in-depth-validation is an agent skill listed on Claude Marketplaces in the Debugging category. The listing describes defense-in-depth-validation like this: Validate at every layer data passes through to make bugs impossible.

How do I install defense-in-depth-validation?

Run npx -y skills add secondsky/claude-skills --skill defense-in-depth-validation -y in a project to install defense-in-depth-validation. After that, the agent can use defense-in-depth-validation in that project.

Which category is defense-in-depth-validation in?

defense-in-depth-validation is in the Debugging category on Claude Marketplaces. Other listings in that category next to defense-in-depth-validation include diagnosing-bugs, azure-messaging and safe-debug.

Where is the source code of defense-in-depth-validation?

The source code of defense-in-depth-validation is on GitHub at https://github.com/secondsky/claude-skills. The secondsky account on GitHub publishes defense-in-depth-validation.

More from secondsky/claude-skills

All 116

Similar to Defense In Depth Validation

More Debugging