From oh-my-claudecode
AI-native code annotation protocol that encodes intent, risk, dependencies, constraints, and test expectations in machine-parseable comments.
How this skill is triggered — by the user, by Claude, or both
Slash command
/oh-my-claudecode:ai-commentingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create and maintain AI-native annotations so coding agents can understand intent, risk, and constraints quickly and safely.
Create and maintain AI-native annotations so coding agents can understand intent, risk, and constraints quickly and safely.
Use this skill when:
Canonical format:
/*@ai:key=value|key=value|key=value*/
Rules:
| as field separator=Core file-level fields:
risk=1-5core=<domain>deps=<A,B,C>intent=<why>test=<unit|integration|e2e|contract>Extended fields:
chain=<A->B->C>auth=<none|required|strict>security=<none|pii|payment|secret>invariant=<must_hold>sidefx=<db,cache,queue,event>perf=<budget>rollback=<strategy>risk=1: isolated local logicrisk=2: low coupling, easy rollbackrisk=3: moderate coupling or external dependencyrisk=4: critical cross-module pathrisk=5: security/payment/core-state high blast radiusEscalate by +1 if auth/session/payment/PII/secrets are touched.
Keep annotations high-signal. Avoid tagging trivial code.
/*@ai:risk=5|core=UserCRUD|intent=protect_user_consistency|deps=UserModel,AuthService,AuditService*/
/*@ai:chain=Auth->User->Permission->Audit|auth=strict|sidefx=db,event|test=integration|rollback=feature_flag*/
class UserManager {
/*@ai:risk=4|invariant=user_id_unique|security=pii|perf=p95<200ms*/
async deleteUser(userId: string) {
// ...
}
}
risk>=4 has explicit test and rollbackrisk>=4 files include file-level annotationsecurity!=none implies auth!=noneconst aiTagPattern = /\/\*@ai:([^*]+)\*\//g;
const fieldPattern = /(\w+)=([^|*]+)/g;
Return a concise markdown report:
npx claudepluginhub materialofair/oh-my-claudecodeCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.