annotation-writer

annotation-writer is a skill for Claude Code, Codex from 45ck/skill-harness. It costs 29 tokens per session (762 once invoked), scanned A, original, MIT.

A coding guide for adding @spec JSDoc annotations to source files. These annotations link code or tests to specification documents so specgraph can produce evidence about implementation and verification.

In plain words
What is it for?
Use it to mark classes, functions, files, APIs, data models and tests with relationships such as @implements, @verifies, @model and @test.
Why use it?
It removes guesswork about annotation names, placement and relationships. This makes it clearer which code implements a requirement and which tests verify it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

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.

agentmods
npx agentmods add skills/45ck/skill-harness/annotation-writer
Any agent
npx skills add 45ck/skill-harness --skill annotation-writer
Clone the repo
git clone --depth 1 https://github.com/45ck/skill-harness

Made for: Claude Code, Codex.

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 annotation-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/45ck/skill-harness/annotation-writer.svg)](https://agentmods.dev/skills/45ck/skill-harness/annotation-writer)
Your own site
<a href="https://agentmods.dev/skills/45ck/skill-harness/annotation-writer"><img src="https://agentmods.dev/badge/skills/45ck/skill-harness/annotation-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 762 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00029 $0.00762
Opus 5 $0.00015 $0.00381
Sonnet 5 $0.00006 $0.00152
Haiku 4.5 $0.00003 $0.00076

Measured 5d ago against content hash fd7f919920fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

annotation-writer 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 5d 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.

packs/specgraph-skills/skills/annotation-writer/SKILL.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add @spec annotations to source files so specgraph's AnnotationProvider can scan them and produce E0 evidence.

Annotation syntax

/**
 * @spec SPEC-ID @implements ComponentName
 */

Or inline:

/** @spec SPEC-ID @implements ComponentName */

Multiple specs on one component — use separate blocks:

/** @spec AUTH-001 @implements TokenValidator */
/** @spec AUTH-002 @implements SessionStore */
export class AuthService { ... }

Relation types

Annotation Evidence relation Use when
@implements IMPLEMENTS This code directly implements the spec
@verifies VERIFIED_BY This is a test that verifies the spec
@satisfies IMPLEMENTS Alias for @implements
@model MODEL This symbol is a data model referenced by the spec
@test VERIFIED_BY This file is a test file for the spec
@api IMPLEMENTS This is an API endpoint implementing the spec

Placement rules

  1. Functions/methods — annotate the JSDoc block immediately above the function.
  2. Classes — annotate the class JSDoc block; all public methods are covered.
  3. Files — annotate the top-level export if the whole file implements one spec.
  4. Tests — use @verifies on test functions or describe blocks.

TypeScript examples

/**
 * Validates a JWT token and returns the decoded payload.
 * @spec AUTH-001 @implements TokenValidator
 */
export function validateToken(token: string): Payload { ... }

/**
 * @spec TASK-003 @verifies TodoFiltering
 */
describe('todo filters', () => { ... });

/**
 * @spec USER-002 @model UserModel
 * @spec USER-002 @api POST /users
 */
export class UserController { ... }

JavaScript (CommonJS) example

/**
 * @spec API-002 @implements RateLimiter
 */
module.exports.rateLimiter = function(req, res, next) { ... };

Multi-language support

Python, Go, Rust, Java, C#, Ruby, and most languages are supported via #, //, /* */, and """ comment styles.

Read the full file on GitHub · 100 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. 5d ago First seen · 100 lines · 29 tokens per session scan A fd7f919920fa

Subscribe to this mod's changes

annotation-writer is a skill published in the GitHub repository 45ck/skill-harness (15 stars, last pushed 2mo ago), licensed MIT. It adds 29 tokens to every session and 762 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.