mochify-cli: Instructions file for Claude Code

CLAUDE.md

mochify-cli CLAUDE.md is an instructions file for Claude Code from getmochify/mochify-cli. It costs 2,935 tokens per session, scanned A, original, MIT.

A repository guide for Claude Code, an AI coding assistant, in a Rust command-line tool that processes images and PDFs through an online image-processing service. It records the project's commands, structure, and development rules.

In plain words
What is it for?
It helps Claude Code work on the Rust CLI, process image or PDF files, run the MCP server, and use the project's expected test and lint commands.
Why use it?
It gives the coding assistant one place to learn how to build, run, test, format, and check the project.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is getmochify/mochify-cli's own configuration. It tells Claude Code how to work on mochify-cli itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mochify-cli configures →

Reuse

Borrowing it

Nothing to install: this file belongs to getmochify/mochify-cli. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/getmochify/mochify-cli/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/getmochify/mochify-cli

Made for: Claude Code.

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 mochify-cli CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/getmochify/mochify-cli/claude-md/github.svg)](https://agentmods.dev/instructions/getmochify/mochify-cli/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/getmochify/mochify-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/getmochify/mochify-cli/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.

agentmods 80×15 button for mochify-cli CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/getmochify/mochify-cli/claude-md"><img src="https://agentmods.dev/badge/instructions/getmochify/mochify-cli/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,935 This file is loaded in full into every session.
When invoked 2,935 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02935 $0.02935
Opus 5.5 $0.01174 $0.01174
Sonnet 5.5 $0.00587 $0.00587
Haiku 4.5 $0.00294 $0.00294

Measured 22d ago against content hash 79cd19c90324, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mochify-cli CLAUDE.md scanned grade A with 0 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 22d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 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.

Project

mochify-cli is a Rust CLI tool and MCP server that wraps the mochify.app image processing API (POST https://api.mochify.app/v1/squish). It uploads local images via multipart form and saves the processed result.

Commands

# Build
cargo build

# Build release
cargo build --release

# Check (fast, no binary output)
cargo check

# Run (process an image)
cargo run -- photo.jpg -t webp -w 800

# Ultra HDR gain map (jpg output only)
cargo run -- photo.jpg -t jpg --hdr generate

# Quality controls
cargo run -- photo.jpg -t webp -q 70
cargo run -- photo.jpg -t avif --smart-compress --optimize-for-web
cargo run -- scan.png -t webp --lossless

# Process a PDF (auto-detected by .pdf extension)
cargo run -- document.pdf --op rasterize -t png --dpi 150
cargo run -- report.pdf --op optimize -q 75 --dpi 150
cargo run -- document.pdf -p "split into pngs"   # NLP prompt path

# Build a PDF from images (--op create; images in, PDF out)
cargo run -- page-*.jpg --op create --page a4

# Run MCP server on stdio
cargo run -- serve

# Run tests
cargo test

# Run a single test
cargo test <test_name>

# Lint
cargo clippy

# Format
cargo fmt

Architecture

src/
  main.rs        Async entry point. Parses CLI args (clap), dispatches:
                   - `serve` subcommand → starts MCP server on stdio
                   - no subcommand     → calls process_files(), which routes
                     `--op create` to create_pdf() (images in, PDF out),
                     `.pdf` inputs to process_pdfs(), and images to the squish flow
  cli.rs         Clap `Args` struct and `Commands` enum (Serve subcommand)
  api.rs         `MochifyClient` + `ProcessParams` / `PdfParams` — all HTTP logic.
                   `squish()` posts an image to /v1/squish; `pdf()` posts a PDF to
                   /v1/pdf; `pdf_create()` posts images to /v1/pdf?op=create as
                   multipart. `PdfParams::for_op()` validates the op and maps the
                   generic dpi/max-width inputs onto that op's query parameters.
                   Response bytes written to disk.
  mcp/
    mod.rs       Re-exports MochifyMcp
    tools.rs     `MochifyMcp` struct implements ServerHandler via rmcp macros.
                   Exposes `squish` (mirrors ProcessParams), `pdf` (the PDF-in ops)
                   and `pdf_create` (images → PDF).

Read the full file on GitHub · 151 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. 22d ago Changed · +5 lines · +509 tokens per session 79cd19c90324
  2. 1mo ago Changed · +2 lines · +180 tokens per session ccb13a2cb7ad
  3. 1mo ago Changed · +39 lines · +1,165 tokens per session 2f805e2cae94
  4. 2mo ago First seen · 105 lines · 1,081 tokens per session scan A 342a2b9ae615

Subscribe to this mod's changes

mochify-cli CLAUDE.md is an instructions file published in the GitHub repository getmochify/mochify-cli (1 stars, last pushed 11d ago), licensed MIT. It adds 2,935 tokens to every session, about $0.0117 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

mochify-cli CLAUDE.md compared with instructions from other repositories

mochify-cli CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mochify-cli CLAUDE.mdgetmochify/mochify-cliInstructions file111d agoMITA2,935Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode