code-context-graph: Skill for Claude Code

.claude/skills/ccg-annotate/SKILL.md

ccg-annotate is a skill for Claude Code from tae2089/code-context-graph. It costs 26 tokens per session (1,179 once invoked), scanned A, original, MIT.

A tool that adds structured notes to source code and makes those notes searchable. The notes can describe a function's purpose, rules, requirements, results and side effects.

In plain words
What is it for?
It helps annotate files or directories, view examples and tag definitions, and retrieve notes for specific code elements. The annotations can be searched through full-text search.
Why use it?
It records information that is often difficult to infer from code alone, making important behaviour easier to find and understand later.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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

Reuse

Borrowing it

Nothing to install: this file belongs to tae2089/code-context-graph. 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/tae2089/code-context-graph/main/.claude/skills/ccg-annotate/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tae2089/code-context-graph

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 ccg-annotate

README.md
[![agentmods](https://agentmods.dev/badge/skills/tae2089/code-context-graph/ccg-annotate/github.svg)](https://agentmods.dev/skills/tae2089/code-context-graph/ccg-annotate)
Your own site
<a href="https://agentmods.dev/skills/tae2089/code-context-graph/ccg-annotate"><img src="https://agentmods.dev/badge/skills/tae2089/code-context-graph/ccg-annotate/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 ccg-annotate

Your own site · 80×15
<a href="https://agentmods.dev/skills/tae2089/code-context-graph/ccg-annotate"><img src="https://agentmods.dev/badge/skills/tae2089/code-context-graph/ccg-annotate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,179 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00026 $0.01179
Opus 5.5 $0.00010 $0.00472
Sonnet 5.5 $0.00005 $0.00236
Haiku 4.5 $0.00003 $0.00118

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

Security

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 1mo 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/skills/ccg-annotate/SKILL.md · 113 lines

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 (→ @index on package declaration)

Read the full file on GitHub · 113 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. 1mo ago First seen · 113 lines · 26 tokens per session scan A ef76cbf28675

Subscribe to this mod's changes

ccg-annotate is a skill published in the GitHub repository tae2089/code-context-graph (17 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 1,179 once invoked, about $0.0001 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

Other skills, from other repositories

nopua

A guidance skill for coding agents that promotes patient, thorough, self-directed work instead of fear or threats.

wuji-labs/nopua · 90 tokens

go

Use when writing, reviewing, testing, or shipping Go code and HTTP services: idioms, %w error wrapping, goroutine/context/errgroup concurrency, net/http 1.22 routing, log/slog, project layout, table-driven tests, Go hardening. NOT language-agnostic threat modeling (that is secure-coding), NOT Dockerfile/CI shipping…

ericrisco/rsc-harness · 86 tokens

paad-help

Use when the user asks which paad skills exist, what a paad skill does, which one fits their situation, or how to invoke one — including "what can paad do", "list the paad skills", "is there a paad skill for X", or a request for the arguments of a named paad skill.

Ovid/paad · 71 tokens

nopua-lite

NoPUA Lite — core wisdom in 1.5k tokens. Drives AI with trust and inner motivation instead of fear. Same Daoist philosophy, minimal footprint. For personal use and small-context models.

wuji-labs/nopua · 46 tokens

makefile

Use when creating or updating a Makefile for a project, especially when standard targets (build, test, lint, format, etc.) are missing or when modifying targets that may already be wired into other tooling. Not for debugging why a build fails.

Ovid/paad · 53 tokens

agentic-owasp

EXPERIMENTAL. Use when code needs a security review against the OWASP Top 10:2025 — access control, misconfiguration, supply chain, cryptography, injection, insecure design, authentication, integrity, logging and alerting, and mishandled exceptional conditions. Not for penetration testing a running system, not for…

Ovid/paad · 84 tokens