Debug proof failures using counterexamples from Nitpick (Isabelle) or QuickChick (Coq) to identify specification errors, missing preconditions, and proof strategy issues. Use when: (1) A proof attempt fails and you need to understand why, (2) Counterexamples are generated by Nitpick or QuickChick, (3) Specifications may be incorrect or incomplete, (4) Theorems need validation before proving, (5) Missing preconditions or lemmas need identification, or (6) Proof failures need explanation and correction suggestions. Supports both Isabelle/HOL and Coq equally.
npx skills add https://github.com/ArabelaTso/Skills-4-SE --skill counterexample-debugger
Analyze counterexamples from Nitpick or QuickChick to explain proof failures and suggest corrections to specifications or proofs.
Identify what information is provided:
Determine which proof assistant is being used:
Examine the counterexample systematically:
Verify the counterexample:
Identify the violation:
Determine the root cause:
Provide clear explanation:
What went wrong:
Why it happened:
Impact assessment:
Provide actionable fixes based on the root cause:
For missing preconditions:
(* Before *)
lemma "hd xs ∈ set xs"
(* After *)
lemma "xs ≠ [] ⟹ hd xs ∈ set xs"
For incorrect specifications:
(* Before: uses < instead of <= *)
x < y && is_sorted (y :: ys)
(* After *)
x <= y && is_sorted (y :: ys)
For quantifier order:
(* Before *)
"∃y. ∀x. P x y"
(* After *)
"∀x. ∃y. P x y"
For incomplete specifications:
(* Before: only checks sortedness *)
is_sorted (sort l)
(* After: also checks permutation *)
is_sorted (sort l) && permutation l (sort l)
Guide the user on what to do:
Retest with fix:
Identify additional issues:
Proceed with proof:
Symptom: Counterexample is [], {}, or None
Common causes:
Fix: Add precondition or handle empty case explicitly
Symptom: Counterexample is 0, 1, or type limits
Common causes:
Fix: Adjust bounds or add special case handling
Symptom: Counterexample has repeated values like [0, 0]
Common causes:
< instead of ≤Fix: Use appropriate comparison or add distinctness assumption
Symptom: Very small counterexample (1-2 elements)
Common causes:
Fix: Review base definitions and inductive structure
Symptom: Counterexample at type boundaries
Common causes:
Fix: Add type constraints or adjust specification
For detailed Nitpick usage and interpretation:
Key points:
For detailed QuickChick usage and interpretation:
Key points:
Symptoms:
Fixes:
Symptoms:
Fixes:
Symptoms:
Fixes:
Symptoms:
Fixes:
When analyzing a counterexample:
For complete debugging examples including:
See examples.md
Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take arabelatso/counterexample-debugger from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.