Agent skill
scan
Stars
163
Forks
31
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/scan
SKILL.md
Scanner Control via scan-mcp
THE GOLDEN RULE
Trust the server defaults. When the user requests a scan without specific requirements:
- Call
start_scan_job({})with NO parameters - Do NOT call
list_devicesunless the user explicitly asks for a specific scanner - Do NOT gather device capabilities "just in case"
- Server auto-selects device, resolution (300dpi), color mode (Lineart), source (ADF Duplex → ADF → Flatbed)
Only override parameters when the user's intent clearly requires it.
Decision Tree
User request → Analyze intent:
1. Generic scan ("scan this", "scan document")
→ start_scan_job({}) immediately
2. User asks for specific scanner ("use the Epson")
→ list_devices, then start_scan_job({ device_id })
3. Document type needs special handling ("photo", "duplex")
→ Override only specific params needed
Common Overrides
| User Intent | Parameters |
|---|---|
| Generic scan | {} |
| Photo scan | { source: "Flatbed", color_mode: "Color", resolution_dpi: 600 } |
| Duplex stack | { duplex: true } |
| OCR-optimized | { color_mode: "Gray", resolution_dpi: 300 } |
For more mappings, see EXAMPLES.md.
Standard Workflow
- Call
start_scan_job(params)→ receive{ job_id, run_dir, state } - Poll
get_job_status({ job_id })untilstate: "completed" - Results in
run_dir:page_*.tiff(captured pages)doc_*.tiff(assembled document)manifest.json(metadata)events.jsonl(event log)
Quick Troubleshooting
If scan fails:
get_manifest({ job_id })— check state and parametersget_events({ job_id })— find error details inscanner_failedevents- Common fixes:
- "No devices" → Ask user to check scanner power/connection
- "Feeder jam" → Try
{ source: "Flatbed" }
For detailed troubleshooting, see TROUBLESHOOTING.md.
Reference Materials
- TOOLS.md — Complete tool reference with all parameters
- EXAMPLES.md — User intent → parameter mappings with reasoning
- TROUBLESHOOTING.md — Detailed troubleshooting flows
- CONFIG.md — Environment variables and configuration
Didn't find tool you were looking for?