bootstrap-issue-config
Skill313 starsChanged 5 months agoMITView on GitHub
Bootstrap the issue triage configuration for a repository by analyzing existing issues, labels, and contributors to generate `.github/issue-triage/config.json` and `.github/STAKEHOLDERS`. Use when setting up triage automation on a new or existing repository for the first time.
In this repository17 other files it gives its agents.
- create-product-specSkill
- create-tech-specSkill
- dedupe-issue-localSkill
- dedupe-issueSkill
- evaluate-auto-implement-eligibilitySkill
- implement-issueSkill
- review-pr-localSkill
- review-spec-localSkill
- review-specSkill
- security-review-prSkill
- security-review-specSkill
- triage-issue-localSkill
- triage-issueSkill
- update-dedupeSkill
- update-pr-reviewSkill
- update-triageSkill
- verify-prSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Use gh label list --repo <owner>/<repo> --limit 200 --json name,color,description to fetch all labels currently defined on the repository.
- Distinctive: line 26
If the repository has very few or no labels, seed the config with sensible defaults:
- Very specific: line 32
Use gh issue list --repo <owner>/<repo> --state all --limit 100 --json number,title,labels,createdAt to fetch recent issues.
- Distinctive: line 33
If issues use labels that are not yet captured, add them to the appropriate category.
- Very specific: line 34
Look at .github/ISSUE_TEMPLATE/ for template files — template names and labels referenced in templates can inform label discovery.
- Very specific: line 38
Read any existing .github/issue-triage/config.json.
- Very specific: line 42
Write the result to .github/issue-triage/config.json.
- Very specific: line 48
Use git log --format='%aN <%aE>' --since='6 months ago' -- <path> and gh api to identify recent contributors to major directories.
- Very specific: line 49
Read any existing .github/STAKEHOLDERS file and merge new entries rather than overwriting.
- Distinctive: line 50
Write the file using CODEOWNERS conventions:
- Distinctive: line 79
If a companion file already exists in the repo, leave it untouched.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Bootstrap issue triage configuration
Analyze the target repository and generate (or update) the issue triage configuration files used by the triage-new-issues workflow.
Outputs
This skill produces two files:
.github/issue-triage/config.json— label definitions used during triage..github/STAKEHOLDERS— CODEOWNERS-style ownership mappings from path patterns to GitHub usernames.
Workflow
1. Discover existing labels
- Use
gh label list --repo <owner>/<repo> --limit 200 --json name,color,descriptionto fetch all labels currently defined on the repository. - Classify each label into one of three categories:
- area labels — identify a component or subsystem (e.g.
area:api,area:docs). - feature labels — identify a capability or request type (e.g.
enhancement,bug,documentation). - status labels — identify workflow state (e.g.
triaged,needs-info,wontfix).
- area labels — identify a component or subsystem (e.g.
- If the repository has very few or no labels, seed the config with sensible defaults:
triaged(status),bug(feature),enhancement(feature),documentation(feature),needs-info(status),duplicate(status)repro:high,repro:medium,repro:low,repro:unknown(status)
2. Analyze recent issues
- Use
gh issue list --repo <owner>/<repo> --state all --limit 100 --json number,title,labels,createdAtto fetch recent issues. - If issues use labels that are not yet captured, add them to the appropriate category.
- Look at
.github/ISSUE_TEMPLATE/for template files — template names and labels referenced in templates can inform label discovery.
3. Generate or update config.json
- Read any existing
.github/issue-triage/config.json. - Merge newly discovered labels into the existing
labelsobject. Do not remove labels that already exist in the config — only add or update. - The config must contain only the
labelskey. Do not includestakeholdersordefault_experts. - Each label entry should have
color(6-character hex without#) anddescription(one-sentence summary). - Write the result to
.github/issue-triage/config.json. - Validate with
jq . .github/issue-triage/config.json.
4. Generate or update .github/STAKEHOLDERS
- Inspect
CODEOWNERSif it exists for initial ownership hints. - Use
git log --format='%aN <%aE>' --since='6 months ago' -- <path>andgh apito identify recent contributors to major directories. - Read any existing
.github/STAKEHOLDERSfile and merge new entries rather than overwriting. - Write the file using CODEOWNERS conventions:
# Syntax follows CODEOWNERS conventions: later rules take precedence. # NOTE: This file is advisory only — GitHub does not enforce it. # --- Section comment --- /path/pattern/ @owner1 @owner2 - Each line maps a path glob to one or more
@usernameowners.
5. Create missing labels
- For every label in the final
config.jsonthat does not already exist on the repository, create it:gh label create "<name>" --color "<color>" --description "<description>" --repo <owner>/<repo> - Skip labels that already exist (the
gh label createcommand will error on duplicates — ignore those errors).
6. Note repo-local companion skills (do not scaffold)
The reusable agent roles that support a repo-specific companion are:
.agents/skills/review-pr-local/SKILL.md.agents/skills/review-spec-local/SKILL.md.agents/skills/triage-issue-local/SKILL.md.agents/skills/dedupe-issue-local/SKILL.md
Do not create these files during bootstrap. The prompt-construction layer treats a missing companion file and a body-only frontmatter stub the same way, so there is no value in materializing an empty file during bootstrap. Each file gets created on-demand by the matching update-<agent> self-improvement loop (or by a maintainer) the first time there is evidence-backed content to add. Bootstrap only needs to ensure the directory convention is documented; the files themselves stay absent until a real rule lands.
If a companion file already exists in the repo, leave it untouched; bootstrap is additive.
7. Validate and summarize
- Re-validate
config.jsonwithjq. - Print a short summary of:
- How many labels were discovered vs. newly created.
- How many stakeholder entries were written.
- Which repo-local companion skills are already present in the repo (if any).
- Any warnings (e.g. no issues found, no CODEOWNERS file).
Idempotency
This skill is designed to be run multiple times safely. Re-running will:
- Merge new labels into the existing config without removing old ones.
- Merge new stakeholder entries without duplicating existing lines.
- Skip label creation for labels that already exist on the repository.
Assumptions
- The
ghCLI is authenticated and has access to the target repository. - The skill is run from the repository root.
- The target repository is the current working directory unless the prompt specifies otherwise.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

