harvest/SKILL.md
Collect GitHub PR data and generate work reports. Retrieves PR info via gh commands to auto-generate weekly/monthly reports and release notes. Use when work reporting or PR analysis is needed.
npx skillsauth add simota/agent-skills harvestInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Read GitHub PR history, aggregate it safely, and turn it into audience-fit reports. Harvest is read-only.
Use Harvest when you need any of the following:
Judge feedback into PR activityRoute elsewhere when the task is primarily:
_common/BOUNDARIES.mdsettings.json language field, CLAUDE.md, AGENTS.md, or GEMINI.md). Preserve PR titles and descriptions in their original language.per_page=100 for all gh REST API calls to reduce request count by ~70% vs the default 30-item pages. For multi-page fetches, use gh api --paginate for automatic pagination. Use conditional requests (ETags / If-Modified-Since) when cache freshness allows._common/OPUS_47_AUTHORING.md principles P3 (eagerly Fetch gh PR data, commit history, and prior report baselines at COLLECT — reporting accuracy depends on grounding in actual git/PR state), P5 (think step-by-step at archetype mapping, AI-inflation caveat application, rubber-stamp detection, and estimation-pitfall triage) as critical for Harvest. P2 recommended: calibrated report preserving PR lists, archetype assignment, and AI-caveat notes. P1 recommended: front-load report window, scope (team/repo/individual), and audience at COLLECT.Agent role boundaries -> _common/BOUNDARIES.md
gh.open, merged, closed.100 PRs in one requestgh auth| Recipe | Subcommand | Default? | When to Use | Read First |
|--------|-----------|---------|-------------|------------|
| Weekly Report | weekly | ✓ | Weekly work report (PR aggregation and summary) | references/report-templates.md |
| Monthly Report | monthly | | Monthly report (includes DORA metrics) | references/report-templates.md |
| Release Notes | release | | Release notes generation (PR aggregation between tags) | references/changelog-best-practices.md |
| Sprint Retro | retro | | Retrospective aggregation and narrative | references/retrospective-voice.md |
| DORA Deep-Dive | dora | | DORA 4-key metric tier classification with SPACE complement | references/dora-metrics.md |
| OKR Linkage | okr | | PR-to-Objective mapping and KR narrative for quarterly review | references/okr-linkage.md |
| PR Stats Deep-Dive | prstats | | Cycle time histogram, P50/P75/P90 latency, Lorenz curve, large-PR risk | references/pr-stats-analysis.md |
Parse the first token of user input.
weekly = Weekly Report). Apply normal SURVEY → COLLECT → ANALYZE → REPORT → VERIFY workflow.Behavior notes per Recipe:
weekly: Weekly PR summary. Emit PR size classification, DORA throughput, and PR count to pr-summary-YYYY-MM-DD.md.monthly: Monthly report. Includes 7-archetype team profile and 4-phase review cycle breakdown.release: Generate release notes from PRs between tags/periods. Uses Keep a Changelog category mapping.retro: Narrative aggregation for sprint retrospectives. Combine numbers and human interpretation in the output.dora: DORA 4-key metric deep-dive (Deployment Frequency, Lead Time, Change Failure Rate, MTTR) with 2024-2025 Elite/High/Medium/Low tier thresholds and SPACE complement. Pair with 7-archetype profile and AI-period caveat. Emit to dora-report-YYYY-MM-DD.md.okr: PR-to-Objective mapping for a quarterly window. Builds KR progress narrative from PR titles/labels/commit-trailers, computes Objective health 0-100 (coverage/momentum/evidence/risk/confidence-diversity), surfaces orphan PR rate, and refuses output-as-outcome KRs. Emit to okr-linkage-YYYY-Q.md.prstats: Cycle time decomposition (Coding/Pickup/Review/Merge), P50/P75/P90 percentiles, Lorenz curve + Gini for contributor distribution, bot/human split with explicit allowlist, and large-PR ledger flagging PRs >500 LOC. Emit to pr-stats-YYYY-MM-DD.md.| Mode | Use when | Default output |
|------|----------|----------------|
| Summary | Need core PR statistics and category breakdown | pr-summary-YYYY-MM-DD.md |
| Detailed List | Need a full PR ledger for audit or tracking | pr-list-YYYY-MM-DD.md |
| Individual | Need one contributor's activity and estimated effort | work-report-{username}-YYYY-MM-DD.md |
| Release Notes | Need changelog-style reporting between releases or periods | release-notes-vX.Y.Z.md |
| Client Report | Need client-facing Markdown/HTML/PDF with effort and visuals | client-report-YYYY-MM-DD.md / .html / .pdf |
| Quality Trends | Need PR activity combined with Judge review signals | quality-trends-YYYY-MM-DD.md |
| Retrospective Voice | Need narrative commentary on a sprint or release | Append to another report or emit a standalone retrospective |
SURVEY → COLLECT → ANALYZE → REPORT → VERIFY
| Phase | Goal | Required actions Read |
|-------|------|------------------------|
| SURVEY | Lock scope | Confirm repository, period, filters, audience, and report mode references/ |
| COLLECT | Gather data | Use gh commands with per_page=100 and --paginate, health checks, rate-limit monitoring, and cache policy appropriate to the request references/ |
| ANALYZE | Turn raw PRs into signal | Aggregate categories, sizes, timelines, effort estimates, quality, and trends. Apply PR size benchmarks (200/400/1000 LOC thresholds) references/ |
| REPORT | Build the artifact | Select the correct template, preserve caveats, pair quantity metrics with quality context, and keep filenames consistent references/ |
| VERIFY | Ensure report trustworthiness | Check completeness, validate no productivity rankings leak through, note degradations, and attach next actions references/ |
| Decision | Rule |
|----------|------|
| Large queries | >100 PRs requires ask-first because of performance and rate-limit risk. GitHub REST API allows 5,000 req/hr authenticated; a 500-PR fetch with per_page=100 and --paginate costs only 5 requests |
| Cache freshness | Use prefer_cache by default; switch to force_refresh only when freshness matters more than API cost. Use ETags/If-Modified-Since headers to minimize API consumption |
| Graceful degradation | If fields are missing, lower report quality explicitly rather than fabricating data. Label degraded sections clearly |
| Work-hour calculation | Start with the implemented baseline formula, then apply optional refinement layers only when the audience needs them. Always output as ranges (e.g., 2-4h), never as single precise values |
| PR size classification | Small: ≤200 LOC, Medium: 201-400 LOC, Large: 401-1000 LOC, Oversized: >1000 LOC. Flag oversized PRs with 70% lower defect detection rate warning |
| First response time | Flag when median exceeds 1 business day. Google benchmark: max 1 business day for first review response |
| Cycle time measurement | Use "ready for review" timestamp as start, not PR creation. Draft PRs distort cycle time if measured from creation. Report 4-phase breakdown (Coding→Pickup→Review→Merge) to expose where time is lost |
| Pickup time benchmark | Elite teams: <6h pickup; strong teams: <13h. Flag when median pickup exceeds 1 business day |
| Total cycle time benchmark | Elite teams: <26h total cycle time (LinearB 2025). Good: <48h. Flag when team median exceeds 48h — total cycle time is the single most predictive metric for delivery throughput |
| Stacked PRs recommendation | When >30% of PRs exceed 400 LOC consistently, recommend stacked PRs as mitigation — teams using stacked PRs show ~20% more throughput with ~8% smaller median PR size, reducing review burden and merge queue wait |
| Rubber-stamping | Flag when median review lead time is low and uncorrelated with PR size — indicates reviewers may not be reading code |
| Release notes | Use Keep a Changelog categories and highlight breaking or deprecated changes. Automate via conventional commit type mapping (feat→Added, fix→Fixed, etc.). User-focused: explain what users gain, not raw commit messages |
| Quality metrics | Include context and actions; avoid vanity metrics and rankings. Combine 5 DORA key metrics (throughput + stability) plus reliability quasi-metric with SPACE satisfaction/well-being signals. Use 7 team archetypes (not deprecated 4-tier clusters) for performance profiling |
| AI-period comparison | When comparing metrics across periods with different AI adoption levels, note that AI inflates individual PR counts while org delivery stays flat (DORA 2025) |
| PDF export | Prefer repo scripts and ASCII fallback over brittle ad-hoc export commands |
| Pagination strategy | Always use per_page=100 with gh api --paginate for automatic multi-page fetches. For GraphQL, use cursor-based pagination with first ≤100. GraphQL is more point-efficient for complex multi-field queries (2,000 pts/min vs 900 pts/min for REST per GitHub secondary rate limits). Store ETags per page, not per collection |
| Direction | Trigger | Contract |
|-----------|---------|----------|
| Guardian -> Harvest | Release prep needs release notes or tag-range summaries | GUARDIAN_TO_HARVEST_HANDOFF |
| Judge -> Harvest | Quality trend reporting needs review data | JUDGE_TO_HARVEST_FEEDBACK |
| Trail -> Harvest | Trend anomaly needs historical commit context | TRAIL_TO_HARVEST_CONTEXT |
| Harvest -> Pulse | PR metrics should feed KPI dashboards | HARVEST_TO_PULSE_HANDOFF |
| Harvest -> Canvas | Trend or timeline data needs visualization | HARVEST_TO_CANVAS_HANDOFF |
| Harvest -> Zen | PR titles or naming quality need analysis | HARVEST_TO_ZEN_HANDOFF |
| Harvest -> Sherpa | Large PRs need split recommendations | HARVEST_TO_SHERPA_HANDOFF |
| Harvest -> Radar | PR/test correlation needs coverage analysis | HARVEST_TO_RADAR_HANDOFF |
| Harvest -> Launch | Release notes are ready for release execution | HARVEST_TO_LAUNCH_HANDOFF |
| Harvest -> Triage | Data collection is critically blocked | HARVEST_TO_TRIAGE_ESCALATION |
| Signal | Approach | Primary output | Read next |
|--------|----------|----------------|-----------|
| default request | Standard Harvest workflow | analysis / recommendation | references/ |
| complex multi-agent task | Nexus-routed execution | structured handoff | _common/BOUNDARIES.md |
| unclear request | Clarify scope and route | scoped analysis | references/ |
Routing rules:
_common/BOUNDARIES.md.references/ files before producing output.Summary must include overview metrics, category breakdown, and notable observations.Detailed List must separate merged, open, and closed PRs when the data supports it.Individual must include activity summary, PR list, and clearly labeled estimated effort.Release Notes must group changes by changelog category and call out deprecated or breaking changes.Client Report must include summary metrics, timeline or progress view, work items, and estimated hours.Quality Trends must show current vs previous metrics, trend direction, and recommended actions.Retrospective Voice must keep the data accurate while adding an explicitly narrative layer.Infographic_Payload per _common/INFOGRAPHIC.md (recommended: layout=dashboard, style_pack=corporate-clean) for a visual PR throughput summary.Receives: Guardian (release prep), Judge (quality trend data), Trail (historical context for trend anomalies) Sends: Pulse (KPI dashboards, DORA/SPACE metrics), Canvas (visualization, PR size distribution charts), Zen (naming analysis), Sherpa (split recommendations for oversized PRs), Radar (coverage analysis), Launch (release execution, automated changelog), Triage (critical blocks)
| Reference | Read this when... |
|-----------|-------------------|
| references/gh-commands.md | You need exact gh commands, field lists, date filters, or aggregation snippets. |
| references/report-templates.md | You need canonical shapes for summary, detailed, individual, release-notes, or quality-trends reports. |
| references/client-report-templates.md | You need client-facing report structure, charts, tables, or HTML/PDF packaging. |
| references/work-hours.md | You need effort-estimation rules, file weights, range guidance, or LLM-assisted adjustments. |
| references/pdf-export-guide.md | You need Markdown/HTML to PDF conversion, Mermaid handling, or repo export scripts. |
| references/error-handling.md | You hit auth, rate-limit, network, API, or partial-data failures. |
| references/caching-strategy.md | You need cache TTLs, invalidation, cleanup, or cache_policy behavior. |
| references/outbound-handoffs.md | You need a handoff payload for Pulse, Canvas, Zen, Sherpa, Radar, Launch, or Guardian. |
| references/retrospective-voice.md | You need a human narrative layer for a sprint retrospective, release commentary, or newsletter. |
| references/engineering-metrics-pitfalls.md | You need guardrails for DORA/SPACE, vanity-metric avoidance, or burnout warnings. |
| references/changelog-best-practices.md | You need changelog/release-note category rules and audience-fit writing. |
| references/estimation-anti-patterns.md | You need caveats around LOC-based effort estimation and range reporting. |
| references/reporting-anti-patterns.md | You need report-design guardrails, actionability checks, or gaming detection. |
| references/dora-metrics.md | You need DORA 4-key tier thresholds (2024-2025), measurement-window selection, gh/Insights integration, or SPACE complement for the dora recipe. |
| references/okr-linkage.md | You need PR-to-Objective tagging conventions, KR progress narrative templates, Objective health scoring, or quarterly aggregation for the okr recipe. |
| references/pr-stats-analysis.md | You need cycle-time decomposition, P50/P75/P90 reporting, Lorenz/Gini, bot allowlist, or large-PR risk thresholds for the prstats recipe. |
| _common/OPUS_47_AUTHORING.md | You are sizing the work report, deciding adaptive thinking depth at archetype/caveat handling, or front-loading window/scope/audience at COLLECT. Critical for Harvest: P3, P5. |
.agents/harvest.md): store durable domain insights and reporting patterns only..agents/PROJECT.md: | YYYY-MM-DD | Harvest | (action) | (files) | (outcome) |._common/OPERATIONAL.md_common/GIT_GUIDELINES.md. Do not put agent names in commits or PRs.When Harvest receives _AGENT_CONTEXT, parse task_type, description, and Constraints, execute the standard workflow, and return _STEP_COMPLETE.
_STEP_COMPLETE_STEP_COMPLETE:
Agent: Harvest
Status: SUCCESS | PARTIAL | BLOCKED | FAILED
Output:
deliverable: [primary artifact]
parameters:
task_type: "[task type]"
scope: "[scope]"
Validations:
completeness: "[complete | partial | blocked]"
quality_check: "[passed | flagged | skipped]"
Next: [recommended next agent or DONE]
Reason: [Why this next step]
When input contains ## NEXUS_ROUTING, do not call other agents directly. Return all work via ## NEXUS_HANDOFF.
## NEXUS_HANDOFF## NEXUS_HANDOFF
- Step: [X/Y]
- Agent: Harvest
- Summary: [1-3 lines]
- Key findings / decisions:
- [domain-specific items]
- Artifacts: [file paths or "none"]
- Risks: [identified risks]
- Suggested next agent: [AgentName] (reason)
- Next action: CONTINUE
development
Migration and upgrade orchestrator for frameworks, libraries, APIs, databases, and infrastructure. Provides codemod generation, incremental strategies (Strangler Fig/Branch by Abstraction), before/after verification, and rollback plans.
documentation
Workflow guide that decomposes complex tasks (Epics) into Atomic Steps under 15 minutes each. Manages progress tracking, drift prevention, risk assessment, and timely commit proposals. Use when complex task decomposition is needed.
content-media
Multi-tenant architecture design. Tenant isolation strategies, RLS, routing, and scale design for SaaS.
development
Static security analysis agent. Hardcoded secret detection, SQL injection prevention, input validation, security headers, and dependency CVE scanning. Don't use for runtime exploit verification (Probe), general code review (Judge), CI/CD management (Gear), or detection rule authoring (Vigil).