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 skills/tae2089/code-context-graph/ccg-annotatenpx skills add tae2089/code-context-graph --skill ccg-annotategit clone --depth 1 https://github.com/tae2089/code-context-graphWhat 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 | $0.00026 | $0.01179 |
| Opus 5 | $0.00013 | $0.00589 |
| Sonnet 5 | $0.00005 | $0.00236 |
| Haiku 4.5 | $0.00003 | $0.00118 |
Grade A, and why
ccg-annotate 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 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.
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 — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
code-context-graph — Annotation System
AI-driven annotation workflow for adding structured metadata to code. Annotations are indexed and searchable via FTS.
Subcommands
| Command | Description | Example |
|---|---|---|
annotate [file|dir] |
AI-generate annotations for code | ccg annotate internal/analysis/ |
example [language] |
Show annotation writing example | ccg example go |
tags |
Show all annotation tag reference | ccg tags |
MCP Tools (1)
| Tool | Description |
|---|---|
get_annotation |
Get annotation and doc tags for a specific node |
Available Tags
| Tag | Purpose | Example |
|---|---|---|
@index |
File/package description | @index Payment processing service |
@intent |
Why this function exists | @intent verify credentials before session creation |
@domainRule |
Business rule | @domainRule lock account after 5 failures |
@sideEffect |
Side effects | @sideEffect sends notification email |
@mutates |
State changes | @mutates user.FailedAttempts, session.Token |
@requires |
Precondition | @requires user.IsActive == true |
@ensures |
Postcondition | @ensures session != nil |
@param |
Parameter description | @param username the login ID |
@return |
Return description | @return JWT token on success |
@see |
Related function | @see SessionManager.Create |
AI Annotation Workflow
ccg annotate is NOT a CLI binary command — it is an AI-driven workflow executed by Claude.
When the user runs ccg annotate [file|dir], Claude should:
Step 1: Read target files
- If a file path is given, read that file
- If a directory is given, find all source files (
.go,.py,.ts,.java, etc.) - Skip test files, vendor, node_modules
Step 2: Analyze each function/class/file
For each declaration, read the code and determine:
- What it does (→ summary line above declaration)
- Why it exists (→
@intent) - Business rules it enforces (→
@domainRule) - Side effects (→
@sideEffect: DB writes, API calls, file I/O, notifications) - What state it changes (→
@mutates: fields, tables, caches) - Prerequisites (→
@requires: auth, valid input, active state) - Guarantees (→
@ensures: return conditions, post-state) - File/package purpose (→
@indexon package declaration)
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.
- 2d ago First seen · 113 lines · 26 tokens per session scan A ef76cbf28675
ccg-annotate is a skill published in the GitHub repository tae2089/code-context-graph (17 stars, last pushed 11d ago), licensed MIT. It adds 26 tokens to every session and 1,179 once invoked, about $0.0001 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.
Other skills, from other repositories
go-idioms
写 Go 时使用。地道 Go:错误处理、并发、接口的正确姿势。.
migrate-goldmark-extension-v1-to-v2
Migrate goldmark extension from goldmark v1 to v2.
use-modern-go
Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance to generated changes.
sq-actions-dependabot
Reviews and merges Dependabot pull requests for GitHub Actions (the github-actions ecosystem) that bump uses: pins in .github/workflows/. Use for Dependabot githubactions PRs (branches like dependabot/githubactions/...), not go.mod or site/ Bun PRs.
readme-generate
從原始碼分析自動生成雙語 README。當使用者請求為專案建立 README、需要從程式碼庫生成 README.md(英文)和 README.zh.md(中文)、或希望為其函式庫/套件建立一致的多語言文件時使用。.
code-review-codex
Use the external codex CLI as a second-opinion reviewer for pi-go. This skill is for read-only review and findings, not code editing. The only intended output is ./specs/issues/002-code-review-codex/PROMPT.md.