agentgem: Instructions file for Claude Code

CLAUDE.md

agentgem CLAUDE.md is an instructions file for Claude Code from ninemindai/agentgem. It costs 1,845 tokens per session, scanned A, original, MIT.

A repository instruction file for agentgem, covering how coding agents should work on the project and coordinate through Git worktrees. A worktree is a separate checkout that lets multiple tasks use the same repository without sharing files.

In plain words
What is it for?
Use it when starting parallel tasks, creating or removing worktrees, integrating changes, and following the project's pull-request and CSS rules.
Why use it?
It reduces conflicts between concurrent sessions and keeps the main branch aligned with the remote repository.

Instructions file for Claude Code

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

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is git worktree add ../agentgem-worktrees/<task> -b <task> origin/main.

Reuse

Borrowing it

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

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 agentgem CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ninemindai/agentgem/claude-md"><img src="https://agentmods.dev/badge/instructions/ninemindai/agentgem/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,845 This file is loaded in full into every session.
When invoked 1,845 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.01845 $0.01845
Opus 5.5 $0.00738 $0.00738
Sonnet 5.5 $0.00369 $0.00369
Haiku 4.5 $0.00185 $0.00185

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

Security

Grade A, and why

agentgem 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 · 126 lines

How it starts

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

CLAUDE.md

Concurrent sessions

Use git worktrees to isolate concurrent sessions. When more than one agent or session may be working in this repo at the same time, create a dedicated worktree per session instead of sharing the main checkout. Always branch off the freshly fetched origin/main, never the local main (see below):

git fetch origin
git worktree add ../agentgem-worktrees/<task> -b <task> origin/main

Always nest worktrees under the sibling agentgem-worktrees/ directory — one subdirectory per task — rather than scattering flat agentgem-<task> siblings next to the repo. Keeping them in one container makes the checkout list legible and the cleanup sweep easy. This keeps each session's branch, working tree, and build artifacts (dist/, tsconfig.tsbuildinfo) separate, avoiding cross-session interference. Remove the worktree when the work is merged or abandoned:

git worktree remove ../agentgem-worktrees/<task>

Integration: keep local main a clean mirror

Worktrees isolate each session's working tree — that part is automatic. The thing that actually bites is a divergent local main: with many concurrent worktrees, main drifts if it's committed to directly or left stale, and ends up both ahead of and behind origin/main (not fast-forwardable) — and it's often checked out in another worktree (e.g. ../agentgem-worktrees/run) you must not disturb. Keep main clean and a PR is the default integration path; a direct local merge is the exception. The PR route runs CI (test (24)) before anything lands, never touches the main checkout, and serializes safely when several sessions integrate at once — worth the round-trip as the default.

  • Never commit directly to main. Treat it as a read-only mirror of origin/main — only ever fast-forward it (git fetch && git checkout main && git merge --ff-only origin/main). Do all work on feature branches. Direct commits are what make main diverge "ahead" and stop fast-forwarding.
  • Branch off freshly-fetched origin/main, not local main, so your diff is against the real trunk.
  • Finish with a PR (default): push the branch and open a PR; let CI gate it and merge once green (gh run watch <run-id> --exit-status then gh pr merge --rebase --delete-branch). See PR lifecycle below for the gating facts and the verify-each-commit-landed check — the PR path is where the dropped-commit trap lives, so follow it.
  • Local merge (the exception) — only for a trivial change you deliberately want to skip CI/review on, and when main isn't checked out in another worktree: in the one checkout that holds main, git fetch then sync down (git merge --ff-only origin/main — local only, no push; it just advances local main up to the remote), git merge <branch> (new commits, now ahead of the remote), run tests, then push up (git push — the step that publishes to origin/main). The ff-only sync and the push move in opposite directions; only the push leaves your machine.
  • Before finishing, confirm your branch is ahead of origin/main only (not built on a stale/divergent local main).

Read the full file on GitHub · 126 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 · 126 lines · 1,845 tokens per session scan A 60f4be750f81

Subscribe to this mod's changes

agentgem CLAUDE.md is an instructions file published in the GitHub repository ninemindai/agentgem (41 stars, last pushed 27d ago), licensed MIT. It adds 1,845 tokens to every session, about $0.0074 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

agentgem CLAUDE.md compared with instructions from other repositories

agentgem CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentgem CLAUDE.mdninemindai/agentgemInstructions file4127d agoMITA1,845Claude 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