/rp1-base:code-commentsfrom rp1-base
Extracts comments from code files with line numbers and context, outputting structured JSON. Supports multiple languages for comment cleanup, documentation auditing, or pattern analysis.
Ships in rp1-base. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Extract comment locations from manifest-owned code lines for analysis by the comment-cleaner agent.
Activate this skill when:
| Extension | Single-line | Multi-line |
|---|---|---|
.py, .sh, .rb, .yml, .yaml | # | N/A |
.js, .ts, .tsx, .jsx, .go, .rs, .java, .kt, .swift, .c, .cpp, .h, .hpp | // | /* */ |
.html, .xml, .vue, .svelte | N/A | <!-- --> |
.css, .scss, .less | N/A | /* */ |
.php | //, # | /* */ |
Use a generated or validated change manifest as the cleanup boundary. This skill extracts comments inside that boundary; it does not decide which files or lines are cleanup-owned.
# Required for comment-cleaner
rp1 agent-tools comment-extract manifest manifest --change-manifest .rp1/work/features/example/change-manifest-001.json --code-root .
Manifest shape:
{
"version": 1,
"source": "build",
"codeRoot": "/absolute/path/to/repo",
"files": [
{
"path": "src/auth.ts",
"ownedHunks": [{ "startLine": 20, "endLine": 28 }],
"allowedOperations": ["remove_comments"]
}
]
}
Generated manifests can come from /build, /build-fast, or
/code-clean-comments. Build workflows generate manifests from their recorded
baseline; standalone cleanup uses rp1 agent-tools change-manifest generate
with --source code-clean-comments --scope ... to convert file, directory,
git ref, git range, or existing-manifest input into the same manifest shape.
Git scopes remain available for audit/reporting use. Do not use them as a
comment-cleaner cleanup boundary. For cleanup, first generate a change manifest
and then extract with --change-manifest.
rp1 agent-tools comment-extract branch main
rp1 agent-tools comment-extract unstaged main
rp1 agent-tools comment-extract "abc123..def456" main --line-scoped
{
"success": true,
"tool": "comment-extract",
"data": {
"scope": "manifest",
"base": "manifest",
"filesScanned": 1,
"linesAdded": 11,
"lineScoped": true,
"changeManifest": ".rp1/work/features/example/change-manifest-001.json",
"comments": [
{
"file": "src/auth.py",
"line": 45,
"type": "single",
"content": "# Check if user is active",
"contextBefore": "def validate_user(user):",
"contextAfter": " if user.is_active:"
}
]
}
}
| Field | Description |
|---|---|
success | Whether extraction completed successfully |
tool | Tool name (comment-extract) |
data.scope | The extraction scope used (manifest, branch, unstaged, or commit range); only manifest is valid for cleanup |
data.base | Base branch for comparison, or manifest for manifest extraction |
data.filesScanned | Number of files processed |
data.linesAdded | Total lines added in diff, or manifest-owned line count |
data.lineScoped | Whether line-scoped filtering was applied |
data.changeManifest | Manifest path used for extraction, when applicable |
data.comments | Array of comment objects |
data.comments[].file | Relative file path |
data.comments[].line | Line number (1-indexed) |
data.comments[].type | Comment type (single or multi) |
data.comments[].content | The comment text |
data.comments[].contextBefore | Line before the comment |
data.comments[].contextAfter | Line after the comment |
The tool handles:
Error output format:
{
"success": false,
"tool": "comment-extract",
"data": {
"scope": "branch",
"base": "main",
"filesScanned": 0,
"linesAdded": 0,
"comments": []
},
"errors": [{ "message": "Not a git repository" }]
}
This skill is used by the comment-cleaner agent to:
The comment-cleaner agent should call this skill through the manifest path it
was given. It should not pass branch names, commit ranges, dirty-state labels,
or task-builder-authored hunks as cleanup authority.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (rp1-run/rp1) — no native marketplace selected
npx claudepluginhub p/rp1-run-rp1-base-plugins-base-221 skills in this plugin
/analyse-securityPerforms tracked, evidence-bounded security posture assessment for a project, sub-directory, module, concept, or feature topic with standards mapping and registered report output./artifact-templatesAgent-only canonical output templates for rp1 artifacts. Load when producing structured markdown to ensure format consistency and routing metadata./deep-researchAutonomous deep research on codebases and technical topics with structured report output via map-reduce explorer architecture./fix-mermaidValidates and repairs mermaid diagrams in markdown files. Scans for mermaid blocks, validates syntax, and auto-repairs common errors./generate-user-docsSynchronizes user-facing documentation with the current knowledge base through validate -> stale gate -> scan -> approval -> process orchestration./guideAsk about rp1 capabilities, discover skills, and get workflow guidance.Other plugins' skills for the same job