git-machete: Instructions file for Codex

AGENTS.md

git-machete AGENTS.md is an instructions file for Codex, OpenCode from VirtusLab/git-machete. It costs 1,620 tokens per session, scanned A, original, MIT.

A set of working rules for AI coding agents contributing to the git-machete project. It explains which project commands to use for formatting, linting, testing, imports, and Git work.

In plain words
What is it for?
Guiding coding agents while changing git-machete: running the approved tests and checks, following import conventions, and handling its branch-layout files safely.
Why use it?
It prevents inconsistent local checks and environment-related test failures by directing agents through the project's pinned tooling. It also warns against commands that can overwrite branch-layout decisions or hang.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is VirtusLab/git-machete's own configuration. It tells Codex and OpenCode how to work on git-machete 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 git-machete configures →

About the project

git-machete is a command-line tool that organizes Git branches and helps automate rebase, merge, push, and pull workflows. It is for developers managing repositories with multiple branches, including topic branches and branches checked out for review. The catalogue instruction and skill support using its repository-organization workflow.

VirtusLab/git-machete · 1,149 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to VirtusLab/git-machete. 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/VirtusLab/git-machete/develop/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/VirtusLab/git-machete

Made for: Codex, OpenCode.

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 git-machete AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/virtuslab/git-machete/agents-md/github.svg)](https://agentmods.dev/instructions/virtuslab/git-machete/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/virtuslab/git-machete/agents-md"><img src="https://agentmods.dev/badge/instructions/virtuslab/git-machete/agents-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 git-machete AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/virtuslab/git-machete/agents-md"><img src="https://agentmods.dev/badge/instructions/virtuslab/git-machete/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,620 This file is loaded in full into every session.
When invoked 1,620 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.01620 $0.01620
Opus 5.5 $0.00648 $0.00648
Sonnet 5.5 $0.00324 $0.00324
Haiku 4.5 $0.00162 $0.00162

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

Security

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

AGENTS.md · 92 lines

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 invoke flake8, isort, mypy, vulture, pylint (etc.) directly - go through their respective tox -e <env> invocation so dependency versions stay pinned.
  • Exception: do NOT run tox -e flake8 or tox -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 run pytest, python -m pytest, or any tox-built venv's pytest binary directly. Tox's passenv shielding 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.
  • 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 commit or git push unless explicitly asked.

Tests

  • Skip tests that require a minimum Git version with @pytest.mark.skipif(get_git_version() < (X, Y), reason="..."), not with an if get_git_version() < (X, Y): return early-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 bare launch_command(cmd_and_args) whenever a command is run for its effect. A bare launch_command throws 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_success pins the whole output down, so it doubles as the regression test for that output. Reserve a bare launch_command for 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=always produces escape codes, raw_output = launch_command(...); assert raw_output == expected_ansi) so the whole rendering is pinned down at once. Avoid assert "<phrase>" in output / assert "<phrase>" not in output for 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.

Read the full file on GitHub · 92 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. 2mo ago First seen · 92 lines · 1,620 tokens per session scan A eb02b26f34a8

Subscribe to this mod's changes

git-machete AGENTS.md is an instructions file published in the GitHub repository VirtusLab/git-machete (1,149 stars, last pushed 3d ago), licensed MIT. It adds 1,620 tokens to every session, about $0.0065 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-30.

Related

git-machete AGENTS.md compared with instructions from other repositories

git-machete AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git-machete AGENTS.mdVirtusLab/git-macheteInstructions file1.1k3d agoMITA1,620Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,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