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.
npx agentmods add rules/trankhanh040147/chatgpt-mcp/code-searchgit clone --depth 1 https://github.com/trankhanh040147/chatgpt-mcpWrote 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.
[](https://agentmods.dev/rules/trankhanh040147/chatgpt-mcp/code-search)<a href="https://agentmods.dev/rules/trankhanh040147/chatgpt-mcp/code-search"><img src="https://agentmods.dev/badge/rules/trankhanh040147/chatgpt-mcp/code-search.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00601 | $0.00601 |
| Opus 5 | $0.00300 | $0.00300 |
| Sonnet 5 | $0.00120 | $0.00120 |
| Haiku 4.5 | $0.00060 | $0.00060 |
Grade A, and why
code-search 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 yesterday.
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.
How it starts
The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Discovery (chatgpt-mcp)
Extends user code-search rule. When this rule conflicts with User Rules, follow this Project Rule. Team Rules still take precedence.
GitNexus slug (required): chatgpt-mcp — every call: { repo: "chatgpt-mcp", ... }.
Edit/commit invariants (impact, detect_changes, rename) → AGENTS.md only.
Discovery flow
DISCOVERY query → context → targeted Read (start narrow; typically 1–2 ranges — not a hard limit)
EDIT GATE if changing existing symbol → impact upstream (AGENTS.md)
VERIFY exact/path-scoped Grep
Start narrow. Widen only when initial reads leave a concrete remaining question (e.g. controller → service → repository needs another range).
Quick-map (hints — not authority)
| Topic | Start symbol |
|---|---|
| MCP handoff tools | registerHandoffTools |
| Task lifecycle | TaskService |
| Native writeback v0.8 | writeResultArtifacts |
| Worker health UI/API | buildWorkerHealthRow |
| HTTP dashboard | server (src/http/api.ts) |
If context cannot resolve an entry, rediscover with query — do not assume the symbol still exists.
Prefer context on these over repo-wide handoff / task greps.
Stale / missing index
GitNexus miss alone does not imply a stale index.
If a known symbol or path is missing unexpectedly:
- Verify once with path-scoped Grep/Glob.
- If code exists but GitNexus still misses it → index suspected stale → suggest
node .gitnexus/run.cjs analyzefrom repo root. - Continue with path-scoped Grep + targeted Read.
- Suggest re-analysis once when it would materially improve further work.
Distinguish suspected stale vs confirmed unavailable (MCP down, no index).
Repo literals (grep-first OK)
Exact strings where Grep before GitNexus is correct:
handoff_*tool names, env vars (HANDOFF_*), npm scripts (test:result-artifacts)- paths:
src/mcp/tools/index.ts,.planning/active/
Anti-patterns (this repo)
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.
- yesterday First seen · 63 lines · 601 tokens per session scan A 07bca45b09e6
code-search is a cursor rule published in the GitHub repository trankhanh040147/chatgpt-mcp (0 stars, last pushed yesterday), licensed MIT. It adds 601 tokens to every session, about $0.0030 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-09-04.
Other cursor rules, from other repositories
reflection-basic
Basic reflection format for Level 2 Simple Enhancement tasks.
cursor-fable-rules
Fable coding lifecycle discipline and situational awareness for Cursor.
git-workflow
Rules for git operations, commit strategy, and GitHub CLI usage.
feedback-enhanced
Enhanced feedback mechanism with 1-hour timeout - 增强反馈机制,1小时超时.
122-swift-development
122: Swift development workflow including TDD, refactoring, and performance optimization.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.