/ai-native-toolkit:refine [issue-number] (optional - one open issue; default: every open issue)from ai-native-toolkit
Runs backlog refinement checks on GitHub issues: validates against definition of ready, proposes labels/sizes/blocked-by edges, and researches judgement items. Read-only until user confirms each write.
Ships in ai-native-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Runs the refiner's checks from the command line: the same deterministic script, readiness rules and guarded write scripts as the refiner workflows (.github/workflows/reusable-refine-*.yml, relative to the plugin root), with you in place of the scheduled run. Adoption of the workflows in another repository: docs/refine.md.
Read-only by default. Every step reads, or writes to a scratch directory. A change to the issue tracker (a label, a size marker, a blocked-by edge, a duplicate close, a comment) happens only after you confirm that one change, and then goes through the write script that enforces the refiner's rules. A refusal from a script is final: report it, never route around it.
This skill runs no subagent; it is a pure orchestrator over gh and the scripts in ${CLAUDE_SKILL_DIR}/scripts.
Windows: run the bash blocks in Git Bash, which ships with Git for Windows; installs and PATH notes are in the Windows setup guide. The scripts need Python 3.8 or newer as python3, and gh signed in to the repository's host.
Readiness is the definition of ready (docs/contributing/definition-of-ready.md in the current repository, or the toolkit's copy when the repository has none): the six sections, the checklist, the size limit and the needs-triage and agent-ready labels. The judgement items follow the /issues triage (skills/issues/SKILL.md, Triage Mode):
path:line finding, not asked. Only intent, priority and product direction go to you.refine.py reports both.max_points from the definition (8 by default); a larger issue is ready only as a decomposed parent.ISSUE="$ARGUMENTS" # empty, or one open issue number
if [ -n "$ISSUE" ] && ! printf '%s' "$ISSUE" | grep -qE '^[0-9]+$'; then echo "usage: /refine [issue-number]"; exit 2; fi
S="${CLAUDE_SKILL_DIR}/scripts"
REPO=$(gh repo view --json nameWithOwner | jq -r .nameWithOwner | tr -d '\r')
WORK=$(mktemp -d); echo "WORK=$WORK" # note the path: shell variables do not survive between Bash calls
python3 "$S/refine.py" --repo "$REPO" ${ISSUE:+--issue "$ISSUE"} --out "$WORK/verdict.json"
Exit 2 is a usage or definition error (or the issue is not open); exit 3 is a failed or refused gh read. Report either and stop.
The verdict ($S/refine-output.schema.json is its shape) gives each issue a verdict: ready and not_ready are settled by the script, needs_judgement items are left for Step 3. It also carries exact and near duplicate pairs, the ready-buffer depth against its target, and the critical path.
One table, sorted by verdict then number:
| Issue | Title | Verdict | Size | Why |
|---|
Under it, the exact duplicate pairs with closable: true, the near pairs (never closed), the buffer depth and target, the critical path, and open_truncated when the open-issue listing reached its 1000-issue cap. With --issue, show that one issue's checklist item by item instead.
For each needs_judgement issue (with an issue number given, only that one), follow the steps in ${CLAUDE_SKILL_DIR}/commands/triage-issue.md, the prompt the workflow's model runs, with two changes: read with plain gh issue view, gh issue list, gh search issues and gh label list (and the code in the working tree), and ask your questions in Step 5 rather than in a questions comment. Write each result to $WORK/plan-<N>.json in the shape of $S/triage-plan.schema.json.
Research many issues in turn, not in parallel, and keep each plan to what the evidence supports. A plan whose ready rests on a reading you are unsure of carries a question instead.
Run every plan through the apply step in dry-run. The block unsets REFINE_MODE, so the scripts send nothing; they read the tracker, apply every guardrail and log what live mode would do:
unset REFINE_MODE # a REFINE_MODE=live left in the shell would send every write
S="${CLAUDE_SKILL_DIR}/scripts"; WORK="<the path Step 1 printed>"
REPO=$(gh repo view --json nameWithOwner | jq -r .nameWithOwner | tr -d '\r')
export GH_REPO="$REPO" REFINE_STATE_DIR="$WORK/state"
export REFINE_ALLOWED_LABELS="${REFINE_ALLOWED_LABELS:-agent-ready,needs-triage,bug,enhancement,documentation,question}" # the workflows' default
for plan in "$WORK"/plan-*.json; do
n=$(jq -r .issue "$plan" | tr -d '\r')
python3 "$S/refine_apply.py" triage --verdict "$WORK/verdict.json" --issue "$n" --plan "$plan"
done
python3 "$S/refine_apply.py" sweep --verdict "$WORK/verdict.json" # ready labels and exact-duplicate closes for settled issues
python3 "$S/refine_apply.py" summary
Show the summary table. A refused row names the rule that stopped the write; it stays refused. Without REFINE_QUESTIONS_ISSUE, the questions and the sweep's ready-buffer report are listed below the table instead of posted, which is expected here: questions go to the user in Step 5, and the buffer is already in Step 2's report. They are logged as question and report rows, which are not writes; Step 5 skips them.
First, put each plan's questions to the user with AskUserQuestion, one question per issue. An answer that settles the issue becomes a clarified-scope comment, proposed like any other write: a new comment whose first line is <!-- triage:clarified-scope -->, holding the confirmed scope and acceptance criteria. Re-run Steps 1 to 4 for that issue after posting it.
Then take the dry-run rows that are not refused one at a time. For each, show the issue, the change and the reason, and ask with AskUserQuestion (options: apply, skip). Never batch several writes into one confirmation. On apply, run the matching script once with REFINE_MODE=live on that command only:
Each Bash call starts a new shell, so open every confirmed write with the same settings as Step 4; the live write then sees the repository and allow-list the dry-run used:
S="${CLAUDE_SKILL_DIR}/scripts"; WORK="<the path Step 1 printed>"
export GH_REPO=$(gh repo view --json nameWithOwner | jq -r .nameWithOwner | tr -d '\r') REFINE_STATE_DIR="$WORK/state"
export REFINE_ALLOWED_LABELS="${REFINE_ALLOWED_LABELS:-agent-ready,needs-triage,bug,enhancement,documentation,question}"
| Dry-run action | Command on confirmation |
|---|---|
size-marker | REFINE_MODE=live "$S/write-size-marker.sh" --issue <N> --points <P> --reason "<size_reason>" --verdict "$WORK/verdict.json" |
blocked-by | REFINE_MODE=live "$S/add-blocked-by.sh" --issue <N> --blocker <M> |
edit-labels | REFINE_MODE=live "$S/edit-issue-labels.sh" --issue <N> --add <label> [--remove <label>] --verdict "$WORK/verdict.json" [--plan "$WORK/plan-<N>.json"] |
comment-close, close-duplicate | REFINE_MODE=live "$S/close-duplicate.sh" --issue <N> --of <kept> --verdict "$WORK/verdict.json" (one confirmation covers the pair: the close and its comment) |
| clarified scope | gh issue comment <N> --body-file "$WORK/clarified-<N>.md" |
Apply size markers and blocked-by edges before the issue's label change: the ready rule reads the plan, and a ready label goes on only when the plan says ready with no open question. Exit 4 from a script is a guardrail refusal; report its message and move on. Exit 3 is a failed gh call; report it and stop.
What was applied, what was skipped, what the scripts refused and why, and the questions still open. Delete $WORK unless the user wants the verdict and plans kept.
commands/dedupe.md (opens in a new tab)commands/triage-issue.md (opens in a new tab)ruff.toml (opens in a new tab)scripts/add-blocked-by.sh (opens in a new tab)scripts/check-model-run.sh (opens in a new tab)scripts/close-duplicate.sh (opens in a new tab)scripts/comment-on-duplicates.sh (opens in a new tab)scripts/dedupe-plan.schema.json (opens in a new tab)scripts/edit-issue-labels.sh (opens in a new tab)scripts/gh.sh (opens in a new tab)scripts/post-buffer-report.sh (opens in a new tab)scripts/post-questions.sh (opens in a new tab)scripts/refine-output.schema.json (opens in a new tab)scripts/refine.py (opens in a new tab)scripts/refine_apply.py (opens in a new tab)scripts/refine_checks.py (opens in a new tab)scripts/refine_definition.py (opens in a new tab)scripts/refine_duplicates.py (opens in a new tab)scripts/refine_gitlab_read.py (opens in a new tab)scripts/refine_graph.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub bjcoombs/ai-native-toolkit --plugin ai-native-toolkit21 skills in this plugin
/6hatsSix Thinking Hats Analysis/ab-equivalenceCompare two versions of an LLM-directed document - an original (teacher) and a candidate (student) - across a transfer set and return a per-case behavioural-equivalence verdict plus an efficiency signal. A transform-agnostic library capability other skills compose to gate a transform on behavioural sameness. TRIGGER when asked to A/B test two versions of a prompt / instruction / skill, to check whether a rewritten or compressed document still behaves the same as the original, to validate behavioural equivalence between two document versions, to gate a transform on no-regression, or when a skill needs the run-the-runner-on-both-versions-and-judge-equivalence capability./assessOther plugins' skills for the same job