[Documentation] Use when generating, smart-merging or refactoring the root AI context (CLAUDE.md, AGENTS.md) and its Claude/Codex projections. Config file only: project-config.
日本語の概要は準備中です。原文の説明を表示しています。
[Document Processing] Use when converting between PDF and Markdown: text PDFs to Markdown (scanned PDFs are reported, not OCR'd), Markdown to styled PDF. --to={markdown|pdf}.
日本語の概要は準備中です。原文の説明を表示しています。
インストール方法を見るインストールする前に、エージェントに与えられる指示の中身を確認できます。
Goal: Convert PDF to Markdown, or Markdown to PDF, through one entry point.
Summary: Select the required direction → probe its dependencies → install only if missing → convert → check JSON status and the output file. Native text extraction and PDF rendering are supported; scanned-PDF OCR is unavailable.
Workflow:
--to markdown (PDF in, Markdown out) or --to pdf (Markdown in, PDF out)package.json, so install only missing dependencies for the selected directionscripts/convert.cjs --to <direction> with the direction's own optionsKey Rules:
--to is required. There is no default direction — converting the wrong way silently is worse than an error.--to markdown never pulls in the PDF renderer, and vice versa.Be skeptical. Apply critical thinking, sequential thinking. Every claim needs traced proof, confidence percentages (Idea should be more than 80%).
--to markdown)--to pdf)Convert PDF files to Markdown (with automatic detection of native text vs scanned documents) and Markdown files to high-quality PDF (with code syntax highlighting and custom CSS).
| Flag | Converts | Lives in | Dependencies |
|---|---|---|---|
--to markdown | PDF → Markdown | to-markdown/ | @opendocsg/pdf2md, pdfjs-dist |
--to pdf | Markdown → PDF | to-pdf/ | md-to-pdf, gray-matter |
Use Node.js >=18 for PDF → Markdown; for Markdown → PDF, use the runtime range in to-pdf/package.json. From the project root, probe the selected consumer's dependencies with createRequire before installing:
node -e "const p=require('node:path'); const r=require('node:module').createRequire(p.resolve('.claude/skills/pdf-convert/to-markdown/package.json')); r.resolve('@opendocsg/pdf2md');"
node -e "const p=require('node:path'); const r=require('node:module').createRequire(p.resolve('.claude/skills/pdf-convert/to-pdf/package.json')); r.resolve('md-to-pdf'); r.resolve('gray-matter');"
Each direction installs separately. Run only the probe and setup for the direction you need; its manifest owns package versions. Install missing dependencies with:
# PDF -> Markdown
cd .claude/skills/pdf-convert/to-markdown
npm install
# Markdown -> PDF
cd .claude/skills/pdf-convert/to-pdf
npm install
ck init (which runs install.sh) handles every skill at once.
Note: --to pdf may download Chromium (~150MB) on first run unless system Chrome is detected.
Scanned-PDF OCR is unimplemented. Installing optional OCR packages does not enable it.
# PDF -> Markdown (auto-detects native text vs scanned)
node .claude/skills/pdf-convert/scripts/convert.cjs --to markdown --input ./document.pdf
# PDF -> Markdown with an explicit output path and forced native mode
node .claude/skills/pdf-convert/scripts/convert.cjs --to markdown -i ./doc.pdf -o ./out.md --mode native
# Markdown -> PDF
node .claude/skills/pdf-convert/scripts/convert.cjs --to pdf --input ./README.md
# Markdown -> PDF with custom CSS
node .claude/skills/pdf-convert/scripts/convert.cjs --to pdf -i ./doc.md --css ./my-style.css
--to=markdown and --to markdown are equivalent. A missing or unknown --to prints the valid
directions and exits 1.
| Option | Description | Default |
|---|---|---|
--to | Conversion direction: markdown or pdf | (required) |
--to markdown (PDF → Markdown)| Option | Short | Description | Default |
|---|---|---|---|
--input | -i | Input PDF file path | (required) |
--output | -o | Output markdown file path | {input}.md |
--mode | -m | Conversion mode: auto, native, ocr | auto |
--help | -h | Show help message |
--to pdf (Markdown → PDF)| Option | Short | Description | Default |
|---|---|---|---|
--input | -i | Input markdown file path | (required) |
--output | -o | Output PDF file path | {input}.pdf |
--css | -c | Custom CSS file path | built-in |
--no-highlight | Disable syntax highlighting | false | |
--help | -h | Show help message |
Run scripts/convert.cjs --to <direction> --help to see a direction's full help.
PDF → Markdown
@opendocsg/pdf2mdMarkdown → PDF
Both directions work on Windows, macOS and Linux.
--to markdown)Checks whether the first page has extractable text. Uses native extraction if it does, otherwise reports that the document appears to be scanned.
Fast direct text extraction. Best for PDFs with selectable text.
The converter returns a failure for OCR mode. Report the limitation for scanned documents; native mode is suitable only when the PDF contains selectable text.
--to pdf)Override any of it with --css.
Both directions return JSON on success:
{
"success": true,
"input": "/path/to/input.pdf",
"output": "/path/to/output.md",
"stats": {
"pages": 5,
"mode": "native"
}
}
--to pdf returns pages instead of stats. On failure both return
{ "success": false, "error": "..." } and exit 1.
Chrome not found (--to pdf): the converter downloads Chromium automatically. Set
PUPPETEER_SKIP_DOWNLOAD=1 to prevent that.
Missing dependencies: the error output carries a hint with the exact cd … && npm install
command for the direction you invoked.
Font issues: embed fonts via CSS @font-face with base64-encoded fonts for consistent rendering.
cd .claude/skills/pdf-convert && node tests/dispatcher.test.cjs # routing and --to validation
cd .claude/skills/pdf-convert/to-markdown && node tests/run-tests.cjs
cd .claude/skills/pdf-convert/to-pdf && node tests/run-tests.cjs
[IMPORTANT] Use
TaskCreateto break ALL work into small tasks BEFORE starting. This prevents context loss from long files. Keep task depth proportional to the work.
IMPORTANT MUST ATTENTION Goal: Convert PDF to Markdown, or Markdown to PDF, through one entry point — scripts/convert.cjs --to {markdown|pdf}.
MUST ATTENTION Route: select direction → probe dependencies → install only if missing → convert → verify JSON status and the output file. Report unsupported OCR; optional package installation cannot enable it.
IMPORTANT MUST ATTENTION --to is required — never guess the direction for the user
IMPORTANT MUST ATTENTION each direction installs its own dependencies; the error hint names the exact directory
IMPORTANT MUST ATTENTION break work into small todo tasks using TaskCreate BEFORE starting
IMPORTANT MUST ATTENTION search codebase for 3+ similar patterns before creating new code
IMPORTANT MUST ATTENTION cite file:line evidence for every claim (confidence >80% to act)
IMPORTANT MUST ATTENTION add a final review todo task to verify work quality
[TASK-PLANNING] Before acting, analyze task scope and systematically break it into small todo tasks and sub-tasks using TaskCreate.
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
[Documentation] Use when generating, smart-merging or refactoring the root AI context (CLAUDE.md, AGENTS.md) and its Claude/Codex projections. Config file only: project-config.
日本語の概要は準備中です。原文の説明を表示しています。
[Code Quality] Use when a workflow step or the user asks for AI code or plan review: LLM calls, prompts, agents, RAG, evals and guardrails. --mode={code|plan}; --report-only is read-only.
日本語の概要は準備中です。原文の説明を表示しています。
[Architecture] Use when a workflow step or the user asks for architecture design, compliance review, scalability grading or whole-project audit via --mode={design|review|scalability|full}.
日本語の概要は準備中です。原文の説明を表示しています。
[Content] Use when a workflow step or the user asks for product/feature ideation with ranked opportunities and validation tests. --mode={roadmap|scope}.
日本語の概要は準備中です。原文の説明を表示しています。
[Content] Use when a workflow step or the user asks for business viability: Business Model Canvas, financials, risks and go-to-market recommendation.
日本語の概要は準備中です。原文の説明を表示しています。
[Code Quality] Use when a workflow step or the user asks for a focused code-change review: staged, unstaged, branch diff or simple pull request. --fix-loop fixes and re-reviews. Complex pull request: workflow-review-changes; rationale: why-review.
日本語の概要は準備中です。原文の説明を表示しています。