implement

A code-processing command that finds @implement comments, carries out their instructions, and replaces them with normal code documentation.

In plain words
What is it for?
Processing a file or directory, applying changes described in comments, and adding language-specific documentation such as JSDoc or docstrings.
Why use it?
It turns temporary implementation notes into documentation after the requested changes have been made.

Command

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 commands/ruizrica/toolkit/implement
Clone the repo
git clone --depth 1 https://github.com/ruizrica/toolkit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 667 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 $0.00000 $0.00667
Opus 5 $0.00000 $0.00333
Sonnet 5 $0.00000 $0.00133
Haiku 4.5 $0.00000 $0.00067

Measured 2d ago against content hash 2604b958f09c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

implement 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.

docs/commands/implement.md · 125 lines

How it starts

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

/@implement

Process @implement comments in code files and convert them to documentation. This command finds implementation directives in your code, executes the requested changes, and transforms the comments into proper documentation.

Usage

/@implement [file or directory to process]

Arguments

Argument Required Default Description
path No . File or directory to process for @implement comments

How It Works

  1. Find - Locate all @implement comments in the specified path
  2. Implement - Execute the instructions in each comment
  3. Document - Convert the @implement comment to proper documentation
  4. Format - Add language-appropriate documentation (JSDoc, docstrings, etc.)

Before and After

Before

// @implement: Add email validation function

After

/**
 * Validates email format using RFC 5322 standard regex
 * @param email - The email address to validate
 * @returns true if email format is valid
 */
function validateEmail(email: string): boolean {
  const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
  return emailRegex.test(email);
}

Examples

# Process a specific file
/@implement src/utils/validation.ts

# Process an entire directory
/@implement src/utils/

# Process current directory
/@implement

Supported Comment Formats

// @implement: Description of what to implement
# @implement: Description of what to implement
/* @implement: Description of what to implement */

Documentation Formats

The command generates documentation appropriate to the language:

Language Format
TypeScript/JavaScript JSDoc/TSDoc
Python Docstrings (Google style)
Go GoDoc comments
Rust Rustdoc comments
Java Javadoc

Read the full file on GitHub · 125 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. 2d ago First seen · 125 lines · 0 tokens per session scan A 2604b958f09c

Subscribe to this mod's changes

implement is a command published in the GitHub repository ruizrica/toolkit (5 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 667 tokens. 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-31.