{
  "markdown": "# repo-recap\n\nA Claude Code plugin that generates structured summaries of what happened in your git repository. Get a quick overview of who did what, which areas changed, and what the most active files were — all from a single slash command.\n\nWhen the [GitHub CLI (`gh`)](https://cli.github.com/) is installed and authenticated, recaps are automatically enriched with pull request data: titles, AI-summarized descriptions, labels, review status, and linked issues. Without `gh`, everything works the same — just git-only.\n\n## Installation\n\n### Clone and load\n\n```bash\ngit clone https://github.com/nikodem-wrona/repo-recap ~/.claude/plugins/repo-recap\nclaude --plugin-dir ~/.claude/plugins/repo-recap\n```\n\n### Local development\n\nIf you've cloned the repo elsewhere, point to it directly:\n\n```bash\nclaude --plugin-dir /path/to/repo-recap\n```\n\nThe `--plugin-dir` flag loads the plugin for a single session without installing it globally.\n\n## Usage\n\n```\n/recap <duration>\n```\n\nWhere `<duration>` is a number followed by a time unit:\n\n| Unit | Meaning | Example |\n|------|---------|---------|\n| `h`  | Hours   | `/recap 24h` — last 24 hours |\n| `d`  | Days    | `/recap 7d` — last 7 days |\n| `w`  | Weeks   | `/recap 2w` — last 2 weeks |\n| `m`  | Months  | `/recap 3m` — last 3 months |\n\nThe recap agent runs in the background — you can continue working while it analyzes the repository. You'll be notified when the summary is ready.\n\n## Output Format\n\nThe recap is organized in layers, from high-level overview to specific details. When GitHub PR data is available, sections are enriched with PR context and an additional Pull Requests section is included.\n\n### 1. Summary\n\nA one-line overview of total activity.\n\n```\n12 commits by 3 contributors. 45 files changed (+1,200 / -340 lines).\nMain areas: auth, API, infrastructure.\n8 pull requests merged, covering 5 linked issues. Top labels: bug, feature, security.\n```\n\nThe PR line appears only when `gh` is available and PRs were merged in the time window.\n\n### 2. By Contributor\n\nPer-person breakdown showing what each contributor worked on, with file change statistics. When PR data is available, narratives use PR titles and AI-summarized descriptions instead of raw commit messages, and a \"Also reviewed\" line lists PRs the contributor reviewed.\n\n```\n**Alice** (5 commits)\n- Refactored auth module, added unit tests\n- Files: src/auth/*.ts (8 files, +400/-120)\n- Also reviewed: #38, #41\n\n**Bob** (7 commits)\n- New API endpoints for user management, fixed rate limiter\n- Files: src/api/*.ts (6 files, +500/-80), src/middleware/rate-limiter.ts (+30/-15)\n```\n\nThis section is automatically skipped when there's only one contributor.\n\n### 3. By Area\n\nChanges grouped by directory, showing aggregate stats and who worked in each area. When PR data is available, relevant labels from PRs touching each area are shown.\n\n```\n**src/auth/** — 8 files changed (+400/-120)\n- Auth module refactor, new test coverage (Alice)\n- Labels: refactor, security\n\n**src/api/** — 6 files changed (+500/-80)\n- New user management endpoints (Bob)\n- Labels: feature\n```\n\n### 4. Pull Requests\n\n*Only shown when `gh` is available.* Lists all merged PRs in the time window with AI-summarized descriptions, labels, review status, and linked issues.\n\n```\n| PR  | Author | Summary                          | Labels   | Reviewers   | Issues   |\n|-----|--------|----------------------------------|----------|-------------|----------|\n| #42 | alice  | Refactored session token storage | security | bob ✅      | #10, #12 |\n| #41 | bob    | Added user CRUD endpoints        | feature  | alice ✅    | —        |\n```\n\nReview status: ✅ approved, 🔄 changes requested.\n\n### 5. Most Changed Files\n\nTop 10 files ranked by total churn (additions + deletions).\n\n```\n1. src/auth/session.ts (+150/-60)\n2. src/api/users/controller.ts (+120/-10)\n3. src/middleware/rate-limiter.ts (+30/-15)\n```\n\n## How It Works\n\nThe plugin has two components:\n\n1. **`/recap` skill** — A thin dispatcher that parses your duration argument (e.g., `7d` becomes `7 days ago`) and launches the recap agent in the background.\n\n2. **`recap-agent`** — A background agent that runs a series of git commands to collect commit history, contributor statistics, and file change data, then synthesizes everything into the structured summary.\n\nThe agent uses these git commands under the hood:\n- `git log` — commit messages, authors, dates\n- `git shortlog` — contributor commit counts\n- `git log --numstat` — per-file addition/deletion counts\n- `git diff --stat` — aggregate change statistics\n- `git rev-list` — finding commit ranges\n\nWhen the GitHub CLI is available, the agent also runs:\n- `gh pr list` — batch-fetch merged PRs in the time window\n- `gh pr view` — fetch linked/closing issues per PR\n\nIf `gh` is not installed or not authenticated, the recap falls back to git-only mode automatically.\n\n## Edge Cases\n\n| Scenario | Behavior |\n|----------|----------|\n| No commits in range | Suggests trying a longer duration |\n| Single contributor | Skips the \"By Contributor\" section |\n| 100+ commits | Summarizes by theme instead of listing individually |\n| Shallow clone | Works with available history, notes the limitation |\n| Not a git repo | Shows a clear error message |\n| Invalid duration format | Shows usage examples |\n| `gh` not installed | Git-only recap with a note |\n| `gh` not authenticated | Git-only recap with a note |\n| Repo not on GitHub | Git-only recap (no error) |\n| No PRs in time window | Sections render without PR enrichment |\n| 50+ merged PRs | Linked-issue fetches capped at 50 |\n\n## Plugin Structure\n\n```\nrepo-recap/\n├── .claude-plugin/\n│   └── plugin.json          # Plugin manifest\n├── skills/\n│   └── recap/\n│       └── SKILL.md         # /recap slash command\n├── agents/\n│   └── recap-agent.md       # Background analysis agent\n├── LICENSE\n└── README.md\n```\n\n## Requirements\n\n- [Claude Code](https://claude.ai/code) CLI with plugin support\n- A git repository with commit history\n- (Optional) [GitHub CLI (`gh`)](https://cli.github.com/) — for PR-enriched recaps\n\n## License\n\nMIT\n",
  "bytes": 6078,
  "sha": "7339ad614eab508a257a4ad9099a550525a602b61fd92d6c1f3dc7e8ff2a2ff5",
  "repo_slug": "nikodem-wrona/repo-recap",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_nikodem_wrona_repo_recap_repo_recap_8a7449f7/readme"
}