Harvest

From seaworld008/Commonly-used-high-value-skills · View interactive version

Harvest is an AI agent skill from the GitHub repository seaworld008/Commonly-used-high-value-skills. Collecting GitHub PR data and generating 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.

How to use this skill

Skill file

<!--

CAPABILITIES_SUMMARY:

COLLABORATION_PATTERNS:

BIDIRECTIONAL_PARTNERS:

PROJECT_AFFINITY: Game(M) SaaS(H) E-commerce(H) Dashboard(H) Marketing(L)

-->

Harvest

Read GitHub PR history, aggregate it safely, and turn it into audience-fit reports. Harvest is read-only.

Trigger Guidance

Use Harvest when you need any of the following:

Route elsewhere when the task is primarily:

Core Contract

Boundaries

_common/ references require the separately installed upstream ecosystem. Use them only when available and selected for this task; otherwise follow host instructions and the domain workflow. Persist journals only when requested by the user or project.

Agent role boundaries -> _common/BOUNDARIES.md

Always

Ask First When Not Already Authorized

Never

Recipes

| Recipe | Subcommand | Default? | When to Use | Read First |

|--------|-----------|---------|-------------|------------|

| Weekly Report | weekly | ✓ | Weekly work report (PR aggregation and summary) | reference/report-templates.md |

| Monthly Report | monthly | | Monthly report (includes DORA metrics) | reference/report-templates.md |

| Release Notes | release | | Release notes generation (PR aggregation between tags) | reference/changelog-best-practices.md |

| Sprint Retro | retro | | Retrospective aggregation and narrative | reference/retrospective-voice.md |

| DORA Deep-Dive | dora | | DORA 5-key metric profile (3 throughput + 2 instability per DORA 2025) with 7-archetype team mapping and SPACE complement | reference/dora-metrics.md |

| OKR Linkage | okr | | PR-to-Objective mapping and KR narrative for quarterly review | reference/okr-linkage.md |

| PR Stats Deep-Dive | prstats | | Cycle time histogram, P50/P75/P90 latency, Lorenz curve, large-PR risk | reference/pr-stats-analysis.md |

Subcommand Dispatch

Parse the first token of user input.

Behavior notes per Recipe:

Report Modes

Recipes (above) select what to compute (invocation pattern triggered by the first-token subcommand). Report Modes select how to present the result (output shape and filename). The two axes are orthogonal: e.g., weekly Recipe can emit Summary or Client Report Mode; monthly Recipe can emit Summary or Quality Trends. Two pairs map 1:1 by convention — release Recipe → Release Notes Mode, retro Recipe → Retrospective Voice Mode. When the Recipe is unambiguous but the Mode is not, default to Summary and confirm audience at SURVEY.

| 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 |

Workflow

SURVEY → COLLECT → ANALYZE → REPORT → VERIFY

| Phase | Goal | Required actions Read |

|-------|------|------------------------|

| SURVEY | Lock scope | Confirm repository, period, filters, audience, and report mode reference/ |

| COLLECT | Gather data | Use gh commands with per_page=100 and --paginate, health checks, rate-limit monitoring, and cache policy appropriate to the request reference/ |

| ANALYZE | Turn raw PRs into signal | Aggregate categories, sizes, timelines, effort estimates, quality, and trends. Apply PR size benchmarks (200/400/1000 LOC thresholds) reference/ |

| REPORT | Build the artifact | Select the correct template, preserve caveats, pair quantity metrics with quality context, and keep filenames consistent reference/ |

| VERIFY | Ensure report trustworthiness | Check completeness, validate no productivity rankings leak through, note degradations, and attach next actions reference/ |

Critical Decision Rules

| Decision | Rule |

|----------|------|

| Large queries | Gate defined in Boundaries -> Ask First (>100 PRs) — about scope confirmation and report shape, not rate-limit headroom |

| Cache freshness | prefer_cache by default; force_refresh only when freshness beats API cost. Use ETags / If-Modified-Since |

| Graceful degradation | Missing fields lower report quality explicitly — never fabricate; label degraded sections |

| Work-hour calculation | Baseline formula first, refinement layers only when the audience needs them. Always ranges (e.g. 2-4h), never precise single values |

| PR size classification | Small <=200 LOC, Medium 201-400, Large 401-1000, Oversized >1000 — flag oversized with the lower-defect-detection warning |

| First response time | Flag when the median exceeds 1 business day |

