markit-markdown-converter
Convert files, URLs, and media to markdown using the markit-ai CLI and SDK with pluggable converters and LLM support.
What this skill does
# markit-markdown-converter
> Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection.
markit converts almost anything to markdown: PDFs, Word docs, PowerPoint, Excel, HTML, EPUB, Jupyter notebooks, RSS feeds, CSV, JSON, YAML, images (with EXIF + AI description), audio (with metadata + AI transcription), ZIP archives, URLs, Wikipedia pages, and source code files. It works as a CLI tool and as a TypeScript/Node.js library, supports pluggable converters, and integrates with OpenAI, Anthropic, and any OpenAI-compatible LLM API.
---
## Installation
```bash
# Global CLI
npm install -g markit-ai
# Or as a project dependency
npm install markit-ai
# bun add markit-ai
# pnpm add markit-ai
```
---
## CLI Quick Reference
```bash
# Convert a file
markit report.pdf
markit document.docx
markit slides.pptx
markit data.xlsx
markit notebook.ipynb
# Convert a URL
markit https://example.com/article
markit https://en.wikipedia.org/wiki/Markdown
# Convert media (requires LLM API key for AI features)
markit photo.jpg
markit recording.mp3
markit diagram.png -p "Describe the architecture and data flow"
markit receipt.jpg -p "List all line items with prices as a table"
# Output options
markit report.pdf -o report.md # Write to file
markit report.pdf -q # Raw markdown only (great for piping)
markit report.pdf --json # Structured JSON output
# Read from stdin
cat file.pdf | markit -
# Pipe output
markit report.pdf | pbcopy
markit data.xlsx -q | some-other-tool
# List supported formats
markit formats
# Configuration
markit init # Create .markit/config.json
markit config show # Show resolved config
markit config get llm.model
markit config set llm.provider anthropic
markit config set llm.model claude-haiku-4-5
# Plugins
markit plugin install npm:markit-plugin-dwg
markit plugin install git:github.com/user/markit-plugin-ocr
markit plugin install ./my-plugin.ts
markit plugin list
markit plugin remove dwg
# Agent integration
markit onboard # Adds usage instructions to CLAUDE.md
```
---
## AI / LLM Configuration
Images and audio always get free metadata extraction. AI-powered description and transcription requires an API key.
```bash
# OpenAI (default)
export OPENAI_API_KEY=sk-...
markit photo.jpg
# Anthropic
export ANTHROPIC_API_KEY=sk-ant-...
markit config set llm.provider anthropic
markit photo.jpg
# OpenAI-compatible APIs (Ollama, Groq, Together, etc.)
markit config set llm.apiBase http://localhost:11434/v1
markit config set llm.model llama3.2-vision
markit photo.jpg
```
`.markit/config.json` (created by `markit init`):
```json
{
"llm": {
"provider": "openai",
"apiBase": "https://api.openai.com/v1",
"model": "gpt-4.1-nano",
"transcriptionModel": "gpt-4o-mini-transcribe"
}
}
```
Environment variables always override config file values. Never store API keys in the config file — use env vars.
| Provider | Env Vars | Default Vision Model |
|-------------|---------------------------------------|-----------------------|
| `openai` | `OPENAI_API_KEY`, `MARKIT_API_KEY` | `gpt-4.1-nano` |
| `anthropic` | `ANTHROPIC_API_KEY`, `MARKIT_API_KEY` | `claude-haiku-4-5` |
---
## SDK Usage
### Basic File and URL Conversion
```typescript
import { Markit } from "markit-ai";
const markit = new Markit();
// Convert a file by path
const { markdown } = await markit.convertFile("report.pdf");
console.log(markdown);
// Convert a URL
const { markdown: webMd } = await markit.convertUrl("https://example.com/article");
// Convert a Buffer with explicit type hint
import { readFileSync } from "fs";
const buffer = readFileSync("document.docx");
const { markdown: docMd } = await markit.convert(buffer, { extension: ".docx" });
```
### With OpenAI for Vision + Transcription
```typescript
import OpenAI from "openai";
import { Markit } from "markit-ai";
const openai = new OpenAI(); // reads OPENAI_API_KEY from env
const markit = new Markit({
describe: async (image: Buffer, mime: string) => {
const res = await openai.chat.completions.create({
model: "gpt-4.1-nano",
messages: [
{
role: "user",
content: [
{ type: "text", text: "Describe this image in detail." },
{
type: "image_url",
image_url: {
url: `data:${mime};base64,${image.toString("base64")}`,
},
},
],
},
],
});
return res.choices[0].message.content ?? "";
},
transcribe: async (audio: Buffer, mime: string) => {
const res = await openai.audio.transcriptions.create({
model: "gpt-4o-mini-transcribe",
file: new File([audio], "audio.mp3", { type: mime }),
});
return res.text;
},
});
const { markdown } = await markit.convertFile("photo.jpg");
```
### With Anthropic for Vision
```typescript
import Anthropic from "@anthropic-ai/sdk";
import OpenAI from "openai";
import { Markit } from "markit-ai";
const anthropic = new Anthropic(); // reads ANTHROPIC_API_KEY from env
const openai = new OpenAI(); // reads OPENAI_API_KEY from env
// Mix providers: Claude for images, OpenAI Whisper for audio
const markit = new Markit({
describe: async (image: Buffer, mime: string) => {
const res = await anthropic.messages.create({
model: "claude-haiku-4-5",
max_tokens: 1024,
messages: [
{
role: "user",
content: [
{
type: "image",
source: {
type: "base64",
media_type: mime as "image/jpeg" | "image/png" | "image/gif" | "image/webp",
data: image.toString("base64"),
},
},
{ type: "text", text: "Describe this image." },
],
},
],
});
return (res.content[0] as { text: string }).text;
},
transcribe: async (audio: Buffer, mime: string) => {
const res = await openai.audio.transcriptions.create({
model: "gpt-4o-mini-transcribe",
file: new File([audio], "audio.mp3", { type: mime }),
});
return res.text;
},
});
```
### Using Built-in Providers via Config
```typescript
import { Markit, createLlmFunctions, loadConfig, loadAllPlugins } from "markit-ai";
// Reads .markit/config.json and env vars automatically
const config = loadConfig();
// Load any installed plugins
const plugins = await loadAllPlugins();
// Create instance with built-in providers + plugins
const markit = new Markit(createLlmFunctions(config), plugins);
const { markdown } = await markit.convertFile("report.pdf");
```
---
## Writing a Plugin
Plugins let you add new formats or override built-in converters. Plugin converters run before built-ins.
### Basic Converter Plugin
```typescript
// my-plugin.ts
import type { MarkitPluginAPI } from "markit-ai";
export default function (api: MarkitPluginAPI) {
api.setName("my-format");
api.setVersion("1.0.0");
api.registerConverter(
{
name: "myformat",
accepts: (info) => [".myf", ".myfmt"].includes(info.extension ?? ""),
convert: async (input: Buffer, info) => {
// info.extension, info.mimeType, info.fileName available
const text = input.toString("utf-8");
const markdown = `# Converted\n\n\`\`\`\n${text}\n\`\`\``;
return { markdown };
},
},
// Optional: declare so it appears in `markit formats`
{ name: "My Format", extensions: [".myf", ".myfmt"] },
);
}
```
### Override a Built-in Converter
```typescript
// better-pdf-plugin.ts
import type { MarkitPluginAPI } from "markit-ai";
export default function (api: MarkitPluginAPI) {
api.setName("better-pdf");
api.setVersion("1.0.0");
// Runs before built-in PDF converter, effectively replacing it
api.registerConverter({
name: "pdf",
accepts: (info) => info.extension =Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.