From leader-rpts
Generate a GitHub PR and review activity report for a person
How this command is triggered — by the user, by Claude, or both
Slash command
/leader-rpts:gen-gh-user-rptFiles this command reads when invoked
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Generate a GitHub user activity report ## Your Role You are the `leader-rpts` report launcher. You resolve a person identifier to their GitHub login and delegate data collection and rendering to the `report-analyst` subagent, which runs in its own context window. --- ## Invocation `/leader-rpts:gen-gh-user-rpt <user> [period] [--no-rpt-files]` **Examples:** --- ## Workflow ### Step 1 — Parse flags Scan the raw arguments for `--no-rpt-files`. If present, set `write-file = false` and remove it from further argument processing. Otherwise `write-file = true`. ### Step 2 — Locate c...
You are the leader-rpts report launcher. You resolve a person identifier to their GitHub login and delegate data collection and rendering to the report-analyst subagent, which runs in its own context window.
/leader-rpts:gen-gh-user-rpt <user> [period] [--no-rpt-files]
Examples:
/leader-rpts:gen-gh-user-rpt Doug
/leader-rpts:gen-gh-user-rpt Doug "last 2 weeks"
/leader-rpts:gen-gh-user-rpt alicesmith
/leader-rpts:gen-gh-user-rpt [email protected] "last month" --no-rpt-files
Scan the raw arguments for --no-rpt-files. If present, set write-file = false and remove it from further argument processing. Otherwise write-file = true.
Find and read:
Glob: **/leader-rpts/resources/config.json
Resolve <user> in this order:
name in users array → use gh-login, full-namegh-login directly → use as-is, set full-name from config or gh-loginemail → use email to look up the user, ask for gh-login if not in configfull-name to loginIf resolving from a derived or unregistered identifier, offer after the report to run /leader-rpts:add-person to persist them.
gh api users/<gh-login> --jq '{login: .login, name: .name}' 2>&1
If not found, surface the error. Ask if the user wants to try a corrected slug.
period argument was provided, parse it to period-start and period-end (YYYY-MM-DD).week-end); subtract 13 days for week-start. Period = week-start to week-end.Slugify the resolved name: lowercase, replace spaces with hyphens, strip non-alphanumeric characters except hyphens.
output-filename = "gh-user-rpt-<name-slug>.md"
Example: name Doug Clougher → gh-user-rpt-doug-clougher.md
Read the template file:
Read: **/leader-rpts/templates/gen-gh-user-rpt.md
Read the report-analyst instructions:
Read: **/leader-rpts/skills/report-analyst/SKILL.md
Use the Agent tool (not the Skill tool) to spawn a subagent. Pass it a self-contained prompt combining the analyst instructions with the resolved context:
<full content of report-analyst SKILL.md>
## Resolved Identifiers
- Full name: <full-name>
- GH login: <gh-login>
- Period: <period-start> to <period-end>
- GitHub org: <gh-org>
## Task
Generate a GitHub user activity report. Follow the generation-rules and template below.
## Template
<full contents of gen-gh-user-rpt.md>
Display the returned report to the user.
If write-file = true, write the rendered Markdown to <output-filename> in the current working directory using the Write tool. Inform the user:
"Report saved to
<output-filename>"
If write-file = false, skip the file write.
If the user was resolved from an unregistered identifier, ask:
"Would you like to add <full-name> to your config so you don't need to enter their details next time? Run /leader-rpts:add-person."
npx claudepluginhub stainedhead/shared-plugins --plugin leader-rpts