| Quality metrics | Include context and actions, never vanity metrics/rankings. Combine 5 DORA metrics + Reliability with SPACE; profile via percentile bands and the 7 archetypes |

| Pickup time benchmark | Elite <6h, strong <13h; flag when the median exceeds 1 business day |

| Total cycle time benchmark | Elite <26h, good <48h; flag above 48h — the single most predictive metric for delivery throughput |

| Stacked PRs recommendation | Recommend stacked PRs when >30% of PRs consistently exceed 400 LOC — roughly 20% more throughput at ~8% smaller median size |

| Rubber-stamping | Flag low median review lead time uncorrelated with PR size |

| Release notes | Keep a Changelog categories, breaking/deprecated highlighted, automated from conventional commit types. User-focused — what users gain, not raw commit messages |

| Cycle time measurement | Start from the "ready for review" timestamp, not PR creation — draft PRs distort it. Report the 4-phase breakdown (Coding -> Pickup -> Review -> Merge) to expose where time is lost |

| AI-period comparison | Across periods with different AI adoption, note that AI inflates individual PR counts while org delivery stays flat |

| PDF export | Prefer repo scripts and ASCII fallback over brittle ad-hoc export commands |

| Pagination strategy | Always per_page=100 with gh api --paginate; cursor first<=100 for GraphQL, more point-efficient (rate-limit table -> reference/gh-commands.md). Store ETags per page, not per collection (reference/caching-strategy.md) |

Routing And Handoffs

| 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 |

Output Routing

| Signal | Approach | Primary output | Read next |

|--------|----------|----------------|-----------|

| default request | Standard Harvest workflow | analysis / recommendation | reference/ |

| complex multi-agent task | Nexus-routed execution | structured handoff | _common/BOUNDARIES.md |

| unclear request | Clarify scope and route | scoped analysis | reference/ |

Routing rules:

Output Requirements

Collaboration

Receives/Sends partners and contracts -> Routing And Handoffs table above.

Overlap Boundaries

Reference Map

| Reference | Read this when... |

|-----------|-------------------|

| reference/gh-commands.md | Exact gh commands, field lists, date filters, or aggregation snippets. |

| reference/report-templates.md | Canonical shapes for summary, detailed, individual, release-notes, or quality-trends reports. |

| reference/client-report-templates.md | Client-facing report structure, charts, tables, or HTML/PDF packaging. |

| reference/work-hours.md | Effort-estimation rules, file weights, range guidance, or LLM-assisted adjustments. |

| reference/pdf-export-guide.md | Markdown/HTML to PDF conversion, Mermaid handling, or repo export scripts. |

| reference/error-handling.md | You hit auth, rate-limit, network, API, or partial-data failures. |

| reference/caching-strategy.md | Cache TTLs, invalidation, cleanup, or cache_policy behavior. |

| reference/outbound-handoffs.md | A handoff payload for Pulse, Canvas, Zen, Sherpa, Radar, Launch, or Guardian. |

| reference/retrospective-voice.md | A human narrative layer for a sprint retrospective, release commentary, or newsletter. |

| reference/engineering-metrics-pitfalls.md | Guardrails for DORA/SPACE, vanity-metric avoidance, or burnout warnings. |

| reference/changelog-best-practices.md | Changelog/release-note category rules and audience-fit writing. |

| reference/estimation-anti-patterns.md | Caveats around LOC-based effort estimation and range reporting. |

| reference/reporting-anti-patterns.md | Report-design guardrails, actionability checks, or gaming detection. |

| reference/dora-metrics.md | DORA 5-key metric percentile bands, 7-archetype profiling, measurement-window selection, or SPACE complement for the dora recipe. |

| reference/okr-linkage.md | PR-to-Objective tagging, KR narrative templates, Objective health scoring, or quarterly aggregation for the okr recipe. |

| reference/pr-stats-analysis.md | Cycle-time decomposition, P50/P75/P90, Lorenz/Gini, bot allowlist, or large-PR risk thresholds for the prstats recipe. |

| reference/autorun-schema.md | Emitting the AUTORUN _STEP_COMPLETE block — Harvest-specific Output/Next schema. |

Operational

AUTORUN Support

See _common/AUTORUN.md for the protocol (_AGENT_CONTEXT input, mode semantics, error handling). Harvest-specific _STEP_COMPLETE.Output schema lives in reference/autorun-schema.md.

Nexus Hub Mode

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
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.