agentgem CLAUDE.md

agentgem CLAUDE.md is an instructions file for coding agents 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

Install

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.

agentmods
npx agentmods add instructions/ninemindai/agentgem/claude-md
Clone the repo
git clone --depth 1 https://github.com/ninemindai/agentgem

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.01845 $0.01845
Opus 5 $0.00923 $0.00923
Sonnet 5 $0.00369 $0.00369
Haiku 4.5 $0.00185 $0.00185

Measured 4d ago against content hash 60f4be750f81, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (39 stars, last pushed 7d ago), licensed MIT. It adds 1,845 tokens to every session, about $0.0092 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.