invariant-miner
Mines evidence-backed invariants and falsifies them with generative tests, shrinking reproducible counterexamples.
Skill by 0xdewy
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/0xdewy-invariant-miner
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/invariant-miner
What's inside
- Skill name
invariant-miner- Description
- Mines evidence-backed invariants and falsifies them with generative tests, shrinking reproducible counterexamples. Only use when explicitly requested.
- License
- MIT
- Instructions
- 90 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (4)
- SKILL.md
- evals.json · evals/
- methods.md · references/
- validate_ledger.py · scripts/
SKILL.md (first lines)
# Invariant Miner Discover general behavioral properties, then attempt to disprove them with executable tests. A plausible statement is a candidate, not an invariant. Load `../common/patterns/execution-contract.md`. Load `references/methods.md` only when selecting a falsification technique. Use `scripts/validate_ledger.py` before completion. ## Activation Use this for *general properties over an input or state space*. Add one known example test directly without this skill. Route broad bug/quality cleanup to `code-smellz` and diff-scoped review to `pr-smellz`. Edit authority follows the request: - Discovery/review request: production and durable test files are read-only; probes stay in `WORKSPACE`. - Add/encode/test request: tests may be edited, but production code is read-only. - `--fix`: after a counterexample exists, apply the smallest production fix and rerun the new test plus the relevant suite. Never commit, push, install dependencies, or expand the target without explicit permission. ## Modes - `--quick`: one function/type; 3-5 candidates, one primary method. - `--standard` (default): one subsystem; 5-12 candidates, up to three methods. - `--thorough`: a public API or state machine; at most 20 candidates, bounded combinations of methods. All modes run directly with zero subagents. Set deterministic seeds and bounded case/time limits; record both. Existing property-test libraries are preferred, but a small native loop is the fallback. ## Evidence Contract Write each candidate as: **for all valid inputs/states satisfying P, observation Q holds**. Record its basis: - `contract`: explicit schema, requirement, public documentation, or accepted test contract. - `derived`: follows from types, algebra, state transitions, or at least two independent repository signals. - `observed`: current implementation behavior only; characterization, not intended correctness. Do not promote naming, one example, or implementation coincidence into a durable test. Conflicting sources make the candidate `blocked` until authority is resolved. Durable tests may encode `contract` and well-supported `derived` invariants; encode `observed` behavior only when the user accepts it as policy. ## Workflow 1. State mode/workspace. Record target, edit authority, baseline, seed, and budgets in `status.json`. 2. Read repo guidance, test configuration, target code, direct callers, existing tests, and authoritative schemas/docs. Keep scope local. 3. Draft and rank candidates by basis, evidence strength, failure impact, and falsifiability. Reject tautologies, exact restatements, and properties that merely mirror one implementation branch. 4. Choose the cheapest discriminating method from `references/methods.md`. Prefer boundary partitions before random volume. 5. Write probes in `WORKSPACE`, or durable tests only when authorized. Run the narrowest command first. Preserve the baseline distinction. 6. On failure, reproduce with the recorded seed and shrink to the smallest input or operation sequence. A non-reproducible failure is `blocked`, not a counterexample. 7. Classify each candidate. For executed results record exit code, case count, duration, output SHA-256, and a replay command for counterexamples. Passing finite trials means "not falsified within this budget," never proof. 8. Run `scripts/validate_ledger.py --print-template`, write `INVARIANTS.json` from that schema, then `REPORT.md`: counterexamples first, then supported properties, residual search gaps, test changes, commands, and budgets. 9. Run the ledger validator and all targeted tests. With `--fix`, also run the relevant regression suite after the production patch. Do not weaken assertions to make generated tests pass. Never expose secrets or production data in seeds, corpora, ledgers, or counterexamples. Final line: ```text DONE: <WORKSPACE>/REPORT.md — <S> supported, <F> falsified, tests <added|unchanged>, verification <passed|partial|blocked> ```
From 0xdewy/skills, MIT.
More from 0xdewy/skills
- 0.570score
agentify
0xdewy
Maps git-tracked code with a ranked outline, scoped expansion, and symbol or call-site XREFs.
SkillAFreshness: AClaude Code +9 - 0.570score
audit-debian-server
0xdewy
Audit, harden, and monitor Debian or Ubuntu application servers.
SkillAFreshness: AClaude Code +9 - 0.570score
code-smellz
0xdewy
Finds and fixes repository-wide correctness, security, architecture, and maintainability problems with bounded review.
SkillAFreshness: AClaude Code +9 - 0.570score
frontend-qa
0xdewy
Drives a local web app in a headless browser to find and fix functional failures and visual defects, then proves each fix with a re-run.
SkillAFreshness: AClaude Code +9 - 0.570score
git-show
0xdewy
Visualize repository fleets, PR stacks, and local work in an interactive HTML dashboard or compact text tree.
SkillAFreshness: AClaude Code +9 - 0.570score
shrinkray
0xdewy
Shrinks repositories while preserving behavior by removing dead code, duplication, and verbosity with measured verification.
SkillAFreshness: AClaude Code +9 - 0.570score
spec-reconciler
0xdewy
Reconciles source-anchored claims across schemas, code, tests, docs, and generated clients using declared authority.
SkillAFreshness: AClaude Code +9 - 0.570score
student-counsel
0xdewy
A Student does the work and Socrates examines it by elenchus until the work can answer every question without contradiction, or the round cap lands.
SkillAFreshness: AClaude Code +9 - 0.570score
vfs-docs
0xdewy
Builds self-describing docs/ trees where directory shape and filenames carry the meaning, so an agent orients from `tree docs/` alone.
SkillAFreshness: AClaude Code +9 - 0.570score
llm-providers
0xdewy
Developer reference for connecting to OpenAI, Anthropic, Gemini, DeepSeek, GLM, MiniMax, MiMo, Mistral, xAI, Qwen, Kimi, Cohere, OpenRouter, Together, and…
SkillAFreshness: AClaude Code +9 - 0.570score
pr-describe
0xdewy
Writes or rewrites a pull request's title and description so a reader with no context understands why, what changed, and how to verify it.
SkillAFreshness: AClaude Code +9 - 0.570score
pr-smellz
0xdewy
Reviews PR diffs for introduced risks, anchoring findings to changed lines; read-only unless --fix is explicit.
SkillAFreshness: AClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 2
- Last commit (this folder)
- Oct 11, 2026 (18 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/0xdewy/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from 0xdewy
- 0.570score
audit-debian-server
0xdewy
Audit, harden, and monitor Debian or Ubuntu application servers.
SkillAFreshness: AClaude Code +9 - 0.570score
agentify
0xdewy
Maps git-tracked code with a ranked outline, scoped expansion, and symbol or call-site XREFs.
SkillAFreshness: AClaude Code +9 - 0.570score
frontend-qa
0xdewy
Drives a local web app in a headless browser to find and fix functional failures and visual defects, then proves each fix with a re-run.
SkillAFreshness: AClaude Code +9 - 0.570score
git-show
0xdewy
Visualize repository fleets, PR stacks, and local work in an interactive HTML dashboard or compact text tree.
SkillAFreshness: AClaude Code +9 - 0.570score
code-smellz
0xdewy
Finds and fixes repository-wide correctness, security, architecture, and maintainability problems with bounded review.
SkillAFreshness: AClaude Code +9 - 0.570score
llm-providers
0xdewy
Developer reference for connecting to OpenAI, Anthropic, Gemini, DeepSeek, GLM, MiniMax, MiMo, Mistral, xAI, Qwen, Kimi, Cohere, OpenRouter, Together, and…
SkillAFreshness: AClaude Code +9
Cite this page
invariant-miner skill. Agent Mart. https://agentmart.dev/skills/0xdewy-invariant-miner (last updated 2026-10-24)