invariant-discovery

Discover project invariants and generate review-ready documentation from a repository.

1|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/jongensutrecht/demo-ai-stack --skill invariant-discovery
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: invariant-discovery
Source: https://github.com/jongensutrecht/demo-ai-stack/tree/main/.claude/skills/invariant-discovery
Command: npx skills add https://github.com/jongensutrecht/demo-ai-stack --skill invariant-discovery

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps teams identify and document the conditions that must never be violated in a codebase, turning implicit project rules into explicit invariants that can be reviewed and tested.

Core Features & Use Cases

  • Invariant Discovery: Analyze a repository to surface security, business, and performance behaviors that should never happen.
  • Question-Driven Review: Use guided prompts to inspect auth, data access, state transitions, and resource limits with a structured checklist.
  • Template Generation: Produce a ready-to-fill invariants document with IDs, categories, and test references for follow-up implementation.
  • Use Case: After a major feature launch, a team can run this Skill to capture new never-allow rules before they become production risks.

Quick Start

Ask the skill to scan the repository and generate an invariants draft for security, business, and performance risks.

Frequently Asked Questions about invariant-discovery

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

FAQPage Schema
How do I discover invariants in a codebase to prevent security and performance violations?

Discover invariants in a codebase by using guided questions and structured checklists to analyze auth, data access, and resource limits, generating a review-ready document with test references.

What are project invariants and why do I need to document them before a major feature launch?

Project invariants are explicit business, security, and performance rules that must never be violated. Documenting them before a launch captures never-allow conditions, turning implicit rules into testable guardrails.

How do I create an invariants document with categories and test references for a repository setup?

Create an invariants document by running an analysis that generates a ready-to-fill template with assigned IDs, risk categories, and test references, structuring your repository setup guardrails for review.

Can I perform a risk review for business rules and state transitions without external dependencies?

Yes, you can perform a risk review for business rules and state transitions without external dependencies, using guided prompts to inspect behaviors and generate structured documentation natively.

What is the best way to capture implicit business rules after a production incident?

The best way to capture implicit business rules after an incident is to run a question-driven review that surfaces never-allow conditions, producing an explicit invariants document for follow-up implementation.

Does this codebase analysis approach work for documenting security guardrails and performance limits?

Yes, this codebase analysis approach works for documenting security guardrails and performance limits by applying structured checklists to inspect resource limits and auth behaviors, outputting review-ready documentation.