Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/sundeepsuddala/mdify/claude-mdgit clone --depth 1 https://github.com/SundeepSuddala/mdifyWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/sundeepsuddala/mdify/claude-md)<a href="https://agentmods.dev/instructions/sundeepsuddala/mdify/claude-md"><img src="https://agentmods.dev/badge/instructions/sundeepsuddala/mdify/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00926 | $0.00926 |
| Opus 5 | $0.00463 | $0.00463 |
| Sonnet 5 | $0.00185 | $0.00185 |
| Haiku 4.5 | $0.00093 | $0.00093 |
Grade D, and why
mdify CLAUDE.md scanned grade D with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- **`setup.js`** — idempotent installer. Makes exactly two additive edits: registers `mcpServers.mdify` in `~/.claude.json` and appends a `PreToolUse` matcher for `Read` in `~/.claude/settings.json`. Re-running detects e Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf ~/.claude-md-cache # clear the conversion cache How it starts
The opening of the file, as written. The whole thing — 40 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this is
mdify is an MCP (stdio) server that intercepts Claude Code's Read calls via a PreToolUse hook and transparently converts PDF/DOCX/XLSX/CSV files to compact markdown before they enter the context window. The user does nothing differently — the hook fires, mdify returns a redirect to a cached .md file, and Claude reads that instead.
Commands
npm install # install deps (required before setup)
node setup.js # one-time: register MCP server + hook in ~/.claude config
node setup.js --uninstall # remove the MCP server + hook (preserves other config)
npm start # run the server manually — useful to see startup errors on stderr
npm test # run the test suite (node --test, zero deps)
node --test test/cache.test.mjs # run a single test file
rm -rf ~/.claude-md-cache # clear the conversion cache
Tests use Node's built-in runner (node:test + node:assert), no framework. Cache tests set MDIFY_CACHE_DIR to a temp dir so they never touch the real ~/.claude-md-cache. The server also logs to stderr with a [mdify] prefix when run manually.
Architecture
Three source files under src/, plus a standalone installer:
-
src/index.js— the MCP server. Exposes a single tool,convert_to_markdown, which receives the hook'stool_inputpayload. The control flow is a series of pass-through gates: missing path → not on disk → not a convertible extension → no cache key all returnpassThrough()(hook outputpermissionDecision: 'allow'with no change). On a cache hit or successful conversion it returnsredirect(mdPath), which setsupdatedInput.file_pathso Claude reads the markdown instead. Conversion errors also pass through — mdify never blocks a Read, it only ever swaps the path or leaves it alone. -
src/converter.js— pure conversion logic, one function per format (convertPdf/convertDocx/convertXlsx/convertCsv), dispatched by extension inconvert(). Heavy deps (pdf-parse,mammoth,xlsx) are dynamicallyimport()ed inside their converter so server startup stays cheap. Every output gets a<!-- mdify | source: ... | ~N tokens -->header and is truncated atMAX_OUTPUT_CHARS(200k). Files overMAX_INPUT_BYTES(50 MB) are rejected byisConvertible(). CSV uses a hand-rolled quoted-field parser (parseCsvRows), not a library.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 40 lines · 926 tokens per session scan D 0c27b29ecb52
mdify CLAUDE.md is an instructions file published in the GitHub repository SundeepSuddala/mdify (0 stars, last pushed 2mo ago), licensed MIT. It adds 926 tokens to every session, about $0.0046 per session on Opus 5. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
mcp-pandoc AGENTS.md
Instructions for vivekVells/mcp-pandoc, covering agents.md, what this is, where things are, deeper context and commands.
agentic-resume-builder CLAUDE.md
Claude Code instructions for WtotdeD/agentic-resume-builder, covering agentic-resume-builder development guidelines, what this repo is, active technologies, package manager and validation.
fcp-sheets CLAUDE.md
Instructions for os-tack/fcp-sheets, covering fcp-sheets, project overview, architecture, key patterns and commands.
paperless-ngx-mcp-server CLAUDE.md
Claude Code instructions for cbsmiley/paperless-ngx-mcp-server, covering claude.md, project overview, common commands, architecture and entry points.
hermes-procurement-pricing-mcp AGENTS.md
AGENTS.md instructions for felix-windsor/hermes-procurement-pricing-mcp, a project described as: Secure procurement quotation comparison MCP service with document parsing, mock market pricing, anomaly detection, and Telegram/Hermes integration.
mcp-svg-marp CLAUDE.md
Claude Code instructions for koppe-pan/mcp-svg-marp, covering mcp-svg-marp tool instructions, mcp tools available, 📊 convertsvgtomarp, 🔍 analyzesvg and automatic slide creation workflow.