cc-haha AGENTS.md

A set of instructions for coding agents working in the NanmiCoder/cc-haha repository. It tells them where to start, which local rules to read, and how to investigate and test changes.

In plain words
What is it for?
Use it when making repository changes so the agent checks the working state, finds the affected code and tests, reproduces bugs where possible, and keeps the change focused.
Why use it?
It gives agents a consistent way to understand the repository and helps prevent edits that ignore nearby documentation, tests, or existing user work.

Instructions file for CodexOpenCode

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/nanmicoder/cc-haha/agents-md
Clone the repo
git clone --depth 1 https://github.com/NanmiCoder/cc-haha

Made for: Codex, OpenCode.

Per session 2,255 This file is loaded in full into every session.
When invoked 2,255 The same file — it is already loaded in full.
Security scan B 1 finding. 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.02255 $0.02255
Opus 5 $0.01128 $0.01128
Sonnet 5 $0.00451 $0.00451
Haiku 4.5 $0.00226 $0.00226

Measured 2d ago against content hash 65490b3d7d30, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

cc-haha AGENTS.md scanned grade B 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 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- Treat `~/.claude/settings.json` as user-owned shared state: preserve unknown fields, merge additively, and never add a repository-owned global schema marker.
AGENTS.md · 112 lines

How it starts

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

Repository Instructions

This file is the entry point for coding agents. Keep it short: it should route an agent to the right code, tests, and deeper documentation rather than duplicate them.

Rules closer to the code take precedence. Before editing .github/, src/, desktop/, adapters/, or docs/, read the nested AGENTS.md in that directory.

Start Here

  • Run git status --short before editing. Preserve all existing user changes and never revert, restage, reformat, or overwrite unrelated work.
  • Identify the affected surface and inspect its production path, nearest tests, and existing implementation pattern before proposing a change. Check recent history when regression context matters.
  • For bugs, reproduce the failure or add a regression test that fails for the intended reason. If reproduction is impossible, state the limitation instead of guessing.
  • Define the smallest behavior change and the proof that will demonstrate it. Stop and re-scope if the diff crosses an unplanned surface, adds a dependency, or grows beyond the verified seam.
  • For broad investigation, parallel read-only subagents are encouraged. Give editing agents non-overlapping file ownership; the primary agent owns integration and final verification.
  • Tool access is capability, not authorization. Do not create/switch branches, commit, push, open or merge a PR, publish a release, change repository settings, or spend live-provider quota unless the user explicitly requests that operation.

Repository Map

  • src/: CLI, Ink UI, commands, services, tools, shared runtime utilities, and the local API/WebSocket server.
  • desktop/: React desktop UI, Electron host, native/sidecar resources, and desktop build scripts.
  • adapters/: Telegram, Feishu, WeChat, DingTalk, and shared IM adapter utilities.
  • site/: React documentation site and build tooling. docs/ and docs/en/ are its Chinese and English Markdown content sources; keep counterparts aligned when both exist.
  • .github/workflows/, scripts/pr/, and scripts/quality-gate/: CI routing and quality policy.
  • release-notes/, scripts/release.ts, and .github/workflows/release-desktop.yml: desktop release automation.

Read the full file on GitHub · 112 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. 2d ago First seen · 112 lines · 2,255 tokens per session scan B 65490b3d7d30

Subscribe to this mod's changes

cc-haha AGENTS.md is an instructions file published in the GitHub repository NanmiCoder/cc-haha (14,259 stars, last pushed today), licensed MIT. It adds 2,255 tokens to every session, about $0.0113 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.