Mode d’emploi
- Copiez la commande et examinez le paquet avant de l’installer dans votre environnement agent.
- Consultez le document original pour les outils, identifiants et environnements requis.
- Décrivez les entrées et le livrable souhaité ; comparez la sortie aux sources.
npx skills add https://github.com/ntanh1402/sdlc-skills --skill sdlc-convert-docAvant de commencer
- L’installation n’inclut ni abonnement au modèle, ni quota API, ni accès aux fichiers.
- Étoiles et installations reflètent l’activité, pas un test indépendant de qualité ou de sécurité.
Rendu depuis le dépôt source en conservant titres, exemples, code, tableaux, liens et images.
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.