GitWand: Instructions file for Codex

AGENTS.md

GitWand AGENTS.md is an instructions file for Codex, OpenCode from devlint/GitWand. It costs 3,135 tokens per session, scanned A, original, MIT.

A set of rules for GitWand, a monorepo containing several related applications and packages in one repository.

In plain words
What is it for?
Use it when working on GitWand's desktop app, command-line tool, server, extension, or shared packages.
Why use it?
It prevents unsafe Git and file operations, such as building shell commands from unchecked user input or bypassing path checks.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions Codex.

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

Reuse

Borrowing it

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

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 GitWand AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/devlint/gitwand/agents-md"><img src="https://agentmods.dev/badge/instructions/devlint/gitwand/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,135 This file is loaded in full into every session.
When invoked 3,135 The same file — it is already loaded in full.
Security scan A 1 finding. 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.03135 $0.03135
Opus 5.5 $0.01254 $0.01254
Sonnet 5.5 $0.00627 $0.00627
Haiku 4.5 $0.00314 $0.00314

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

Security

Grade A, and why

GitWand AGENTS.md scanned grade A with 1 finding 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 23d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

introduce Node.js-only modules (e.g., `fs`, `path`, `child_process`) as
AGENTS.md · 369 lines

How it starts

The opening of the file, as written. The whole thing — 369 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — GitWand AI Agent Rules

This file is read by all AI agents (Claude, Codex, Cursor, etc.) working on this repository. Follow every rule below exactly. When in doubt, ask rather than guess.


Monorepo Structure

apps/desktop/        — Tauri 2 + Vue 3 desktop git client
packages/core/       — TypeScript conflict-resolution engine
packages/cli/        — @gitwand/cli (Node.js CLI)
packages/mcp/        — @gitwand/mcp (MCP server)
packages/vscode/     — VS Code extension
scripts/             — Maintenance scripts (bump-version.sh, etc.)

Package manager: pnpm only (never npm, never yarn).


Security — Critical Rules

No shell string interpolation in git commands

Never build git commands via string interpolation. Always pass arguments as a discrete array or use .arg() chaining.

// WRONG
Command::new("git").arg(format!("checkout {}", branch_name))

// CORRECT
Command::new("git").args(["checkout", &branch_name])

Never bypass safe_repo_path()

apps/desktop/src-tauri/src/lib.rs contains safe_repo_path() which guards against path-traversal attacks. Every file-system operation on user-supplied paths must go through this function. Do not inline your own path validation.

Never log secrets

  • API keys, tokens, and passwords must never appear in log output or in spawned process arguments.
  • Strip environment variables that carry secrets before spawning any external process. Pass only the specific env vars the child process needs.

Version Management

Never edit version files by hand

The following files are managed automatically — do not touch them directly:

  • package.json (any workspace)
  • Cargo.toml
  • apps/desktop/src-tauri/tauri.conf.json

Always use the bump script

./scripts/bump-version.sh X.Y.Z

This script aligns all version fields in one shot — desktop, core, cli, mcp, website, README, and HomeLanding.vue. It derives the current version from packages/core/package.json and replaces it everywhere.

Read the full file on GitHub · 369 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. 23d ago Changed · +40 lines · +693 tokens per session 32491e2b052c
  2. 1mo ago Changed · +12 lines · +146 tokens per session 1e4e6523fc91
  3. 2mo ago First seen · 317 lines · 2,296 tokens per session scan A 2dad406154bd

Subscribe to this mod's changes

GitWand AGENTS.md is an instructions file published in the GitHub repository devlint/GitWand (194 stars, last pushed yesterday), licensed MIT. It adds 3,135 tokens to every session, about $0.0125 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

GitWand AGENTS.md compared with instructions from other repositories

GitWand AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
GitWand AGENTS.mddevlint/GitWandInstructions file194yesterdayMITA3,135Codex, 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