From magician
Performs structured multi-source research with web search, document analysis, and library docs for investigating, analyzing, or evaluating topics. User drives via interactive questions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/magician:magicThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Structured research and consulting workflow. Uses web search, document analysis, and library documentation. Every decision point uses `AskUserQuestion` so the user explicitly drives the process via action-reaction UI.
Structured research and consulting workflow. Uses web search, document analysis, and library documentation. Every decision point uses AskUserQuestion so the user explicitly drives the process via action-reaction UI.
This skill is auto-triggered by the UserPromptSubmit hook when the user's message contains research-intent keywords: research, investigate, analyze, analyse, find out, explore, examine, assess, evaluate, discover, look into, audit, study, probe.
When auto-triggered, announce before any other action:
"Auto-activating /magic for structured research. Let me gather a few inputs before diving in."
Read the user's original message carefully. Silently classify the research into one of these types — this determines which sources and output formats to offer:
| Type | Signals | Notes |
|---|---|---|
| Academic / scientific | thesis, diploma, dissertation, paper, study, hypothesis, literature review, citation, journal, research question, scientific, university, course | Target academic databases in web search; offer citation-aware output formats |
| Software / tech library | library name, version, API, framework, npm, Maven, pip, compatibility, SDK | context7 may be relevant |
| Financial / business | revenue, Q1–Q4, KPI, margins, market share, P&L, report | Read tool for files; structured financial output |
| Document / file analysis | file path mentioned, .xlsx/.pdf/.docx, "this report", "this article" | Read tool; context7 NOT relevant |
| General / strategic | anything else | Web search; broad output options |
Do NOT ask for anything already clear from the message.
Before showing this question, apply these rules based on Step 0.1 classification:
For academic/scientific topics, use this configuration (Web Search description targets academic databases):
{
"questions": [
{
"question": "Which sources should I search?",
"header": "Research Sources",
"multiSelect": true,
"options": [
{
"label": "Academic & Web Search",
"description": "Search Google Scholar, arXiv, PubMed, IEEE Xplore, ACM Digital Library, ResearchGate, and general web — for papers, journals, studies, and references"
},
{
"label": "My Documents / Files",
"description": "Read and analyze files you provide — existing papers, notes, drafts, datasets. Uses the Read tool, no external service needed."
}
]
}
]
}
For financial / business / document / file topics (no software library involved), use this configuration — Tech Library Docs is absent:
{
"questions": [
{
"question": "Which sources should I search?",
"header": "Research Sources",
"multiSelect": true,
"options": [
{
"label": "Web Search",
"description": "Search the internet for current articles, news, reports, and documentation"
},
{
"label": "My Documents / Files",
"description": "Read and analyze files you provide — Excel, PDF, Word, CSV, reports, articles, any text-based file. Uses the Read tool, no external service needed."
}
]
}
]
}
For software / tech library topics and general/strategic topics where a framework could plausibly be involved, use this configuration (all three options):
{
"questions": [
{
"question": "Which sources should I search?",
"header": "Research Sources",
"multiSelect": true,
"options": [
{
"label": "Web Search",
"description": "Search the internet for current articles, news, reports, and documentation"
},
{
"label": "Tech Library Docs (context7)",
"description": "For software questions only — search official docs for npm packages, Java/Spring/Maven libraries, Python modules, framework APIs, version compatibility. NOT for business documents or general research."
},
{
"label": "My Documents / Files",
"description": "Read and analyze files you provide — Excel, PDF, Word, CSV, reports, articles, any text-based file. Uses the Read tool, no external service needed."
}
]
}
]
}
Wait for the response before proceeding.
Use AskUserQuestion with this configuration:
{
"questions": [
{
"question": "How thorough should the research be?",
"header": "Research Depth",
"multiSelect": false,
"options": [
{
"label": "Quick overview",
"description": "Fast scan of top sources — best for time-sensitive needs or initial exploration"
},
{
"label": "Standard depth",
"description": "Thorough research across selected sources with cross-referenced synthesis"
},
{
"label": "Deep dive",
"description": "Exhaustive multi-angle analysis with gap identification — takes longer"
}
]
}
]
}
Only proceed with this step if both conditions are true:
If the topic is a business document, financial report, article, spreadsheet, or anything that is not a software library/framework — skip this step entirely and go to Step 1.2.
If user selected "Tech Library Docs (context7)", check availability:
python3 -c "
import subprocess
try:
result = subprocess.run(['claude', 'mcp', 'list'], capture_output=True, text=True, timeout=5)
print('found' if 'context7' in result.stdout.lower() else 'missing')
except Exception:
print('missing')
" 2>/dev/null || echo "missing"
If output is missing, use AskUserQuestion:
{
"questions": [
{
"question": "context7 MCP is not installed. It enables searching official library and framework documentation. Install it?",
"header": "Install context7?",
"multiSelect": false,
"options": [
{
"label": "Yes — install context7",
"description": "Adds context7 to Claude Code: claude mcp add --transport http context7 https://mcp.context7.com/mcp"
},
{
"label": "Skip for now",
"description": "Continue without library documentation search"
}
]
}
]
}
If user selects "Yes — install context7", run:
claude mcp add --transport http context7 https://mcp.context7.com/mcp
Then confirm: "context7 installed — library docs now available."
If "Skip": continue without context7, note the limitation in findings.
If user selected "My Documents / Files", use AskUserQuestion:
{
"questions": [
{
"question": "How would you like to provide the documents?",
"header": "Document Source",
"multiSelect": false,
"options": [
{
"label": "I'll type the paths in the terminal",
"description": "Paste or type file paths in your next message — I'll read them with the Read tool"
},
{
"label": "Paths are already in my request",
"description": "Use the file paths or filenames I already referenced above"
}
]
}
]
}
Wait for file paths if user chose the first option. Extract paths from the user's next message.
Note: Reading local documents uses the built-in Read tool — no external service or MCP required. This works for any text-readable file:
.xlsx,.csv,.docx,.md,.txt, financial reports, articles, meeting notes, etc.
Execute research in parallel where possible. Take structured notes as you go.
Use WebSearch with 2–4 targeted queries. Tailor queries to the research type:
Academic/scientific topic — prefix queries to target academic sources:
site:scholar.google.com <topic> or "<topic>" filetype:pdf journalarXiv <topic> for STEM/CS/physics/mathPubMed <topic> for biomedical/life sciencesIEEE "<topic>" for engineering/electronicsACM "<topic>" for computer scienceGeneral/business topic — standard targeted queries:
For each query:
Synthesize web findings into a running outline.
For each library or framework relevant to the topic:
mcp__context7-global__resolve-library-id with the library namemcp__context7-global__query-docs with the resolved ID and a focused queryOnly use this step for genuine software library/framework questions — e.g. "what Spring Boot version supports Java 21?", "what's the correct Axios API for interceptors?". Do NOT invoke context7 for business reports, financial documents, articles, or any non-library topic.
Uses the Read tool — no external service. For each provided file path:
Cross-reference all findings. Identify:
For academic/scientific topics, use this configuration (citation-aware formats surfaced first):
{
"questions": [
{
"question": "How should I present the findings?",
"header": "Output Format",
"multiSelect": false,
"options": [
{
"label": "Literature review",
"description": "Structured academic review: Introduction, thematic sections, synthesis of sources, gaps identified, conclusion — with in-text citations and reference list"
},
{
"label": "Annotated bibliography",
"description": "Each source listed with full citation + 2–3 sentence annotation on relevance, methodology, and key findings"
},
{
"label": "Research outline",
"description": "Structured outline for a thesis chapter, paper, or report — with section headings, key points per section, and source assignments"
},
{
"label": "Summary with citations",
"description": "Concise findings summary with properly formatted citations (ask for citation style: APA, MLA, IEEE, Harvard, Chicago)"
},
{
"label": "Visual design via /conjure",
"description": "Invoke /conjure for a research poster, presentation slides, or visual summary design"
}
]
}
]
}
If academic format chosen, also ask for citation style via AskUserQuestion:
{
"questions": [
{
"question": "Which citation style should I use?",
"header": "Citation Style",
"multiSelect": false,
"options": [
{
"label": "APA (7th edition)",
"description": "Common in social sciences, psychology, education"
},
{
"label": "MLA",
"description": "Common in humanities, literature, language studies"
},
{
"label": "IEEE",
"description": "Common in engineering, electronics, computer science"
},
{
"label": "Harvard",
"description": "Common in UK universities and natural sciences"
},
{
"label": "Chicago / Turabian",
"description": "Common in history, arts, some social sciences"
},
{
"label": "No formal citation needed",
"description": "Include source URLs and titles informally"
}
]
}
]
}
For all other topics, use this configuration:
{
"questions": [
{
"question": "How should I present the findings?",
"header": "Output Format",
"multiSelect": false,
"options": [
{
"label": "Markdown report",
"description": "Structured document with sections: Executive Summary, Key Findings, Details, Sources"
},
{
"label": "Executive summary",
"description": "Concise 1-page overview of the most important findings and recommendations"
},
{
"label": "Data tables",
"description": "Tabular format — ideal for metrics, financial figures, feature comparisons"
},
{
"label": "Visual design via /conjure",
"description": "Invoke /conjure for an interactive visual presentation or dashboard design"
},
{
"label": "Bullet notes",
"description": "Fast, unformatted key points — best for quick handoff or further processing"
}
]
}
]
}
If user selects "Visual design via /conjure" in either config: invoke /conjure now, passing context about the research topic and findings outline so conjure starts informed. Return here after spec approval.
{
"questions": [
{
"question": "What should happen with the output?",
"header": "Save & Commit",
"multiSelect": false,
"options": [
{
"label": "Show here only",
"description": "Display findings in the terminal — no file created"
},
{
"label": "Save to file",
"description": "Write findings to a markdown file in the current directory"
},
{
"label": "Save and commit to git",
"description": "Write to file and create a git commit with a descriptive message"
}
]
}
]
}
If saving: determine an appropriate filename from the topic (e.g., research-q3-results-2026-04-21.md).
Write the findings in the format chosen in Phase 3. Include:
Write findings to the agreed filename using the Write tool.
Use AskUserQuestion to confirm commit message:
{
"questions": [
{
"question": "Confirm the git commit message for this research output:",
"header": "Commit Message",
"multiSelect": false,
"options": [
{
"label": "docs: add research findings",
"description": "Standard docs commit — appropriate for research outputs and reports"
},
{
"label": "I'll provide a custom message",
"description": "Type your preferred commit message in the terminal"
}
]
}
]
}
After confirmation (using the chosen or user-provided message):
git add {filename}
git commit -m "{confirmed message}
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>"
Before asking anything, look at what was just researched and classify it:
| Research type | Signals | Best next skills |
|---|---|---|
| Academic / scientific | thesis, paper, literature review, citation, study, diploma | /conjure (research poster or slides), /magic again (next research angle) |
| Financial / business | revenue, Q1–Q4, KPIs, margins, market share | /conjure (dashboard), /blueprint (action plan) |
| Technical feature / API | endpoints, SDK, library, integration | /blueprint (plan), /conjure (design), /forge (implement) |
| Bug / incident | error, failure, crash, regression, issue | /unravel (debug), /sentinel (security angle) |
| Security / vulnerability | CVE, injection, auth, permissions, exposure | /sentinel (full scan) |
| Performance / scalability | latency, throughput, memory, profiling | /accelerate (profile) |
| Architecture / system design | components, services, data flow, schema | /conjure (visual spec), /blueprint (plan) |
| General knowledge / comparison | options, alternatives, pros/cons, landscape | /conjure (visual comparison), /magic again |
Select the 2 most contextually relevant skills. Always include "Dig deeper" and "Done" as the last two options.
Construct and call AskUserQuestion with context-aware options. The question text should reflect what was actually found — not generic. Examples:
For academic/scientific research:
{
"questions": [
{
"question": "Good foundation of sources. What's the next step for your work?",
"header": "What's Next?",
"multiSelect": false,
"options": [
{
"label": "Research another angle or topic",
"description": "Continue building the literature base — start a new /magic search on a related aspect"
},
{
"label": "Design a presentation or poster with /conjure",
"description": "Turn findings into a visual research poster, slide deck, or summary design"
},
{
"label": "Dig deeper into one source or claim",
"description": "Focus on a specific paper, finding, or gap identified in the research"
},
{
"label": "Done — that's what I needed",
"description": "End the session"
}
]
}
]
}
For financial/business research:
{
"questions": [
{
"question": "Solid analysis — Q3 numbers are in. What's the next move?",
"header": "What's Next?",
"multiSelect": false,
"options": [
{
"label": "Visualize with /conjure",
"description": "Design an executive dashboard or slide deck from these findings"
},
{
"label": "Build an action plan with /blueprint",
"description": "Turn key findings into a prioritized implementation plan"
},
{
"label": "Dig deeper into one area",
"description": "Focus the research on a specific metric, risk, or segment"
},
{
"label": "Done — that's what I needed",
"description": "End the session"
}
]
}
]
}
For technical feature/API research:
{
"questions": [
{
"question": "Research complete. Ready to move from investigation to action?",
"header": "What's Next?",
"multiSelect": false,
"options": [
{
"label": "Plan implementation with /blueprint",
"description": "Convert findings into a TDD task plan with parallelism map"
},
{
"label": "Design the UI/API with /conjure",
"description": "Run a structured design dialogue to produce an approved spec"
},
{
"label": "Dig deeper into one area",
"description": "Investigate a specific part of the findings further"
},
{
"label": "Done — that's what I needed",
"description": "End the session"
}
]
}
]
}
For bug/incident research:
{
"questions": [
{
"question": "Root cause identified. Ready to dig in?",
"header": "What's Next?",
"multiSelect": false,
"options": [
{
"label": "Debug systematically with /unravel",
"description": "Run hypothesis-driven debugging with mandatory preflight — no random code changes"
},
{
"label": "Security scan with /sentinel",
"description": "Check if this bug has security implications across the codebase"
},
{
"label": "Dig deeper into one area",
"description": "Investigate a specific aspect of the findings further"
},
{
"label": "Done — that's what I needed",
"description": "End the session"
}
]
}
]
}
For security research:
{
"questions": [
{
"question": "Security findings noted. Want a full scan?",
"header": "What's Next?",
"multiSelect": false,
"options": [
{
"label": "Full security scan with /sentinel",
"description": "OWASP Top 10, credential detection, injection surface — full codebase sweep"
},
{
"label": "Plan the remediation with /blueprint",
"description": "Create a prioritized fix plan from the identified vulnerabilities"
},
{
"label": "Dig deeper into one area",
"description": "Investigate a specific vulnerability or surface area further"
},
{
"label": "Done — that's what I needed",
"description": "End the session"
}
]
}
]
}
For architecture/design research:
{
"questions": [
{
"question": "Good picture of the landscape. Time to make it concrete?",
"header": "What's Next?",
"multiSelect": false,
"options": [
{
"label": "Design with /conjure",
"description": "Structured design dialogue with visual companion — produces an approved spec"
},
{
"label": "Plan the build with /blueprint",
"description": "Turn the architecture findings into a TDD task plan"
},
{
"label": "Dig deeper into one area",
"description": "Investigate a specific component or decision further"
},
{
"label": "Done — that's what I needed",
"description": "End the session"
}
]
}
]
}
Use these as templates — adapt the question text to reflect the actual topic researched.
| Selection | Action |
|---|---|
| /conjure | Invoke /conjure — pass the research topic and a 2–3 sentence findings summary as context so conjure starts informed |
| /blueprint | Invoke /blueprint — pass findings as the feature spec/requirements input |
| /unravel | Invoke /unravel — pass the identified bug/incident as the starting point |
| /sentinel | Invoke /sentinel — no extra context needed, it scans the codebase |
| /accelerate | Invoke /accelerate — pass performance concerns identified in findings as focus areas |
| Dig deeper | Use AskUserQuestion to ask which area, then return to Phase 2 with a focused query |
| Done | Go to Step 5.4 |
When the user selects "Done", close with:
"That's a solid research session on [topic] — findings saved to [file] if you need them later. Have a great day!"
or if nothing was saved:
"Good investigation on [topic]. Hope the findings give you what you needed — have a great day!"
Keep it brief. No bullet lists. No meta-commentary. Just a clean, friendly close.
npx claudepluginhub alexander-tyagunov/magician --plugin magicianProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.