macro-engine: Instructions file for Claude Code

CLAUDE.md

macro-engine CLAUDE.md is an instructions file for Claude Code from rockitdev/macro-engine. It costs 246 tokens per session, scanned A, original, MIT.

A set of instructions for Macro Engine, a local food database and MCP server for conversational nutrition tracking. It explains the project structure, tests, data loading, stable food IDs, and rules for keeping historical records correct.

In plain words
What is it for?
Use it when changing food imports from the USDA FoodData Central database, nutrition logging, database behavior, MCP tools, or project tests.
Why use it?
It prevents changes from breaking food references or altering past nutrition logs, and keeps the server’s tool instructions clear for the AI that uses it.

Instructions file for Claude Code

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

This is rockitdev/macro-engine's own configuration. It tells Claude Code how to work on macro-engine 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 macro-engine configures →

Reuse

Borrowing it

Nothing to install: this file belongs to rockitdev/macro-engine. 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/rockitdev/macro-engine/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/rockitdev/macro-engine

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 macro-engine CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/rockitdev/macro-engine/claude-md"><img src="https://agentmods.dev/badge/instructions/rockitdev/macro-engine/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 246 This file is loaded in full into every session.
When invoked 246 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.00246 $0.00246
Opus 5.5 $0.00098 $0.00098
Sonnet 5.5 $0.00049 $0.00049
Haiku 4.5 $0.00025 $0.00025

Measured 2mo ago against content hash a124877697de, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

macro-engine 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 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.

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 · 24 lines

What it actually says

CLAUDE.md

Macro Engine: local food DB (USDA FDC) + MCP server for conversational macro tracking. See README.md for architecture and setup.

Commands

.venv/bin/python -m unittest discover tests -v     # tests (stdlib unittest only)
.venv/bin/python -m macro_engine.etl_fdc           # reload USDA data (idempotent)

Rules

  • Runtime state: ~/.local/share/macro-engine/macros.db. Never commit DBs.
  • Stdlib-only except the mcp package (server layer). Keep it that way.
  • Log rows keep denormalized macros — never "fix" history by mutating foods.
  • Food ids must stay stable across ETL re-runs (upsert on source+source_id); aliases and log history depend on it.
  • The consumer is an LLM (fleet proxy). Tool docstrings in mcp_server.py are prompt surface — keep them precise about item shapes and correction flow.
  • Daily-note/vault writes are the proxy's job (agent-fleet assistant skill), not this server's. Keep the server vault-free.
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. 2mo ago First seen · 24 lines · 246 tokens per session scan A a124877697de

Subscribe to this mod's changes

macro-engine CLAUDE.md is an instructions file published in the GitHub repository rockitdev/macro-engine (0 stars, last pushed 4d ago), licensed MIT. It adds 246 tokens to every session, about $0.0010 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

macro-engine CLAUDE.md compared with instructions from other repositories

macro-engine CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
macro-engine CLAUDE.mdrockitdev/macro-engineInstructions file04d agoMITA246Claude 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