Borrowing it
Nothing to install: this file belongs to SundeepSuddala/mdify. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/SundeepSuddala/mdify/main/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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/sundeepsuddala/mdify/claude-md"><img src="https://agentmods.dev/badge/instructions/sundeepsuddala/mdify/claude-md.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00926 | $0.00926 |
| Opus 5.5 | $0.00370 | $0.00370 |
| Sonnet 5.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 2mo 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.
- 2mo 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.0037 per session on Opus 5.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.
mdify CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mdify CLAUDE.mdSundeepSuddala/mdify | Instructions file | 0 | 2mo ago | MIT | D | 926 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 144k | today | MIT | A | 8,130 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 150k | today | MIT | A | 4,680 | Codex, OpenCode |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 283k | today | MIT | A | 4,342 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 196k | today | MIT | A | 3,153 | GitHub Copilot |