src/autoskillit/skills_extended/enrich-issues/SKILL.md
Backfill structured requirements on existing GitHub issues triaged with recipe:implementation labels. Scans candidates, skips already-enriched issues, performs codebase-grounded analysis, and appends a Requirements section in REQ-{GRP}-NNN format via gh issue edit.
npx skillsauth add talont-org/autoskillit enrich-issuesInstall 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.
Backfill ## Requirements sections on existing GitHub issues labelled
recipe:implementation. Complements prepare-issue (which enriches at creation
time) by handling the pre-existing backlog.
/autoskillit:enrich-issues [--issue N] [--batch N] [--dry-run] [--repo owner/repo]
--issue N — enrich a single issue by number--batch N — filter by batch:N label in addition to recipe:implementation--dry-run — preview generated requirements without editing issues--repo owner/repo — override the default repositoryParse ARGUMENTS for:
--issue N → set issue_number = N--batch N → set batch = N--dry-run → set dry_run = true--repo owner/repo → set repo = "owner/repo"gh auth status
Fail fast with a clear error if authentication is not available. Do not proceed past this step if auth fails.
If --repo owner/repo was provided, use it. Otherwise use gh's default repo
context:
gh repo view --json nameWithOwner -q .nameWithOwner
Single issue (--issue N):
gh issue view N --json number,title,body,labels
Wrap as a single-element list.
Batch (--batch N):
gh issue list \
--label "recipe:implementation" \
--label "batch:N" \
--json number,title,body,labels \
--limit 100
Default (no flags):
gh issue list \
--label "recipe:implementation" \
--json number,title,body,labels \
--limit 100
For each candidate issue, check whether its body already contains
## Requirements.
## Requirements: skip it, add its number to
skipped_already_enriched. Log: "Issue #N already enriched — skipping."## Requirements: add to candidates list.If no candidates remain after filtering, emit the result block immediately and exit.
Process up to 8 candidates in parallel using subagents (model: "sonnet").
For each candidate:
gh issue view N --comments --json body,comments,title,labels
Search the codebase for files, modules, and system names mentioned in the issue title and body. Verify claims against actual code before incorporating them into requirements. Do not invent codebase details.
Classify the issue into one of three categories:
Too vague — cannot extract clear acceptance criteria (e.g., "improve X", no measurable outcome, contradictory claims):
## Triage Note section to the issue body:
ENRICH_BODY_FILE="{{AUTOSKILLIT_TEMP}}/enrich-issues/enrich_{N}_$(date +%s).md"
mkdir -p "$(dirname "$ENRICH_BODY_FILE")"
gh issue view N --json body --jq '.body' > "$ENRICH_BODY_FILE"
printf '\n\n---\n\n## Triage Note\n\nThis issue needs more detail before requirements can be generated. Consider: What is the expected outcome? What signals success? If the goal is unclear, relabeling to `recipe:remediation` may be appropriate for investigation first.\n' \
>> "$ENRICH_BODY_FILE"
gh issue edit N --body-file "$ENRICH_BODY_FILE"
sleep 1
skipped_too_vague.Mixed concerns — the issue describes two or more independently-completable sub-features or mixes a bug fix with a new feature:
## Triage Note section to the issue body:
ENRICH_BODY_FILE="{{AUTOSKILLIT_TEMP}}/enrich-issues/enrich_{N}_$(date +%s).md"
mkdir -p "$(dirname "$ENRICH_BODY_FILE")"
gh issue view N --json body --jq '.body' > "$ENRICH_BODY_FILE"
printf '\n\n---\n\n## Triage Note\n\nThis issue mixes independent concerns. Consider running `/autoskillit:issue-splitter` to split it into focused sub-issues before enrichment.\n' \
>> "$ENRICH_BODY_FILE"
gh issue edit N --body-file "$ENRICH_BODY_FILE"
sleep 1
skipped_mixed_concerns.Well-defined — a single, coherent goal with extractable acceptance criteria:
Requirements are acceptance criteria, not implementation steps.
Rules:
**REQ-{GRP}-NNN:** {single-sentence condition}.
Example output structure:
## Requirements
### API Layer
The API layer exposes skill execution to MCP clients through the headless executor.
- **REQ-API-001:** The `enrich_issues` tool must accept `issue_number`, `batch`,
`dry_run`, and `repo` parameters.
- **REQ-API-002:** The tool must be gated behind `open_kitchen`.
### Data Model
...
If --dry-run: print the generated ## Requirements section to stdout. Do
not call gh issue edit. Set dry_run: true in the result.
Otherwise: append the section to the original issue body:
ts=$(date +%Y-%m-%d_%H%M%S)
EDIT_BODY_FILE="{{AUTOSKILLIT_TEMP}}/enrich-issues/edit_body_${ts}.md"
REQUIREMENTS_FILE="${EDIT_BODY_FILE%.md}_req.md"
mkdir -p "{{AUTOSKILLIT_TEMP}}/enrich-issues"
# Fetch current body immediately before editing (avoids shell interpolation):
gh issue view N --json body -q .body > "${EDIT_BODY_FILE}"
# Populate ${REQUIREMENTS_FILE} with generated requirements, then:
printf '\n\n## Requirements\n\n' >> "${EDIT_BODY_FILE}"
cat "${REQUIREMENTS_FILE}" >> "${EDIT_BODY_FILE}"
gh issue edit N --body-file "${EDIT_BODY_FILE}"
sleep 1 # Rate-limit discipline: throttle within each subagent
Always fetch the current body immediately before editing to avoid overwriting concurrent changes.
After processing all candidates, emit to stdout:
---enrich-issues-result---
{
"enriched": [{"issue_number": N, "requirements_count": M, "groups": ["GRP1", "GRP2"]}],
"skipped_already_enriched": [N, ...],
"skipped_too_vague": [N, ...],
"skipped_mixed_concerns": [N, ...],
"dry_run": true|false
}
---/enrich-issues-result---
NEVER:
## Requirements to an issue that already has one (idempotency)--body shell substitution (--body "$(...)) for gh issue edit — always write to
{{AUTOSKILLIT_TEMP}}/enrich-issues/edit_body_{timestamp}.md and use --body-filerun_in_background: true is prohibited)ALWAYS:
--dry-run: never call gh issue edit when this flag is setmodel: "sonnet" for per-issue analysis subagents---enrich-issues-result--- block as the final outputdevelopment
Generate YAML recipes for .autoskillit/recipes/. Use when user says "make script skill", "generate script", "script a workflow", "write a script", "create a script", "new recipe", "write a pipeline", or when loaded by other skills for script formatting.
data-ai
Create Uncertainty Representation visualization planning spec showing error bar definitions, distribution-aware alternatives, and multi-seed variance protocols. Statistical lens answering "How is uncertainty honestly represented?"
data-ai
Create Temporal Dynamics visualization planning spec showing axis scaling (linear vs log), smoothing disclosure, epoch/step alignment, run aggregation (mean + variance bands), early-stopping markers, and wall-clock vs step-count x-axis. Temporal lens answering "Are training dynamics shown clearly and honestly?"
data-ai
Create Narrative Story Arc visualization planning spec showing visual consistency across the report (same color = same model everywhere), logical figure progression, redundant figure detection, and narrative dependency between figures. Narrative lens answering "Do the figures tell a coherent story across the report?"