-
Notifications
You must be signed in to change notification settings - Fork 263
Description
Skill Overview
Four workflows perform Copilot PR analysis using an identical combination of tools: shared/copilot-pr-data-fetch.md (already shared), repo-memory with standardized config structure, github: toolsets: [default], edit:, and bash: ["*"]. The repo-memory configuration is particularly repetitive — each workflow has the same 102400 max-file-size and ["*.json", "*.jsonl", "*.csv", "*.md"] file-glob pattern. A shared base component would bundle these common elements.
Current Usage
This skill appears in the following workflows:
-
copilot-pr-nlp-analysis.md(repo-memory branch:memory/nlp-analysis) -
copilot-pr-prompt-analysis.md(repo-memory branch:memory/prompt-analysis) -
copilot-agent-analysis.md(repo-memory branch:memory/copilot-agent-analysis) -
copilot-pr-merged-report.md(importsshared/copilot-pr-data-fetch.md)
Proposed Shared Component
File: .github/workflows/shared/copilot-pr-analysis-base.md
Configuration:
---
tools:
github:
toolsets: [default]
edit:
bash: ["*"]
imports:
- shared/jqschema.md
- shared/reporting.md
- shared/copilot-pr-data-fetch.md
---Markdown body (prompt guidance):
## Copilot PR Analysis Base
Pre-fetched Copilot PR data is available at `/tmp/gh-aw/pr-data/copilot-prs.json` (last 30 days, up to 1000 PRs from `copilot/*` branches).
### Historical Data with repo-memory
Each analysis workflow should store historical results in `repo-memory` for trend tracking.
Recommended repo-memory configuration (add inline to your workflow's frontmatter):
```yaml
tools:
repo-memory:
branch-name: memory/(your-analysis-name)
description: "Historical (analysis type) results"
file-glob: ["memory/(your-analysis-name)/*.json", "memory/(your-analysis-name)/*.jsonl",
"memory/(your-analysis-name)/*.csv", "memory/(your-analysis-name)/*.md"]
max-file-size: 102400 # 100KBCommon jq Queries
# Count total PRs
jq 'length' /tmp/gh-aw/pr-data/copilot-prs.json
# PRs from last 7 days
jq '[.[] | select(.createdAt >= "'"$(date -d '7 days ago' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || date -v-7d '+%Y-%m-%dT%H:%M:%SZ')"'")]' /tmp/gh-aw/pr-data/copilot-prs.json
# Merged vs closed stats
jq 'group_by(.state) | map({state: .[0].state, count: length})' /tmp/gh-aw/pr-data/copilot-prs.json
**Usage Example**:
```yaml
imports:
- shared/copilot-pr-analysis-base.md # Replaces jqschema.md + reporting.md + copilot-pr-data-fetch.md
Impact
- Workflows affected: 4 workflows
- Lines saved: ~15–20 lines of repeated imports and tool config per workflow = ~60–80 lines total
- Maintenance benefit: When
copilot-pr-data-fetch.mdis updated, all 4 analysis workflows automatically benefit through a single import change incopilot-pr-analysis-base.md; consistent tooling across all PR analysis workflows
Implementation Plan
- Create
.github/workflows/shared/copilot-pr-analysis-base.mdwith bundled imports and prompt guidance - Update
copilot-pr-nlp-analysis.mdto use the new shared component - Update
copilot-pr-prompt-analysis.mdto use the new shared component - Update
copilot-agent-analysis.mdto use the new shared component - Update
copilot-pr-merged-report.mdto use the new shared component - Run
make recompileto regenerate all lock files - Verify all workflows compile and run correctly
Related Analysis
This recommendation comes from the Workflow Skill Extractor analysis run on 2026-02-22.
See full analysis report in the linked discussion.
Generated by Workflow Skill Extractor
- expires on Feb 24, 2026, 4:19 PM UTC