claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops;…
Converts documents and URLs to markdown via tiered fallback (MCP markitdown, native tools, user notice). Use when a skill must ingest PDF, DOCX, or URL content.
Claude Code
$ npx -y skills add athola/claude-night-market --skill document-conversion --agent claude-code
Codex
$ npx skills add athola/claude-night-market --skill document-conversion -a codex -y
Cursor
$ npx skills add athola/claude-night-market --skill document-conversion -a cursor -y
Gemini CLI
$ npx skills add athola/claude-night-market --skill document-conversion -a gemini-cli -y
GitHub Copilot
$ npx skills add athola/claude-night-market --skill document-conversion -a github-copilot -y
OpenCode
$ npx skills add athola/claude-night-market --skill document-conversion -a opencode -y
Windsurf
$ npx skills add athola/claude-night-market --skill document-conversion -a windsurf -y
name: document-conversion description: Converts documents and URLs to markdown via tiered fallback (MCP markitdown, native tools, user notice). Use when a skill must ingest PDF, DOCX, or URL content. alwaysApply: false category: infrastructure tags: - conversion - markitdown - mcp - documents - pdf - docx dependencies: - content-sanitization - error-patterns provides: infrastructure: - document-conversion - format-detection patterns: - tiered-fallback-conversion - uri-based-conversion usage_patterns: - document-to-markdown - url-content-extraction - file-format-conversion complexity: basic estimated_tokens: 500 progressive_loading: true modules: - modules/format-matrix.md - modules/fallback-tiers.md - modules/uri-construction.md - modules/project-import.md
Convert documents and URLs to markdown using a three-tier fallback strategy. This skill is infrastructure: consumer skills reference it via dependency rather than reimplementing conversion logic.
markdown for downstream processing
editable markdown file (see `modules/project-import.md`)
Identify the document type from the URI before converting.
| Extension | Format | Tier 1 | Tier 2 | |-----------|--------|--------|--------| | `.pdf` | PDF | Yes | Read tool (pages) | | `.docx`, `.doc` | Word | Yes | None | | `.pptx`, `.ppt` | PowerPoint | Yes | None | | `.xlsx`, `.xls` | Excel | Yes | None | | `.html`, `.htm` | HTML | Yes | WebFetch | | `.csv` | CSV | Yes | Read tool | | `.json` | JSON | Yes | Read tool | | `.xml` | XML | Yes | Read tool | | `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp` | Image | Yes | Read tool (visual) | | `.mp3`, `.wav`, `.m4a` | Audio | Yes | None | | `.zip` | Archive | Yes | None | | `.epub` | E-book | Yes | None |
See `modules/format-matrix.md` for quality comparison across tiers.
To convert a document to markdown:
1. DETECT -- Identify format from URI extension or context 2. TRY -- Tier 1: MCP markitdown (best quality) 3. DEGRADE -- Tier 2: native Claude Code tools (if Tier 1 fails) 4. INFORM -- Tier 3: tell user what's needed (if no coverage) 5. SANITIZE -- Apply content-sanitization (external content)
Call the `convert_to_markdown` MCP tool with the document URI. See `modules/uri-construction.md` for URI formatting rules.
If the tool is available and succeeds, you have the best possible conversion. Proceed to the SANITIZE step.
If the tool is not available (not found, connection error) or fails, proceed to Tier 2.
Use built-in tools as format-specific fallbacks. See `modules/fallback-tiers.md` for per-format instructions.
**Supported in Tier 2**: PDF, HTML, images, CSV, JSON, XML. **Not supported in Tier 2**: DOCX, PPTX, XLSX, audio, archives, e-books. Proceed to Tier 3 for these.
When neither Tier 1 nor Tier 2 can handle the format:
> I cannot convert this {format} file without the markitdown > MCP server. To enable conversion, add this to `.mcp.json`: > > ```json > { > "mcpServers": { > "markitdown": { > "type": "stdio", > "command": "uvx", > "args": ["markitdown-mcp"] > } > } > } > ``` > > Alternatively, convert the file to PDF or HTML first, > which I can read with built-in tools.
All converted content is external. Apply the `leyline:content-sanitization` checklist:
Consumer skills depend on this skill and reference the protocol by name:
dependencies: - leyline:document-conversion
Then in their workflow: "Convert the document using the `leyline:document-conversion` protocol."
target path, review markers): `modules/project-import.md`
first; Tier 2 (native tools) only if Tier 1 is unavailable or fails; Tier 3 (user notification with install instructions) only if Tier 2 has no coverage for the format
`--- EXTERNAL CONTENT [source: <tool>] ---` boundary markers and truncated to 2000 words per section before being passed downstream
Tier 2 coverage, the exact Tier 3 user notification template is shown including the `.mcp.json` snippet
conversion; unknown extension surfaced to the user rather than passed to converters blindly
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops;…
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use…
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily…
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use…
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled…
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.