본문으로 건너뛰기
cccskills
무료GitHub에 공개

ccg-annotate

code-context-graph — annotation system. AI-driven annotation workflow, tag reference, and annotation search.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tae2089/code-context-graph스타 17(GitHub 17 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

code-context-graph — Annotation System

AI-driven annotation workflow for adding structured metadata to code. Annotations are indexed and searchable via FTS.

Subcommands

CommandDescriptionExample
annotate [file|dir]AI-generate annotations for codeccg annotate internal/analysis/
example [language]Show annotation writing exampleccg example go
tagsShow all annotation tag referenceccg tags

MCP Tools (1)

ToolDescription
get_annotationGet annotation and doc tags for a specific node

Available Tags

TagPurposeExample
@indexFile/package description@index Payment processing service
@intentWhy this function exists@intent verify credentials before session creation
@domainRuleBusiness rule@domainRule lock account after 5 failures
@sideEffectSide effects@sideEffect sends notification email
@mutatesState changes@mutates user.FailedAttempts, session.Token
@requiresPrecondition@requires user.IsActive == true
@ensuresPostcondition@ensures session != nil
@paramParameter description@param username the login ID
@returnReturn description@return JWT token on success
@seeRelated 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)

Step 3: Write annotations

  • Add annotations as comments directly above the declaration
  • Use the language's comment syntax (// for Go, # for Python, etc.)
  • Do NOT overwrite existing annotations — only add missing ones
  • Do NOT add trivial annotations (e.g., @intent returns the name for getName())

Step 4: Rebuild

Do not invoke /ccg-build automatically. Report that reindexing is pending and that the user must explicitly name ccg-build in a new request.

Annotation Quality Rules

  • @intent should describe WHY, not WHAT (not "creates user" but "register new account for onboarding flow")
  • @domainRule should be specific business logic, not generic validation
  • @sideEffect only for actual side effects (DB, network, file, notification)
  • @index should summarize the module's responsibility in one line
  • Skip getters/setters/trivial functions — annotate functions with business meaning
  • Write annotations in the same language as existing code comments (Korean if Korean, English if English)

Example Output

// @index User authentication and session management service.
package auth

// AuthenticateUser validates credentials and creates a session.
// Called from login API handler.
//
// @param username user login ID
// @param password plaintext password (hashed internally)
// @return JWT token on success
// @intent verify user identity before granting system access
// @domainRule lock account after 5 consecutive failed attempts
// @domainRule locked accounts auto-unlock after 30 minutes
// @sideEffect writes login attempt to audit_log table
// @sideEffect sends security alert email on 3rd failed attempt
// @mutates user.FailedAttempts, user.LockedUntil, user.LastLoginAt
// @requires user.IsActive == true
// @ensures err == nil implies valid JWT with 24h expiry
func AuthenticateUser(username, password string) (string, error) {

Searching Annotations

Annotations are indexed in FTS and searchable via ccg search (see /ccg skill):

  • @intent — function purpose/goal
  • @domainRule — business rules
  • @sideEffect — side effects
  • @mutates — state changes
  • @index — file/package level description

Example: user asks "결제 관련 코드" → ccg search "결제" finds functions annotated with payment-related @intent/@domainRule.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

ccg

무료

Fast read-only code discovery with a bounded code-context-graph search and targeted source verification. Use when an ordinary positive lookup or explanation needs an entry point, recorded intent, known-path inventory, or direct relationship evidence. Do not use for absence, completeness, exhaustive inventory, deep flow or impact analysis, or graph writes; use ccg-search-verify for defensible negative claims, and require explicit invocation for ccg-analyze or ccg-build.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tae2089/code-context-graph172026년 8월 22일 업데이트

Explicit-only deep analysis of algorithms, feature pipelines, and code relationships with CCG impact radius, bounded flow tracing, callers/callees, git-diff risk, affected stored flows, and cross-namespace references. Use only when the user explicitly names the ccg-analyze skill in the current request. Do not invoke merely because a task asks about a flow, pipeline, impact, caller, or relationship.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tae2089/code-context-graph172026년 8월 22일 업데이트

Author, refine, and verify CCG annotations such as @intent, @domainRule, @sideEffect, @mutates, @index, and @see. Use when adding business meaning to code, improving annotation-aware code or documentation retrieval, fixing annotation lint findings, checking supported tag syntax, or documenting operational contracts. Do not use for generated Markdown editing or annotations that merely restate symbol names.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tae2089/code-context-graph172026년 8월 22일 업데이트

ccg-build

무료

Explicit-only graph ingestion for building, updating, migrating, and postprocessing code-context-graph graphs from source visible to the CCG runtime. Use only when the user explicitly names the ccg-build skill in the current request. Do not invoke merely because a graph is missing or stale, annotations need reindexing, or another workflow would benefit from a refresh.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tae2089/code-context-graph172026년 8월 22일 업데이트

ccg-docs

무료

Generate, discover, read, and lint CCG documentation. Use when producing Markdown and Wiki snapshots, narrowing broad module questions with search, reading generated docs from configured content roots with get_doc_content, or diagnosing orphan, missing, stale, incomplete, contradiction, dead-ref, and drift findings. Do not use for direct source annotation authoring or exact call-graph analysis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tae2089/code-context-graph172026년 8월 22일 업데이트

ccg-docs

무료

code-context-graph — documentation generation, RAG indexing, and docs quality linting.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

tae2089/code-context-graph172026년 8월 22일 업데이트

tae2089의 스킬 모두 보기

이 스킬의 문제 신고