File to Markdown Converter
/install file-to-markdown
File to Markdown — Skill\r
\r
Overview\r
\r
Convert files into clean, structured, AI-ready Markdown using the markdown.new API powered by Cloudflare Workers AI toMarkdown().\r
\r
Supports 20+ formats including documents, spreadsheets, images, and structured data.\r
\r
No authentication required (500 requests/day per IP).\r
\r
---\r
\r
When to Use This Skill\r
\r Use this skill whenever you need to:\r \r
- Extract text from files for LLM processing\r
- Convert PDFs or Office files into Markdown\r
- Normalize data into structured text\r
- Process uploaded user files\r
- Scrape webpage content into Markdown\r
- Convert images into AI-generated descriptions + content\r \r Common AI workflows:\r \r
- RAG ingestion pipelines\r
- Knowledge base creation\r
- Document summarization\r
- Dataset extraction\r
- Spreadsheet analysis\r
- OCR-like extraction from images\r \r ---\r \r
Supported Formats\r
\r
Documents\r
\r
.pdf\r.docx\r.odt\r \r
Spreadsheets\r
\r
.xlsx\r.xls\r.xlsm\r.xlsb\r.et\r.ods\r.numbers\r \r
Images\r
\r
.jpg\r.jpeg\r.png\r.webp\r.svg\r \r
Text & Structured Data\r
\r
.txt\r.md\r.csv\r.json\r.xml\r.html\r.htm\r \r Notes:\r \r- Image conversion uses AI object detection + summarization.\r
- HTML URL conversion uses a web page pipeline.\r
- Uploaded HTML uses Workers AI conversion.\r \r ---\r \r
API Base URL\r
\r
https://markdown.new\r
```\r
\r
---\r
\r
## Endpoints\r
\r
### 1️⃣ Convert Remote File (Simple GET)\r
\r
Returns plain Markdown text.\r
\r
```\r
GET /:file-url\r
```\r
\r
Example:\r
\r
```bash\r
curl -s "https://markdown.new/https://example.com/report.pdf"\r
```\r
\r
---\r
\r
### 2️⃣ Convert Remote File (JSON Response)\r
\r
Returns metadata + Markdown.\r
\r
```\r
GET /:file-url?format=json\r
```\r
\r
Example:\r
\r
```bash\r
curl -s "https://markdown.new/https://example.com/report.pdf?format=json"\r
```\r
\r
---\r
\r
### 3️⃣ Convert Remote File via POST\r
\r
Use when you want structured JSON response.\r
\r
```\r
POST /\r
Content-Type: application/json\r
```\r
\r
Body:\r
\r
```json\r
{\r
"url": "https://example.com/report.pdf"\r
}\r
```\r
\r
Example:\r
\r
```bash\r
curl -s https://markdown.new/ \\r
-H "Content-Type: application/json" \\r
-d '{"url": "https://example.com/report.pdf"}'\r
```\r
\r
---\r
\r
### 4️⃣ Upload Local File\r
\r
Use when file is not publicly accessible.\r
\r
```\r
POST /convert\r
multipart/form-data\r
```\r
\r
Example:\r
\r
```bash\r
curl -s https://markdown.new/convert \\r
-F "[email protected]"\r
```\r
\r
---\r
\r
## Response Formats\r
\r
### URL Conversion Response\r
\r
```json\r
{\r
"success": true,\r
"url": "https://example.com/report.pdf",\r
"title": "Quarterly Report",\r
"content": "# Quarterly Report\
\
...",\r
"method": "Workers AI (file)",\r
"duration_ms": 1200,\r
"tokens": 850\r
}\r
```\r
\r
---\r
\r
### Upload Conversion Response\r
\r
```json\r
{\r
"success": true,\r
"data": {\r
"title": "Q4 Report",\r
"content": "# Q4 Report\
\
...",\r
"filename": "report.xlsx",\r
"file_type": ".xlsx",\r
"tokens": 1250,\r
"processing_time_ms": 320\r
}\r
}\r
```\r
\r
---\r
\r
## Best Practices for AI Agents\r
\r
### Prefer GET for Simple Workflows\r
\r
Use:\r
\r
```\r
GET /:url\r
```\r
\r
When:\r
\r
* You only need Markdown text\r
* Speed is important\r
* No metadata required\r
\r
---\r
\r
### Prefer POST for Structured Pipelines\r
\r
Use POST when:\r
\r
* Metadata is needed\r
* Token counts are required\r
* Monitoring or logging is implemented\r
* Building automation workflows\r
\r
---\r
\r
### File Upload Strategy\r
\r
Use `/convert` only if:\r
\r
* File is local\r
* File is private\r
* File requires authentication to access\r
\r
Otherwise always prefer URL conversion.\r
\r
---\r
\r
## Error Handling Strategy\r
\r
Agents should:\r
\r
1. Check `"success": true`\r
2. Retry once if network failure\r
3. Validate content length > 0\r
4. Fallback to alternate extraction if needed\r
\r
---\r
\r
## Rate Limits\r
\r
* 500 requests/day per IP without API key\r
* No signup required\r
\r
Agents should:\r
\r
* Cache results when possible\r
* Avoid duplicate conversions\r
\r
---\r
\r
## Integration Examples\r
\r
### JavaScript (Node.js)\r
\r
```js\r
const res = await fetch("https://markdown.new/", {\r
method: "POST",\r
headers: { "Content-Type": "application/json" },\r
body: JSON.stringify({\r
url: "https://example.com/file.pdf"\r
})\r
});\r
\r
const data = await res.json();\r
console.log(data.content);\r
```\r
\r
---\r
\r
### Python\r
\r
```python\r
import requests\r
\r
res = requests.post(\r
"https://markdown.new/",\r
json={"url": "https://example.com/file.pdf"}\r
)\r
\r
data = res.json()\r
print(data["content"])\r
```\r
\r
---\r
\r
## Agent Decision Tree\r
\r
If user provides:\r
\r
| Input Type | Action |\r
| --------------- | ---------------------- |\r
| Public file URL | Use GET or POST |\r
| Local file | Use POST /convert |\r
| Image | Convert then summarize |\r
| Spreadsheet | Convert then analyze |\r
| Webpage | Convert URL HTML |\r
\r
---\r
\r
## Output Expectations\r
\r
The Markdown should be:\r
\r
* Clean\r
* Structured\r
* AI-friendly\r
* Minimal noise\r
* Ready for LLM ingestion\r
\r
---\r
\r
## Limitations\r
\r
* Complex PDF layouts may lose formatting\r
* Large spreadsheets may be truncated\r
* Images rely on AI interpretation accuracy\r
* Token limits may apply\r
\r
---\r
\r
## Summary\r
\r
This skill provides a **universal file-to-Markdown conversion layer** for AI systems with:\r
\r
* No authentication\r
* Simple HTTP interface\r
* Multi-format support\r
* Structured output\r
* Fast processing\r
\r
Ideal for document ingestion, RAG pipelines, and automation agents.\r
\r
---\r
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install file-to-markdown - 安装完成后,直接呼叫该 Skill 的名称或使用
/file-to-markdown触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
File to Markdown Converter 是什么?
Convert documents, spreadsheets, images, and structured files into clean, structured Markdown optimized for AI processing without authentication. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 674 次。
如何安装 File to Markdown Converter?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install file-to-markdown」即可一键安装,无需额外配置。
File to Markdown Converter 是免费的吗?
是的,File to Markdown Converter 完全免费(开源免费),可自由下载、安装和使用。
File to Markdown Converter 支持哪些平台?
File to Markdown Converter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 File to Markdown Converter?
由 alaminrifat(@alaminrifat)开发并维护,当前版本 v1.0.0。