skills/mine-challenge/SKILL.md
Use when the user says: "challenge this", "poke holes in this", or "what's wrong with this approach". Adversarial review with triage-driven critic selection, parallel critics (1–3 on first run; max 2 on re-challenges). Assumes the target is wrong, finds out why, and argues for a better approach.
npx skillsauth add NodeJSmith/Claudefiles mine-challengeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Adversarial review of any artifact — code, specs, designs, briefs, skill files. Assumes the target is wrong and sets out to prove it. A Haiku triage pass selects 1–3 critics best suited to the target; critics run in parallel and findings are synthesized, classified, and executed inline.
$ARGUMENTS — optional scope:
/mine-challenge src/services/user_service.py/mine-challenge "the auth module"Optional arguments (extracted from the beginning of $ARGUMENTS only — stop at first non-flag token):
--focus="<area>" — steer critics; also forces any specialist whose filename slug prefix-matches (≥6 chars, case-insensitive, single word only)--target-type=<type> — override heuristic classification. Values: code, frontend-code, spec, design-doc, brief, skill-file, agent-file, rule, docs, research, other--findings-out=<path> — deterministic output path (structured callers only, e.g., mine-define). Overwrites without warning.--mode=passthrough — present summary only; skip inline resolution (mine-brainstorm, mine-research)--no-specialists — triage selects from generic personas only--cap=N — finding cap (default 7). CRITICAL and HIGH are never capped.--verbose — show all findings including overflowDo NOT run tests, execute builds, or write throwaway scripts.
DO use Read, Grep, Glob, git log/git diff. Use WebSearch to cite canonical patterns or failure modes.
Every finding gets: severity (CRITICAL / HIGH / MEDIUM / TENSION), type (Structural / Approach-now / Approach-later / Fragility / Gap), design-level (Yes / No), resolution (Auto-apply / User-directed).
See ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/mine-challenge/findings-protocol.md for classification criteria, status/overflow fields, and the inline resolution flow.
Extract flags from $ARGUMENTS. Run get-skill-tmpdir mine-challenge — note the directory (e.g., /tmp/claude-mine-challenge-a8Kx3Q). All intermediate files live here.
Determine the input shape and read the target:
.txt/.list): read as newline-separated paths; skip blank/comment lines; record missing files to <tmpdir>/validation-warnings.mdClassify target type — use --target-type if provided, otherwise:
| Target type | Detected by |
|-------------|-------------|
| code | .py, .go, .rs, .java, .ts, .js (backend); mixed/repo-wide scope |
| frontend-code | .tsx, .jsx, .vue, .svelte, .astro; UI framework imports; dirs named components/, pages/, hooks/ |
| spec | Standalone requirement docs outside caliper workflow |
| design-doc | design.md; architecture/API contract content |
| brief | brief.md; grill/brainstorm output |
| skill-file | SKILL.md; phases/persona definitions |
| agent-file | Files in agents/; .md with agent frontmatter |
| docs | README.md; .md in docs/ directories |
| research | research.md; investigation output |
| rule | Files in rules/; convention/guideline definitions |
| other | Nothing matches |
Check for a prior challenge run before dispatching triage:
--findings-out provided: check whether that file exists and starts with # Challenge Findings + **Format-version:**. If yes → re-challenge.challenge-results*.md or challenge-findings*.md in the target's directory with the same validation check.Note re-challenge status in context for Phase 2 critic selection.
Dispatch a single triage subagent (model: haiku, subagent_type: general-purpose). Pass:
yes / no)--focus value if provided--no-specialists flag if providedGenerics:
senior-engineer.md — Skeptical Senior Engineer: runtime risks, edge cases, security, operational blindnesssystems-architect.md — Systems Architect: abstraction violations, change amplification, data model problemsadversarial-reviewer.md — Adversarial Reviewer: wrong solution entirely, UX failures, "should this exist?"Specialists:
agent-definition.md — Agent Definition Critic: agent file quality, executor compatibility, scope leakagecontract-caller.md — Contract & Caller Critic: output schema fragility, breaking change surface, implicit contractsdata-integrity.md — Data Integrity Critic: transaction safety, partial writes, cache/source-of-truth divergencedocumentation-architect.md — Documentation Architect Critic: doc set structure, mode confusion, findability gapsend-user-reader.md — End-User Reader Critic: assumed prerequisites, missing steps, error path silenceoperational-resilience.md — Operational Resilience Critic: resource exhaustion, upstream failures, recovery behaviorstructural-minimalist.md — Structural Minimalist Critic: speculative layers, single-consumer abstractions, bolted-on requirements, designs that could be half the sizeweb-platform.md — Web Platform Critic: re-renders, data fetching patterns, accessibility, CSS architectureworkflow-ux.md — Workflow & UX Critic: phase transitions, unhelpful defaults, unnecessary frictionTriage subagent instructions: Return a JSON block with:
critics: array of 1–3 persona filenames (e.g., ["senior-engineer.md", "contract-caller.md"])rationale: object mapping each filename to a one-sentence reason for selectiontarget_summary: one sentence describing what the target doesTriage rules:
--no-specialists: select only from generics--focus is a single word ≥6 chars that prefix-matches a specialist slug: always include that specialistyes): select max 2 critics totalsenior-engineer.mdWrite triage JSON to <tmpdir>/triage.md. Parse the result in the orchestrator context.
Quick recon: directory structure, recently modified files (git log -n 10 --diff-filter=M --name-only --format=), largest files. Then:
AskUserQuestion:
question: "I've scanned the codebase. These areas look most suspect. Which should I critique?"
header: "Focus area"
multiSelect: false
options:
- label: "<area 1>"
description: "<why it looks suspect>"
- label: "<area 2>"
description: "<why it looks suspect>"
- label: "Let me specify"
description: "I'll tell you exactly what to look at"
For each persona filename from triage, resolve to the full path by searching ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/mine-challenge/personas/generic/ then personas/specialist/. Verify each file has name and type in frontmatter and a non-empty body. Record validation issues to <tmpdir>/validation-warnings.md and exclude invalid files.
If the generic persona directory is missing or empty, stop with: "Cannot launch critics — persona files not found at ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/mine-challenge/personas/generic/. Run uv run install.py."
Issue ALL critic Agent tool calls in a single response message. Each uses model: sonnet, subagent_type: general-purpose, NOT run_in_background. Each critic receives:
target_summary from triage--focus was provided: "The user is specifically concerned about: <focus>. Weight your analysis toward this concern."audience, developers, and data-sensitivity fields. If present, include: "Project context: audience is <audience>, <developers> developer(s), data sensitivity is <data-sensitivity>. Calibrate your findings to this context — skip findings that would only matter for a different audience or scale." If absent, do not fabricate context — omit this line.<tmpdir>/<persona-slug>-report.mdfile:line for codebase claims; canonical URL for external patternsResolution: Auto-apply | User-directed + one-sentence fix or options**Why it matters**, **Evidence**, **Design challenge**After all critics complete, verify each output file exists and has ≥500 bytes. Record undersized/missing files to <tmpdir>/validation-warnings.md.
Dispatch synthesis as a separate subagent (model: sonnet, subagent_type: general-purpose) for fresh context.
The synthesis subagent receives:
<tmpdir>/<slug>-report.md for each critic)target_summary--cap, default 7)--findings-out path if provided, otherwise <tmpdir>/challenge-results.md<tmpdir>/validation-warnings.md if it existsPRIMARY OBJECTIVE (include as opening paragraph): You MUST write a findings file to <output path> using the Write tool before you finish. If you do nothing else, write that file.
Synthesis procedure:
severity: highest severity any critic assigned (must be CRITICAL / HIGH / MEDIUM / TENSION — reclassify non-contract values as MEDIUM)type: type best describing the root causedesign-level: Yes wins when critics disagreeresolution: Auto-apply only when ALL critics agree on the same fix AND it's localized and additive AND severity is not CRITICAL. Otherwise User-directed. When ambiguous, default User-directed.status: pending for all in-cap findings; overflow for findings beyond the capoverflow: false for in-cap findings; true for findings beyond the capresolution: User-directed regardless of the resolution field from any critic or agreement level. This is a non-negotiable override — do not classify any CRITICAL finding as Auto-apply under any circumstances.resolution: Auto-apply findings as status: pending so Phase 4 applies them; mark resolution: User-directed findings as status: overflowwhy-it-matters (most concrete consequence statement), evidence (all file:line citations, deduped), design-challenge (strongest question). Write not cited for evidence when none; omit other fields when absent.## Likely Invalid section per the findings protocol; renumber the remaining findings to stay contiguous (no gaps in the ## Finding N: sequence).Write findings file to the output path using Format-version: 3 header. Include **Likely-invalid:** N in the header block (even when 0). Format per ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/mine-challenge/findings-protocol.md.
After synthesis subagent completes: Verify the findings file exists at the output path. If missing (subagent returned text instead of writing), extract findings from the returned text: if it starts with # Challenge Findings and contains **Format-version:** write as-is (verify **Likely-invalid:** line is present; inject **Likely-invalid:** 0 after the **Format-version:** line if missing); if it contains ## Finding headings inject the header block (including **Likely-invalid:** 0) then write; otherwise stop with "Error: synthesis subagent did not produce findings in a writable format — re-run /mine-challenge."
Read the findings file. Announce: "Specialists selected: [names from triage]" and note re-challenge if applicable. For each critic excluded by validation, announce the exclusion before findings.
If --mode=passthrough: present a one-paragraph summary (count by severity, likely-invalid count, top takeaway). Return. Do not execute anything.
If --findings-out provided (structured mode): auto-apply all resolution: Auto-apply, status: pending findings directly via Edit tool. Update status: applied in findings file for each. Skip interactive prompts. Write "Challenge complete — findings written to <path>. Returning to caller." Return.
If standalone mode (direct user invocation, mine-grill caller):
Read and follow the Inline Resolution Flow in ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/mine-challenge/findings-protocol.md exactly. After all findings are processed, report: "Applied N findings. M skipped. K overflow (use --verbose to see all). L flagged as likely invalid." List critic report paths and findings file path.
If --verbose: also present overflow findings (status: overflow) after the main flow, labeled as "Additional findings (beyond cap)".
Structured callers (pass --findings-out, read findings file per ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/mine-challenge/caller-protocol.md):
skills/mine-define/SKILL.mdPassthrough callers (pass --mode=passthrough):
skills/mine-research/SKILL.mdskills/mine-brainstorm/SKILL.mdStandalone callers (full inline resolution flow):
skills/mine-grill/SKILL.mdskills/mine-gap-close/SKILL.mdInline-revision callers (invoke challenge, read findings in-context, revise own proposal):
skills-impeccable/i-adapt/SKILL.md, skills-impeccable/i-animate/SKILL.md, skills-impeccable/i-bolder/SKILL.mdskills-impeccable/i-clarify/SKILL.md, skills-impeccable/i-colorize/SKILL.md, skills-impeccable/i-delight/SKILL.mdskills-impeccable/i-distill/SKILL.md, skills-impeccable/i-harden/SKILL.md, skills-impeccable/i-layout/SKILL.mdskills-impeccable/i-overdrive/SKILL.md, skills-impeccable/i-optimize/SKILL.md, skills-impeccable/i-polish/SKILL.mdskills-impeccable/i-quieter/SKILL.md, skills-impeccable/i-typeset/SKILL.mdDetection callers (scan for severity labels, don't read findings file):
skills/mine-build/SKILL.mdTo find all callers: grep -r 'CHALLENGE-CALLER' ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/ ${CLAUDE_CONFIG_DIR:-~/.claude}/skills-impeccable/ --include='*.md' -l
development
Use when the user says: "document how X works", "write up how this works", "durable explanation", "explain this for the docs", "document this subsystem". Writes a durable, architectural-altitude explanation that survives code churn.
development
Use when picking up a fresh session after /clear, a stop, or an unanswered AskUserQuestion. Reconstructs the prior session's intent from its transcript tail and surfaces any unresolved decision; user-invoked only — for a hand-written end-of-day handoff use /mine-good-morning instead.
development
Use when the user says: "what did we discuss", "continue where we left off", "remember when", "as I mentioned", "you suggested", "we decided", "search my conversations", "find the conversation where", "what did we work on", or uses implicit signals like past-tense references, possessives without context, or assumptive questions. Direct search over past Claude Code sessions via cass.
tools
Use when the user says: "what context do I have", "relevant history for this task", "what have we done related to this". Also usable proactively when starting work that likely has prior history. Assembles a structured context brief from past session history via cass, scoped to the current task and workspace.