write-docblocks
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "write-docblocks" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-db665020bdede2421c86074077b718992124c9847dc148410d1a06428214336b. Verify the upstream source and version against https://github.com/aaddrick/claude-pipeline before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Tool to generate or supplement PHPDoc blocks when documentation coverage is low, when composer docs:coverage reports omissions, or when you need to write PHPDoc blocks in bulk across multiple files to improve documentation coverage.
Introduction source: third_party · aaddrick · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Use when documentation coverage is low, after composer docs:coverage shows gaps, or when asked to batch-write PHPDoc blocks across multiple files
- Audience
- 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
- Testing
- Not tested
Browse files
Frontmatter
name: write-docblocks
description: Use when documentation coverage is low, after composer docs:coverage shows gaps, or when asked to batch-write PHPDoc blocks across multiple filesWrite 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:missingshows many files needing docs - User requests batch PHPDoc writing
Workflow
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
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
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.
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对 PHP 项目文档覆盖率低的实际痛点,提供批量自动化 PHPDoc 编写方案
- 适用于开发团队维护代码文档,具有明确的实用价值和广泛受众
Highlights
- description 明确列出三种使用场景,覆盖合理,边界清晰,用户易于判断是否适用
Highlights
- 文档结构完整,包含流程图、执行步骤、子代理提示模板、常见错误等关键章节
- frontmatter 完整,步骤清晰,有端到端示例,符合高质量文档规范
Areas to improve
-
未显式说明错误处理机制 Reported severity: Minor
文档强调批处理和并行执行,但未显式说明当某个子代理失败时的处理策略
Recommendation: 建议在 Execution Steps 或 Common Mistakes 中补充说明:若批次中某个文件处理失败,应记录错误并继续处理其余文件,最后汇总报告失败项
Highlights
- 工具来源明确(composer、phpdoc-writer subagent、pint),参数正确
- 强调批处理机制和并行执行要点,覆盖 ANSI 码处理等关键细节,subagent 包含代码风格检查
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.