Como usar
- Copie o comando e verifique o pacote antes de instalar no seu ambiente de agente.
- Consulte no original as ferramentas, credenciais e ambientes necessários.
- Descreva os dados de entrada e a entrega esperada; confira a saída com as fontes.
npx skills add https://github.com/ntanh1402/sdlc-skills --skill sdlc-convert-docAntes de começar
- A instalação não inclui assinatura de modelo, franquia API ou acesso aos seus arquivos.
- Estrelas e instalações indicam atividade, não um teste independente de qualidade ou segurança.
Renderizado do repositório de origem, preservando títulos, exemplos, código, tabelas, links e imagens.
SDLC Doc to Markdown
Convert local files with the bundled router. Prefer MarkItDown for lightweight structured extraction and Marker when OCR or document-layout recovery is needed.
Workflow
Resolve SKILL_DIR to the directory containing this SKILL.md; do not assume the current working directory is the skill directory.
- Confirm the input is a local file and choose a separate
.mdoutput path. - Run the dependency preflight:
python3 "$SKILL_DIR/scripts/check_dependencies.py" --engine auto- Preview the routing decision when the file type or OCR need is uncertain:
python3 "$SKILL_DIR/scripts/convert_to_markdown.py" INPUT \
--output OUTPUT.md --dry-run- Convert with automatic routing:
python3 "$SKILL_DIR/scripts/convert_to_markdown.py" INPUT --output OUTPUT.md- Read the generated Markdown. Check headings, reading order, tables, equations,
image links, missing text, and OCR corruption before reporting success.
- If a digital PDF produces sparse text, let the script retry it with Marker and
forced OCR. If quality is still poor, rerun explicitly:
python3 "$SKILL_DIR/scripts/convert_to_markdown.py" INPUT.pdf --output OUTPUT.md \
--engine marker --force-ocr --overwriteNever overwrite an existing output unless the user approved replacement. The script enforces this unless --overwrite is passed.
Engine selection
| Input or condition | Engine | Reason |
|---|---|---|
| DOCX, PPTX, XLSX/XLS, HTML, EPUB, email, CSV, JSON, XML, ZIP, and ordinary text-bearing files | MarkItDown | Fast, lightweight structured extraction |
| PNG, JPEG, TIFF, BMP, GIF, or WebP | Marker | Image inputs require OCR and layout recovery |
| PDF with usable embedded text | MarkItDown first | Avoid unnecessary model loading |
| Scanned, image-only, sparse, or garbled PDF | Marker with OCR | Recover text and reading order |
| Layout-heavy PDF, equations, or complex tables | Marker | Stronger layout and math handling |
Use --engine markitdown or --engine marker only to override this policy. Use --page-range, --force-ocr, --strip-existing-ocr, --use-llm, or --disable-image-extraction for Marker-specific work. Marker-specific options make automatic routing choose Marker directly.
Output rules
- Keep the source file unchanged.
- Preserve Marker-generated images beside the Markdown so relative links remain valid.
- Treat conversion as extraction, not proof of correctness. Compare critical values,
names, dates, tables, and formulas against the source.
- Do not enable
--use-llmwithout confirming the configured service and whether the
document may be sent to it.
- Do not process an untrusted path or URL. The router accepts local files only.
Dependencies and troubleshooting
Require markitdown[all]==0.1.6 and marker-pdf==1.10.2; treat a missing or mismatched version as a failed preflight. Do not upgrade these pins implicitly.
Read references/converters.md when installing converters, choosing optional packages, reviewing supported formats, handling model downloads, or evaluating Marker licensing and compute requirements.
Run python3 "$SKILL_DIR/scripts/convert_to_markdown.py" --help for all conversion options.