Extract comment locations from code files for analysis. Use when cleaning comments, auditing code documentation, or analyzing comment patterns. Supports Python, JavaScript, TypeScript, Go, Rust, Java, C/C++, Ruby, PHP, Shell scripts. Trigger terms - comments, extract comments, code comments, comment analysis, documentation audit, comment cleanup.
/plugin marketplace add rp1-run/rp1/plugin install rp1-run-rp1-base-plugins-base-2@rp1-run/rp1This skill is limited to using the following tools:
scripts/extract_comments.pyExtract comment locations from git-changed files 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 | //, # | /* */ |
# Default: files changed since branch diverged from main
python plugins/base/skills/code-comments/scripts/extract_comments.py branch main
# Only unstaged files (pre-commit use case)
python plugins/base/skills/code-comments/scripts/extract_comments.py unstaged main
{
"scope": "branch",
"base": "main",
"files_scanned": 12,
"comments": [
{
"file": "src/auth.py",
"line": 45,
"type": "single",
"content": "# Check if user is active",
"context_before": "def validate_user(user):",
"context_after": " if user.is_active:"
}
]
}
| Field | Description |
|---|---|
scope | The scope used (branch or unstaged) |
base | Base branch for comparison |
files_scanned | Number of files processed |
comments | Array of comment objects |
comments[].file | Relative file path |
comments[].line | Line number (1-indexed) |
comments[].type | Comment type (single or multi) |
comments[].content | The comment text |
comments[].context_before | Line before the comment |
comments[].context_after | Line after the comment |
The script handles:
Error output format:
{
"error": "Not a git repository",
"scope": "branch",
"base": "main",
"files_scanned": 0,
"comments": []
}
This skill is used by the comment-cleaner agent to:
Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.