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/dean0x/mdscript/claude-mdgit clone --depth 1 https://github.com/dean0x/mdscriptWhat 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.01581 | $0.01581 |
| Opus 5 | $0.00790 | $0.00790 |
| Sonnet 5 | $0.00316 | $0.00316 |
| Haiku 4.5 | $0.00158 | $0.00158 |
Grade A, and why
mdscript 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MDS (Markdown Script)
Composable LLM prompt template compiler. Rust core (crates/) with WASM, native Node.js (napi-rs), and native Python (PyO3) bindings, plus npm packages (packages/).
Build and test
cargo test --workspace # 590+ Rust tests
cargo fmt --all --check && cargo clippy --workspace --all-targets -- -D warnings
npm ci && npm run build -w @mdscript/mds-wasm && npm run build --workspaces --if-present
# The native addon is NOT built by `--workspaces` (its script is `build:native`, not
# `build`); needs the Rust toolchain. Without it @mdscript/mds silently falls back to WASM.
npm run build:native -w @mdscript/mds-napi
npm test --workspaces --if-present
# Python bindings (crates/mds-python) — 0 Rust tests by design; test via pytest:
python -m venv .venv && . .venv/bin/activate # maturin develop needs a venv
pip install "maturin==1.13.3" pytest mypy pyright
maturin develop -m crates/mds-python/Cargo.toml && pytest crates/mds-python/tests -q
Release
All packages ship as a single coordinated release at the same version, driven by
release.yml. Release via tag-push:
node scripts/bump-version.mjs X.Y.Z # bump all manifests + stamp CHANGELOG
# land the bump on main via PR (CI-gated), then:
git tag -a vX.Y.Z -m vX.Y.Z && git push origin vX.Y.Z
Pushing the vX.Y.Z tag triggers release.yml: build 7 native targets + WASM,
A3 name-gate, publish to crates.io and npm (with provenance), create a GitHub Release.
Run gh workflow run release.yml (no inputs) for a dry-run that validates the build +
A3 gate and publishes nothing.
See @RELEASING.md for the full runbook.
Gotchas
- Workspace panic strategy must stay
unwind— catch_unwind at the JS/Python FFI boundary requires it mds-wasm/Cargo.tomlhas explicit (non-inherited) license/repo fields because older wasm-pack parsers fail on workspace inheritance- aarch64 Linux cross-builds use system gcc (gnu) and zig (musl) instead of napi
--use-napi-crossbecause the macOS-generated lockfile doesn't resolve@napi-rs/tarlinux binaries cargo publish -p mds-cli --dry-runfails locally because mds-cli has a path+version dep on mds-core — this is expected; CI publishes mds-core firstscripts/verify-napi-names.mjs(A3 gate) is critical — if the hand-writtencrates/mds-napi/index.jsloader drifts from generated platform packages, the universal package silently fails to load native binaries at runtime- Stale
.nodefiles silently serve old behavior —crates/mds-napi/can hold multiple addon vintages (mds-napi.nodefrombuild:native, platform-suffixedmds-napi.<triple>.nodefromnapi build --platform), and the test harness loads the basemds-napi.nodeby name. After any Rust change, rebuild withnpm run build:native -w @mdscript/mds-napior the suite exercises an old binary (PF-035) NPM_CONFIG_ACCESS=publicis required for first-time publishes of scoped@mdscript/*packages with provenancedebug-panicsCargo feature must never ship enabled (all three binding crates) — it attaches raw panic payloads (may contain filesystem paths) to errorsstartup-race-probeCargo feature (mds-cli) must never ship enabled — it injects a 200 ms sleep intomds watchstartup as the positive control for the arm-before-publish ordering (#317). It is non-default, butmds-clipublishes to crates.io, socargo install mds-cli --features startup-race-probewould ship the delay to a user. It is exercised only by theWatch startup race (probe)CI job- Local WASM builds do NOT require system Binaryen — wasm-pack auto-downloads wasm-opt (v117) into its cache on first use. Install Binaryen v129+ (
brew install binaryen/apt install binaryen) only for offline builds, to override a stale wasm-opt on PATH, or to reproduce CI's exact release optimizer (the setup-wasm action pins v129) crates/mds-python(PyO3): test with pytest, notcargo test— 0 Rust tests by design ([lib] test = false).abi3-py311is always-on andextension-moduleis the default feature, socargo build/clippy/test --workspacecompile the cdylib without linking libpython; pyo3's abi3 forward-compat tolerates an olderpython3on PATH (repo default is 3.9)crates/mds-python/build.rsemits a cdylib-scoped-undefined dynamic_lookupso barecargo buildlinks the extension on macOS (Linux allows undefined cdylib symbols; maturin passes the flag itself when it builds the wheel)- Local Python dev:
maturin developneeds an active virtualenv +python3on PATH; CI has no venv so it usespip install ./crates/mds-python(the maturin PEP 517 backend). Wheels arecp311-abi3(one per platform) crates/mds-pythonis free-threading ready (frozen result classes,#[pymodule(gil_used = false)], GIL released around each compile); thecp314tfree-threaded wheel is a separate ABI and is deferred with the wheel matrix + PyPI publishing (follow-up to #132)- Source hygiene gate (#288):
node scripts/verify-no-control-bytes.mjsscans tracked source for hazardous codepoints (C0, C1, bidi, BOM). BSD grep has no-P(exits 2, empty output reads as clean) — never use grep to verify absence of control bytes; the gate uses pure Node codepoint iteration. When writing codepoints in source or docs, use numeric notation (U+202E, 0x202e) rather than\uXXXXescapes — the edit tooling decodes 4-hex\uXXXXto live bytes (PF-018). - Pre-merge check verifier (#289, PF-017): a CANCELLED GitHub Actions run reads as "not failing" to
gh pr merge --admin, which can merge an unverified head. Before any--adminmerge, runnode scripts/verify-pr-checks.mjs <pr-number>and use thegh pr merge --squash --admin --match-head-commit <sha>command it emits verbatim. This verifies all required contexts arecompleted+successand pins the SHA.
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.
- yesterday First seen · 58 lines · 1,581 tokens per session scan A 896309dbcd4f
mdscript CLAUDE.md is an instructions file published in the GitHub repository dean0x/mdscript (2 stars, last pushed 2d ago), licensed MIT. It adds 1,581 tokens to every session, about $0.0079 per session on Opus 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.
Other instructions, from other repositories
compiler-explorer AGENTS.md
Instructions for compiler-explorer/compiler-explorer, covering agents.md, build & test commands, important workflow requirements, style guidelines and architecture guidelines.
compiler-explorer copilot-instructions.md
Instructions for compiler-explorer/compiler-explorer: For each answer to the user, evaluate your level of confidence in the correctness of the answer on a scale from 1 to 10, where 1 is very uncertain and 10 is absolutely certain. If your confidence level is below 8, state so and suggest ways to verify the answer.
mq copilot-instructions.md
Instructions for harehare/mq, covering mq development guide, project overview, coding conventions, rust code conventions and commit message conventions.
mq commit.instructions.md
Instructions for harehare/mq: Use the following format for commit messages.
mq general.instructions.md
Instructions for harehare/mq, covering general coding conventions for mq, directory structure, feature requests and bug reports.
mq rust-crate.instructions.md
Instructions for harehare/mq, a project described as: A jq-like Markdown query language for command-line processing.