Skill: Common minimal permissions block
Description: A recurring permissions: block combining contents: read, issues: read, pull-requests: read (with variants adding actions: read, discussions: read, or copilot-requests: write) is duplicated verbatim across dozens of workflow frontmatter blocks.
Current usage
Across 285 workflows analyzed via /tmp/gh-aw/agent/workflow-index.json and direct frontmatter scan:
- 72 workflows use exactly
contents: read + issues: read + pull-requests: read
- 24 workflows add
actions: read
- 17 workflows add
copilot-requests: write
- Several more variants with
discussions: read
Example: .github/workflows/ab-testing-advisor.md permissions block.
Proposed shared component
shared/permissions-read-base.md (and optionally shared/permissions-read-actions.md, shared/permissions-read-copilot.md for the common variants) — imported via imports: to centralize the base read-only permission set.
Estimated impact
- 100+ workflows affected (permissions blocks appear in >100 files)
- ~4-6 lines saved per workflow => 400-600 lines total
- Maintenance benefit: a single place to update baseline least-privilege permissions when GitHub Actions permission scopes change, reducing risk of drift/inconsistency across workflows
Migration plan
- Create
shared/permissions-read-base.md with the common permissions: YAML block (contents/issues/pull-requests: read).
- Create 1-2 variant files for the
actions: read and copilot-requests: write additions, following the existing github-guard-policy.md pattern for merging frontmatter via imports.
- Update a small pilot batch (5-10) of workflows to import the new component and verify
gh aw compile produces identical resolved permissions.
- Roll out across remaining matching workflows in follow-up PRs, in batches, running
make recompile after each batch.
Example usage
imports:
- shared/permissions-read-base.md
Priority: High (70+ workflows, low extraction complexity — pure YAML merge, no logic).
Generated by 🔍 Workflow Skill Extractor · auto · 60.3 AIC · ⌖ 3.43 AIC · ⊞ 7K · ◷
Skill: Common minimal permissions block
Description: A recurring
permissions:block combiningcontents: read,issues: read,pull-requests: read(with variants addingactions: read,discussions: read, orcopilot-requests: write) is duplicated verbatim across dozens of workflow frontmatter blocks.Current usage
Across 285 workflows analyzed via
/tmp/gh-aw/agent/workflow-index.jsonand direct frontmatter scan:contents: read+issues: read+pull-requests: readactions: readcopilot-requests: writediscussions: readExample:
.github/workflows/ab-testing-advisor.mdpermissions block.Proposed shared component
shared/permissions-read-base.md(and optionallyshared/permissions-read-actions.md,shared/permissions-read-copilot.mdfor the common variants) — imported viaimports:to centralize the base read-only permission set.Estimated impact
Migration plan
shared/permissions-read-base.mdwith the commonpermissions:YAML block (contents/issues/pull-requests: read).actions: readandcopilot-requests: writeadditions, following the existinggithub-guard-policy.mdpattern for merging frontmatter via imports.gh aw compileproduces identical resolved permissions.make recompileafter each batch.Example usage
Priority: High (70+ workflows, low extraction complexity — pure YAML merge, no logic).