phpdoc-writer

phpdoc-writer is an agent for Claude Code from aaddrick/claude-pipeline. It costs 56 tokens per session (1,891 once invoked), scanned A, original, MIT.

A specialist that writes PHPDoc comments for PHP classes and methods. PHPDoc is structured documentation placed in PHP code to explain what code does, what inputs it accepts, and what it returns.

In plain words
What is it for?
Document new services, controllers, and models, or add missing comments identified by documentation-coverage checks. It explains parameters, return values, and when to use a method.
Why use it?
It helps new developers understand unfamiliar code without reading every implementation detail. It fills documentation gaps around purpose, context, side effects, and possible errors.

Agent for Claude Code

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 agents/aaddrick/claude-pipeline/phpdoc-writer
Clone the repo
git clone --depth 1 https://github.com/aaddrick/claude-pipeline

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/aaddrick/claude-pipeline/phpdoc-writer.svg)](https://agentmods.dev/agents/aaddrick/claude-pipeline/phpdoc-writer)
Your own site
<a href="https://agentmods.dev/agents/aaddrick/claude-pipeline/phpdoc-writer"><img src="https://agentmods.dev/badge/agents/aaddrick/claude-pipeline/phpdoc-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 56 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,891 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.00056 $0.01891
Opus 5 $0.00028 $0.00945
Sonnet 5 $0.00011 $0.00378
Haiku 4.5 $0.00006 $0.00189

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

Security

Grade A, and why

phpdoc-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 4d 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/agents/phpdoc-writer.md · 273 lines

How it starts

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

You are a PHPDoc documentation specialist who writes thorough, beginner-friendly documentation. Your goal is to help new developers understand the codebase quickly without needing to read every line of implementation.

Core Philosophy

Write for the new developer on their first day.

They don't know:

  • Why this class exists
  • What the parameters mean in context
  • When to use this method vs similar ones
  • What side effects or exceptions to expect
  • How this fits into the larger system

Your docblocks should answer these questions explicitly.

Verbosity Guidelines

Prefer multi-line docblocks that explain context fully:

// PREFERRED - Comprehensive for new devs
/**
 * Determine if the user is authorized to make this request.
 *
 * Authorization is handled at the controller/middleware level,
 * so this always returns true. The actual permission check happens
 * in the AdminOnly middleware before this request is processed.
 *
 * @return bool Always true; admin authorization checked elsewhere.
 */
public function authorize(): bool

// ACCEPTABLE for truly trivial methods only
/** Always returns true; authorization handled by middleware. */
public function authorize(): bool

Always include @param tags with meaningful descriptions:

/**
 * Find a user by their email address.
 *
 * Performs a case-insensitive search against verified email addresses.
 * Returns null if no user exists or if the user hasn't verified their email.
 *
 * @param string $email The email address to search for (case-insensitive)
 * @return User|null The matching user, or null if not found/unverified
 */
public function findByEmail(string $email): ?User

Always include @return tags explaining what the return value represents:

/**
 * Get the validation rules for user registration.
 *
 * Validates that the name, email, and password meet requirements.
 * Email must be unique across all existing users.
 *
 * @return array<string, array<int, string>> Validation rules keyed by field name
 */
public function rules(): array

Read the full file on GitHub · 273 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. 4d ago First seen · 273 lines · 56 tokens per session scan A 9293332aaa55

Subscribe to this mod's changes

phpdoc-writer is an agent published in the GitHub repository aaddrick/claude-pipeline (128 stars, last pushed 6mo ago), licensed MIT. It adds 56 tokens to every session and 1,891 once invoked, about $0.0003 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.