defense-in-depth

Validate data across API boundaries, business logic, environment guards, and debugging telemetry.

Updated Dec 9, 2025
One-click install
npx skills add https://github.com/h4v1d/extension-collection-geminicli --skill defense-in-depth-h4v1d
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defense-in-depth
Source: https://github.com/h4v1d/extension-collection-geminicli/tree/main/defense-in-depth
Command: npx skills add https://github.com/h4v1d/extension-collection-geminicli --skill defense-in-depth-h4v1d

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Defense-in-depth addresses scenarios where invalid data can cause failures deep in the execution path, by enforcing validation at every layer to make bugs structurally impossible.

Core Features & Use Cases

  • Four-layer validation model: Entry Point Validation, Business Logic Validation, Environment Guards, and Debug Instrumentation.
  • Risk mitigation: Catches issues across API boundaries, core logic, and operational contexts, reducing late-stage failures.
  • Use Case: During bug fixes, apply layered checks to ensure a defect cannot bypass early validation and propagate through the stack.

Quick Start

Apply defense-in-depth by implementing validation at all four layers in your modules and services.

Frequently Asked Questions about defense-in-depth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is layered validation in software engineering?

Layered validation enforces data integrity checks across API boundaries, business logic, environment guards, and debug instrumentation. This defense-in-depth approach prevents invalid input from propagating deep into the execution path.

How do I stop invalid data from causing failures deep in the execution path?

Apply defense-in-depth validation at entry points, business logic, environment guards, and debug instrumentation. This layered approach catches invalid data across API boundaries before it propagates deep into the execution path.

How do I implement validation across API boundaries and business logic?

Implement the four-layer validation model by adding entry point checks for incoming API data, enforcing business logic rules, setting environment guards, and adding debug instrumentation to catch defects during software development and QA.

When should I apply defense-in-depth validation during software development?

Apply defense-in-depth validation during software development and QA, specifically during bug fixes. Layered checks ensure a defect cannot bypass early validation and propagate through the stack, reducing late-stage failures.

Do I need specific dependencies to use the defense-in-depth validation model?

No dependencies are required. You need a properly formatted SKILL.md frontmatter with name and description, and may include optional scripts, references, or assets directories to support activation of the layered validation model.

What are the limitations of relying solely on entry point validation?

Relying solely on entry point validation risks deep execution failures if invalid data bypasses early checks. Without business logic validation, environment guards, and debug instrumentation, late-stage failures remain a significant risk.