K-Dense-AI/scientific-agent-skills / skills/markitdown
markitdown
VerifiedConverts heterogeneous documents and selected URIs to Markdown with Microsoft MarkItDown for text analysis, search, and LLM/RAG ingestion. Covers safe local conversion, streams, Office/PDF/data formats, batch workflows, plugins, vision OCR, Azure extraction, and the official MCP server.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.9 KB |
| references/api_reference.md | markdown | 11.6 KB |
| references/cloud_and_ocr.md | markdown | 13.8 KB |
| references/file_formats.md | markdown | 11.5 KB |
| references/mcp_and_plugins.md | markdown | 7.1 KB |
| references/migration.md | markdown | 9.0 KB |
| references/security.md | markdown | 10.2 KB |
| references/workflows.md | markdown | 8.0 KB |
| scripts/batch_convert.py | script | 10.3 KB |
| scripts/convert_literature.py | script | 11.8 KB |
| scripts/inspect_installation.py | script | 4.8 KB |
scripts/inspect_installation.py
View on GitHub#!/usr/bin/env python3
"""Inspect a MarkItDown installation without loading plugins or using network."""
from __future__ import annotations
import argparse
import json
import platform
import shutil
from importlib.metadata import (
PackageNotFoundError,
entry_points,
metadata,
version,
)
from typing import Any
TARGET_VERSION = "0.1.8"
OPTIONAL_DISTRIBUTIONS = (
"markitdown-ocr",
"markitdown-mcp",
"openai",
"azure-ai-documentintelligence",
"azure-ai-contentunderstanding",
)
def distribution_version(name: str) -> str | None:
"""Return an installed distribution version without importing it."""
try:
return version(name)
except PackageNotFoundError:
return None
def inspect_installation() -> dict[str, Any]:
"""Collect package, extra, plugin, and executable metadata."""
try:
installed_version = version("markitdown")
package_metadata = metadata("markitdown")
extras = sorted(set(package_metadata.get_all("Provides-Extra") or []))
import_error = None
try:
from markitdown import MarkItDown # noqa: F401
except Exception as exc: # Report import health without hiding details.
import_error = f"{type(exc).__name__}: {exc}"
except PackageNotFoundError:
installed_version = None
extras = []
import_error = "PackageNotFoundError: markitdown is not installed"
discovered_plugins = sorted(
(
{
"name": point.name,
"module": point.value,
"distribution": (
point.dist.name
if getattr(point, "dist", None) is not None
else None
),
}
for point in entry_points(group="markitdown.plugin")
),
key=lambda item: (item["name"], item["module"]),
)
return {
"target_version": TARGET_VERSION,
"python": platform.python_version(),
"markitdown": {
"version": installed_version,
"import_error": import_error,
"declared_extras": extras,
},
"optional_distributions": {
name: distribution_version(name) for name in OPTIONAL_DISTRIBUTIONS
},
"plugins": discovered_plugins,
"executables": {
"markitdown": shutil.which("markitdown"),
"markitdown-mcp": shutil.which("markitdown-mcp"),
"exiftool": shutil.which("exiftool"),
"ffmpeg": shutil.which("ffmpeg"),
},
}
def print_human_readable(report: dict[str, Any]) -> None:
markitdown = report["markitdown"]
print(f"Python: {report['python']}")
print(
"MarkItDown: "
f"{markitdown['version'] or 'not installed'} "
f"(skill target: {report['target_version']})"
)
if markitdown["import_error"]:
print(f"Import health: {markitdown['import_error']}")
else:
print("Import health: OK")
extras = markitdown["declared_extras"]
print(f"Declared extras: {', '.join(extras) if extras else 'unavailable'}")
print("Optional distributions:")
for name, installed_version in report["optional_distributions"].items():
print(f" {name}: {installed_version or 'not installed'}")
print("Discovered plugins (not loaded):")
if report["plugins"]:
for plugin in report["plugins"]:
distribution = plugin["distribution"] or "unknown distribution"
print(f" {plugin['name']}: {plugin['module']} ({distribution})")
else:
print(" none")
print("Executables:")
for name, path in report["executables"].items():
print(f" {name}: {path or 'not found'}")
def build_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser(
description=(
"Inspect MarkItDown versions, extras, plugin entry points, and "
"optional executables without loading plugins."
)
)
parser.add_argument(
"--json",
action="store_true",
help="Print machine-readable JSON",
)
parser.add_argument(
"--allow-version-mismatch",
action="store_true",
help="Exit successfully when MarkItDown differs from the skill target",
)
return parser
def main() -> int:
args = build_parser().parse_args()
report = inspect_installation()
if args.json:
print(json.dumps(report, indent=2, ensure_ascii=False))
else:
print_human_readable(report)
installed_version = report["markitdown"]["version"]
import_error = report["markitdown"]["import_error"]
if import_error is not None:
return 1
if installed_version != TARGET_VERSION and not args.allow_version_mismatch:
return 1
return 0
if __name__ == "__main__":
raise SystemExit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |