Write Docblocks logo

Write Docblocks

Community
aaddrick
write-docblocks

Use when documentation coverage is low, after composer docs:coverage shows gaps, or when asked to batch-write PHPDoc blocks across multiple files

Overview

Publisheraaddrick
Repositoryclaude-pipeline
Skill namewrite-docblocks
Stars
130
Forks
17
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by aaddrick on GitHub. Read the source before you install it.

Installation

Install the Write Docblocks AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/aaddrick/claude-pipeline/tree/main/.claude/skills/write-docblocks
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aaddrick/claude-pipeline.git /tmp/claude-pipeline
mkdir -p .claude/skills
cp -r /tmp/claude-pipeline/.claude/skills/write-docblocks .claude/skills/write-docblocks
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Write Docblocks in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Write Docblocks on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Write Docblocks is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Write Docblocks

Overview

Batch-process PHPDoc documentation gaps by running composer docs:coverage:missing and dispatching parallel phpdoc-writer subagents.

Core principle: Process files in batches of 5 subagents for efficient parallel documentation without overwhelming the system.

When to Use

  • Documentation coverage below target (80% classes, 75% methods)
  • After creating multiple new services, controllers, or models
  • When composer docs:coverage:missing shows many files needing docs
  • User requests batch PHPDoc writing

Workflow

dot
digraph write_docblocks {
    rankdir=TB;

    start [label="Run composer docs:coverage:missing" shape=box];
    parse [label="Parse output for file paths" shape=box];
    check [label="Files remaining?" shape=diamond];
    batch [label="Take next 5 files" shape=box];
    dispatch [label="Dispatch 5 phpdoc-writer\nsubagents in parallel" shape=box];
    wait [label="Wait for batch to complete" shape=box];
    done [label="Run composer docs:coverage\nto verify improvement" shape=box];

    start -> parse -> check;
    check -> batch [label="yes"];
    check -> done [label="no"];
    batch -> dispatch -> wait -> check;
}

Execution Steps

1. Get Missing Files

bash
composer docs:coverage:missing 2>&1 | sed 's/\x1b\[[0-9;]*m//g' | grep '\.php$'

This strips ANSI codes and extracts just file paths like:

Console/Commands/ProcessDataCommand.php
Http/Controllers/AuthController.php
Services/AuthService.php

2. Process in Batches of 5

For each batch of 5 files, dispatch phpdoc-writer subagents in parallel using a single message with multiple Task tool calls:

Task(subagent_type="phpdoc-writer", prompt="Write PHPDoc blocks for app/Console/Commands/ProcessDataCommand.php - read the file, understand its purpose, and add comprehensive docblocks for the class and all undocumented methods.")

Task(subagent_type="phpdoc-writer", prompt="Write PHPDoc blocks for app/Http/Controllers/OAuthController.php - read the file, understand its purpose, and add comprehensive docblocks for the class and all undocumented methods.")

// ... 3 more in same message

CRITICAL: All 5 Task calls MUST be in a single assistant message to run in parallel.

3. Wait for Batch Completion

Wait for all 5 subagents to complete before starting the next batch. This prevents resource exhaustion while maintaining parallelism.

4. Repeat Until Done

Continue processing batches until all files are documented.

5. Verify Coverage

bash
composer docs:coverage

Confirm improvement toward targets (80% classes, 75% methods).

Subagent Prompt Template

Write PHPDoc blocks for app/{PATH}

1. Read the file thoroughly to understand its purpose
2. Check what's already documented vs missing
3. Add comprehensive docblocks for:
   - Class-level documentation explaining purpose and context
   - All undocumented public methods with @param, @return, @throws
   - Protected/private methods with brief explanations
4. Follow project-specific conventions and domain terminology
5. Run pint after editing: ./vendor/bin/pint {file}

Target audience: New developer on their first day.

Common Mistakes

Dispatching sequentially: Each file one at a time wastes time. Use batches of 5 in parallel.

Not using single message: Multiple Task calls in separate messages run sequentially. Put all 5 in ONE message.

Skipping verification: Always run composer docs:coverage at the end to confirm improvement.

Forgetting pint: Subagents should run ./vendor/bin/pint after editing to maintain code style.

Frequently asked questions

What does the Write Docblocks AI skill do?

Use when documentation coverage is low, after composer docs:coverage shows gaps, or when asked to batch-write PHPDoc blocks across multiple files

Why use Write Docblocks on TypingMind?

Because you install it once and use it with any model. Write Docblocks is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Write Docblocks in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aaddrick/claude-pipeline/tree/main/.claude/skills/write-docblocks. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Write Docblocks?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Write Docblocks?

As many as you like. As long as a model supports skills, you can use Write Docblocks with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Write Docblocks AI skill free?

Yes. It is published on GitHub by aaddrick under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