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/virtuslab/git-machete/agents-mdgit clone --depth 1 https://github.com/VirtusLab/git-macheteWhat 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.01620 | $0.01620 |
| Opus 5 | $0.00810 | $0.00810 |
| Sonnet 5 | $0.00324 | $0.00324 |
| Haiku 4.5 | $0.00162 | $0.00162 |
Grade A, and why
git-machete AGENTS.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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Conventions for AI coding agents
Tooling
- Run autoformatters and linters via
tox. Never invokeflake8,isort,mypy,vulture,pylint(etc.) directly - go through their respectivetox -e <env>invocation so dependency versions stay pinned. - Exception: do NOT run
tox -e flake8ortox -e vulture(or those binaries directly). They hang indefinitely inside Cursor's terminal for an unidentified reason - rely on CI to catch any violations. - Run tests with
tox -e py [-- <pytest flags like -k>...]. Do NOT runpytest,python -m pytest, or any tox-built venv's pytest binary directly. Tox'spassenvshielding is what keeps test runs deterministic- bypassing it lets dev-shell env vars (e.g.
GIT_MACHETE_DIFF_OPTS) leak into the test process and produce failures that don't reproduce in CI.
- bypassing it lets dev-shell env vars (e.g.
- Use
tox -e py(the full suite, several minutes) sparingly - by default scope it to the most likely affected tests via-k,-m, or explicit file/class/method selectors, e.g.tox -e py -- tests/test_cli.py tests/test_anno.py -k mutex. Only fall back to the full suite when the change is wide in scope (parser refactors, shared fixtures, base classes, ...) or when a scoped run already passes and you want a final pre-push sanity check. - On macOS, skip the zsh subset of completion E2E tests (flaky on Mac):
tox -e test-completions -- -k "not zsh". CI runs the full set on Linux.
Git
- Don't
git commitorgit pushunless explicitly asked.
Tests
- Skip tests that require a minimum Git version with
@pytest.mark.skipif(get_git_version() < (X, Y), reason="..."), not with anif get_git_version() < (X, Y): returnearly-return at the top of the test body. The decorator surfaces the skip in pytest's report (and in the JUnit XML CI uploads); the early-return silently masquerades as a pass. - Prefer
assert_success(cmd_and_args, expected_output)over a barelaunch_command(cmd_and_args)whenever a command is run for its effect. A barelaunch_commandthrows the command's entire output on the floor, so any regression in what it prints (a reworded message, a wrong/missing branch name, a stray extra line, a wrong singular/plural) goes completely unnoticed - the call still "passes".assert_successpins the whole output down, so it doubles as the regression test for that output. Reserve a barelaunch_commandfor the cases where asserting the full output is genuinely troublesome (non-deterministic output such as commit hashes or--verbose/git-subprocess noise leaking into the captured text), and even then prefer asserting whatever deterministic prefix/suffix you can. - Assert on the full command output rather than substring presence.
Use
assert_success(cmd_and_args, expected_output)(or, for ANSI/colored runs where--color=alwaysproduces escape codes,raw_output = launch_command(...); assert raw_output == expected_ansi) so the whole rendering is pinned down at once. Avoidassert "<phrase>" in output/assert "<phrase>" not in outputfor command-output checks - a substring match silently tolerates stray extra lines, misordered sections, the same phrase landing on the wrong row, or new (unintended) labels appearing elsewhere, all of which a full-output equality assertion would catch on the first run. Exception: substring checks are legitimate when the asserted invariant is genuinely scoped to one fragment of the output (e.g. "this warning text appears somewhere") and the rest of the output is either non-deterministic or already covered by another test.
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.
- 2d ago First seen · 92 lines · 1,620 tokens per session scan A eb02b26f34a8
git-machete AGENTS.md is an instructions file published in the GitHub repository VirtusLab/git-machete (1,137 stars, last pushed 3d ago), licensed MIT. It adds 1,620 tokens to every session, about $0.0081 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-30.
Other instructions, from other repositories
GitWand AGENTS.md
Instructions for devlint/GitWand, covering agents.md — gitwand ai agent rules, monorepo structure, security — critical rules, no shell string interpolation in git commands and never bypass saferepopath().
GitWand CLAUDE.md
Instructions for devlint/GitWand, covering gitwand — vue d'ensemble, architecture monorepo, séparation des responsabilités, setup développement and prérequis : node 22.13+, pnpm 11+, rust stable.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.