mdify CLAUDE.md

mdify CLAUDE.md is an instructions file for coding agents from SundeepSuddala/mdify. It costs 926 tokens per session, scanned D, original, MIT.

Repository instructions for mdify, a tool that converts PDF, DOCX, spreadsheet, and CSV files into compact Markdown for Claude Code to read.

In plain words
What is it for?
Use it to install, run, test, configure, or troubleshoot mdify and its file-conversion cache.
Why use it?
It helps Claude Code work with document contents in a smaller, more readable form without changing how the user opens files.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/sundeepsuddala/mdify/claude-md
Clone the repo
git clone --depth 1 https://github.com/SundeepSuddala/mdify

Wrote 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.

agentmods badge for mdify CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sundeepsuddala/mdify/claude-md.svg)](https://agentmods.dev/instructions/sundeepsuddala/mdify/claude-md)
Your own site
<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>
Per session 926 This file is loaded in full into every session.
When invoked 926 The same file — it is already loaded in full.
Security scan D 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 3d ago against content hash 0c27b29ecb52, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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
CLAUDE.md · 40 lines

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's tool_input payload. The control flow is a series of pass-through gates: missing path → not on disk → not a convertible extension → no cache key all return passThrough() (hook output permissionDecision: 'allow' with no change). On a cache hit or successful conversion it returns redirect(mdPath), which sets updatedInput.file_path so 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 in convert(). Heavy deps (pdf-parse, mammoth, xlsx) are dynamically import()ed inside their converter so server startup stays cheap. Every output gets a <!-- mdify | source: ... | ~N tokens --> header and is truncated at MAX_OUTPUT_CHARS (200k). Files over MAX_INPUT_BYTES (50 MB) are rejected by isConvertible(). CSV uses a hand-rolled quoted-field parser (parseCsvRows), not a library.

Read the full file on GitHub · 40 lines

Changes

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.

  1. 3d ago First seen · 40 lines · 926 tokens per session scan D 0c27b29ecb52

Subscribe to this mod's changes

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.

Related

Other instructions, from other repositories