skills/mine.research/SKILL.md
Use when the user says: "research adding X", "feasibility study", "evaluate approach", or wants a focused investigation before committing. Dispatches the researcher agent for codebase investigation and presents a structured brief.
npx skillsauth add NodeJSmith/Claudefiles mine.researchInstall 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.
Deep investigation of a codebase to evaluate a proposed change, new pattern, or architectural direction. Heavy on questions — surfaces what the user truly needs, not just what they initially say. Produces a structured research brief.
| Skill | Question it answers |
|-------|-------------------|
| /mine.research | "What would it take to do X in this codebase?" |
| /mine.define | "How should we build X?" |
Research comes before design docs and plans. It's the investigation that makes those possible.
$ARGUMENTS — the proposal to investigate. Can be:
/research "add SQLite database and command pattern"/research "should we use SQLAlchemy or raw sqlite3?"/research "would event sourcing work here?"/research "what would it take to move from files to a database?"/research "this app needs persistent state — what are our options?"Do not start exploring the codebase yet. First, understand what the user actually wants and why.
Use AskUserQuestion to probe motivation, constraints, and prior thinking. Ask 2-3 questions in a single call (multi-question, not multi-select).
The goal is to distinguish between:
Example opening questions — adapt the Motivation options to match the proposal's domain. The snippets below are items within the AskUserQuestion: questions: array. They show how the structure varies across different types of proposals:
Persistence/data layer proposal (e.g., "add a database"):
- question: "What's driving this change?"
header: "Motivation"
options:
- label: "Data is getting lost"
description: "State doesn't survive restarts, crashes, or context switches"
- label: "Growing complexity"
description: "In-memory data structures are getting unwieldy"
- label: "New feature needs it"
description: "A planned feature requires persistent or queryable data"
Architecture/pattern proposal (e.g., "should we adopt a monorepo?"):
- question: "What's driving this change?"
header: "Motivation"
options:
- label: "Coordination overhead"
description: "Cross-repo changes are painful — too many PRs, broken integrations"
- label: "Inconsistent standards"
description: "Each repo drifts on tooling, linting, testing conventions"
- label: "Deployment coupling"
description: "Services need to ship together but repos make that hard"
Technology choice proposal (e.g., "switch from REST to GraphQL"):
- question: "What's driving this change?"
header: "Motivation"
options:
- label: "Over-fetching / under-fetching"
description: "Clients need data from multiple endpoints or get too much back"
- label: "API evolution pain"
description: "Adding fields or endpoints is getting fragile"
- label: "Developer experience"
description: "The current API is hard to work with or document"
The Flexibility question is consistent across all proposals:
- question: "How committed are you to the specific approach mentioned, vs. open to alternatives?"
header: "Flexibility"
options:
- label: "Exploring options"
description: "I mentioned one idea but I'm open to whatever works best"
- label: "Leaning this way"
description: "I have a preference but could be convinced otherwise"
- label: "Decided"
description: "I've already thought this through — I want to know how, not whether"
Generate domain-appropriate Motivation options based on the user's proposal — the examples above are illustrations, not templates. If the user mentioned multiple things (e.g., "SQLite + command pattern"), ask whether those are linked or separable. If the proposal is vague, ask more. If it's specific, ask fewer.
Based on the answers, ask 1-2 targeted follow-ups to fill in gaps:
Do not ask more than 2 rounds of questions before moving to Phase 2. If you still have uncertainties, note them as open questions to revisit after seeing the code.
Dispatch the research to a researcher agent. This runs the heavy codebase exploration, web research, and synthesis outside the main context window.
get-skill-tmpdir mine-research to get a temp directory.Agent(subagent_type: "researcher") with a prompt containing:
researcher.md<quick|normal|deep><tmpdir>/brief.md<tmpdir>/brief.md and check that it exists and contains the # Research Brief: header. If the file is missing, empty, or lacks the expected header, inform the user that the research agent failed to produce a complete brief and offer:
Research briefs are forward-looking — they evaluate a proposed change before committing to an approach. They may feed into a design doc (when a direction is chosen) or be abandoned (if the approach is rejected).
The recommended convention is a date-stamped topic directory under design/research/:
design/research/
└── YYYY-MM-DD-topic-name/
├── research.md Main research brief
├── prereq-01-name.md Prerequisite breakdowns (if applicable)
└── ... Additional artifacts
AskUserQuestion:
question: "Where should I save the research brief?"
header: "Output"
multiSelect: false
options:
- label: "design/research/ (Recommended)"
description: "Save as design/research/YYYY-MM-DD-<topic>/research.md — with room for prereq breakdowns"
- label: "docs/research/"
description: "Save as docs/research/YYYY-MM-DD-<topic>.md"
- label: "Just show me"
description: "Display in the conversation, don't save a file"
Create the design/research/ directory if it doesn't exist. If the project already has research in docs/, follow the existing convention.
Copy (never move) the brief from the temp file to the user's chosen location, or display it inline if they chose "Just show me". The tmpdir copy must always remain intact — downstream challenge and design handoffs reference it.
After the save step, set <research_brief_path>:
<research_brief_path> = the saved file path<research_brief_path> = <tmpdir>/brief.mdPresent the key findings conversationally and ask what the user wants to do next.
AskUserQuestion:
question: "Research is done. What would you like to do next?"
header: "Next step"
multiSelect: false
options:
- label: "Challenge these findings first"
description: "Run /mine.challenge on the research brief before committing to a direction"
- label: "Design it (/mine.define)"
description: "Formalize findings into a design doc — the research brief will be passed as prior work"
- label: "Build it (/mine.build)"
description: "Skip design — route straight to implementation"
- label: "I need to think about it"
description: "The brief has what I need — I'll come back when I'm ready"
If "Challenge these findings first" is selected: invoke /mine.challenge --mode=passthrough --target-type=research <research_brief_path>. After challenge completes, loop back to this gate.
If "Design it (/mine.define)" is selected: invoke /mine.define and pass <research_brief_path> so mine.define can use it as prior work and skip its own researcher dispatch.
If "Build it (/mine.build)" is selected: invoke /mine.build with context: "Prior research brief available at <research_brief_path>." This ensures mine.build's prior-analysis detection fires reliably.
| Rationalization | Reality | |---|---| | "I have extensive prior analysis — skip research" | Prior analysis covers the problem space. Research covers the solution space — competing approaches, existing patterns in the codebase, API constraints. They answer different questions. Skipping research has led to shipping with suboptimal designs that a brief investigation would have caught. | | "The approach is obvious, no need to investigate" | The "obviously correct" approach is by definition the least-investigated one. Research has repeatedly surfaced better designs — method-based vs persona-based splits, orthogonal dimensions the intuitive approach didn't consider. Research is cheap relative to a design revision after challenge finds gaps. | | "Research will slow us down" | A 2-minute research dispatch is cheaper than a design revision after challenge finds holes that research would have prevented. The brief feeds forward into design — skipping it means the design phase compensates with ad-hoc investigation anyway. | | "This question implies we should design/file/ship" | A scoped question ("can X be done?") is not a workflow trigger. Answer the question by completing the brief and presenting the Phase 3 next-step gate — that gate is the escalation offer. Don't silently launch issue filing, design, or shipping from a scoped question. |
/mine.define to formalize decisions./mine.build to route to the right implementation workflow./mine.challenge for general health assessment.development
Use when the user says: 'create an issue', 'file an issue', 'open an issue', 'write an issue', 'new issue for this'. Codebase-aware issue creation — investigates the code to produce well-structured issues with acceptance criteria, affected areas, and enough detail for automated triage.
development
Use when the user says: 'triage issues', 'classify issues by complexity', 'assess issue complexity', 'find quick wins', 'which issues are small', 'batch issue assessment'. Batch codebase-aware issue triage — parallel Haiku subagents assess actual complexity and effort by reading the code, not just titles.
development
Use when the user says: "review my changes", "run the reviewers", "code and integration review", "readability review", "maintainability review", "sniff test this", "WTF check", "code smells", "is this code any good", "fresh eyes on this branch", "review this directory", "check this module". Dispatches three parallel reviewers — code, integration, and a readability pass — and consolidates findings into one prioritized report.
development
Use when the user says: "clean code check", "style review", "LLM smell check", "code hygiene", "nitpick this", "style check", "find style sins", "nitpicker review", "anal retentive review", "exhaustive style review", "no-filter style report". Dispatches three parallel stylistic checkers — llm-checker (training-bias patterns), lazy-checker (deferred debt), and nitpicker (style hygiene) — and consolidates findings into a report organized by checker with a Summary section for orchestration consumption.