Skip to main content
skill CX Codex

resolve-scrap-issues — Claude Code skill: triage scrap issues

This skill walks the newest GitHub issues labeled maintainer-scrap, validates each one, then either closes it or opens a single pull request that fixes the rest.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dyoshikawa/rulesync --skill resolve-scrap-issues -a claude-code
Open on GitHub

What resolve-scrap-issues does

The skill pulls the three most recent open issues carrying the maintainer-scrap label with gh issue list, reads the body and the discussion for each, and sorts them into two buckets: no action needed and action needed. The first group gets closed with a comment that states the reason and links the evidence. The second goes into one branch and one pull request.

Validation runs on three fronts: web research for external claims like a file format or config schema, inspection of the codebase, and the issue thread itself. A maintainer decision recorded in the comments wins. The skill defaults to action and leaves an issue open only in narrow cases: the fact behind the fix cannot be confirmed from a primary source, or the change would do real harm — touching .github/**, the release pipeline, or deleting user files outside what rulesync manages.

Before committing it runs pnpm cicheck, and generated config files have to be regenerated by hand. The skill extends understand-scrap-issues: steps 1–3 are the same intake flow, and validation plus edits come after. It needs a repository that actually uses the maintainer-scrap label and an authenticated gh, because every listing and closing call goes through the GitHub CLI.

What it helps with

  • triage the newest issues labeled maintainer-scrap
  • filter out obsolete and duplicate issues without reading each by hand
  • confirm an external claim from an issue against a primary source
  • bundle fixes for several issues into one pull request
  • close an issue with a comment that cites the evidence

Example prompts for the agent

  • run the resolve-scrap-issues skill and work through the latest scrap issues
  • check the open maintainer-scrap issues and close the ones that need nothing
  • open one PR covering every actionable scrap issue

How to install resolve-scrap-issues

1Skills CLI (Vercel)

npx skills add dyoshikawa/rulesync --skill resolve-scrap-issues -a claude-code

2Manually: put the files in place

~/.claude/skills/resolve-scrap-issues/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/resolve-scrap-issues/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about resolve-scrap-issues

How do I install resolve-scrap-issues in Claude?

Run npx skills add dyoshikawa/rulesync --skill resolve-scrap-issues -a claude-code. The skill file lands at ~/.claude/skills/resolve-scrap-issues/SKILL.md.

What does resolve-scrap-issues do?

It fetches the three newest open issues labeled maintainer-scrap, validates each through web research and code inspection, closes the ones needing no action, and opens one consolidated pull request for the rest.

What does the skill need to run?

A repository with issues under the maintainer-scrap label and an authenticated gh, since every listing and closing call goes through the GitHub CLI. It also runs pnpm cicheck before committing.

Source text

SKILL.md · MIT
---
name: resolve-scrap-issues
description: >-
  Fetch recent maintainer-scrap issues, validate each with web research, then
  either close the ones that need no action or open a single consolidated pull
  request that resolves the ones that do
targets:
  - "*"
---

Fetch the newest scrap issues (GitHub issues labeled `maintainer-scrap`), understand each one, validate whether it is still a real and actionable problem using web research and codebase inspection, and then drive each issue to closure: close the issues that need no action, and resolve the actionable ones — bundling them into a single pull request when there is more than one.

This skill extends `understand-scrap-issues`: Steps 1–3 are the same intake flow, and Steps 4 onward add validation and resolution.

## Step 1: Fetch the Latest Scrap Issues

List the most recent open issues that carry the `maintainer-scrap` label. `gh issue list` returns issues in creation order (newest first), so limiting to 3 yields the 3 newest:

```bash
gh issue list --label maintainer-scrap --state open --limit 3 --json number,title,url,createdAt
```

If the result is empty, report that there are no open scrap issues and stop.

## Step 2: Gather Each Issue's Content

For each scrap issue returned, read both the body and the discussion. Run these in parallel across the issues where practical:

```bash
gh issue view <issue_number>
gh issue view <issue_number> --comments
```

If an issue references related pull requests, commits, or files that are needed to understand it, gather that context as well.

## Step 3: Understand and Summarize

For each scrap issue, explain the following based on its content:

1. **Topic:** A one-line summary of what the scrap note is about.
2. **Background:** The context, motivation, or problem the note captures and why it matters.
3. **Details / Findings:** The specific observations, problems, or content recorded in the note.
4. **Proposed Solution / Next Steps:** Any solution or actionable next step mentioned. If none is recorded, state explicitly that it is still undecided.

Keep each summary concise and focused. Present the issues in the order returned (newest first), with the issue number, title, and URL as a heading for each.

## Step 4: Validate Each Issue

Decide, per issue, whether it still describes a real, actionable problem. Combine three angles:

- **Web research (`WebSearch` / `WebFetch`):** Verify any claim that depends on external facts — a tool's current file format, config schema, default location, scope support, deprecation, or recent behavior change. Prefer primary sources (official docs, release notes, source code) over blog posts, and cross-check non-trivial claims against at least one primary source. Capture exact URLs and version numbers; they will be cited. Run independent searches in parallel.
- **Codebase inspection:** Check whether the issue is already resolved, partially handled, or contradicted by the current code. Prefer targeted symbol and search tools over reading whole files. Apply the project rules in `CLAUDE.md`, `.claude/rules/**`, and `docs/**` (for example, the feature-change and frontmatter conventions).
- **Issue discussion:** Honor any maintainer decision already recorded in the comments (e.g., "won't do", "superseded by #N").

Classify each issue into exactly one bucket:

- **No action needed** — invalid, obsolete, already fixed, out of scope, a duplicate, or explicitly declined. Record the concrete reason and the evidence (URLs / file references / linked issue) behind it.
- **Action needed** — a real problem, gap, or worthwhile proposal that still applies, with a concrete fix in mind. An open design point is not a blocker: pick the option that best fits the project's existing conventions and the tool's documented behavior, and state the choice in the PR body.

Default to action. Leave an issue open only in two narrow cases: the facts the fix depends on cannot be established from any primary source or the code, or the fix would do real harm (edit `.github/**` or the release pipeline, add a new runtime dependency, contradict an explicit maintainer decision in the thread, or delete or overwrite user files outside the outputs rulesync already manages). In those cases, leave the issue open, report the missing fact or harm, and exclude it from both Step 5 and Step 6.

## Step 5: Close the Issues That Need No Action

For every issue classified as **No action needed**, post an explanatory comment and close it. The comment must state the reason and cite the evidence (inline links to primary sources, file paths, or related issue/PR numbers) so the decision is auditable. Write the comment in English.

```bash
gh issue close <issue_number> --comment "<reason with evidence>"
```

Do not close an issue without leaving this reasoning comment.

## Step 6: Resolve the Issues That Need Action

If no issue is **Action needed**, skip to Step 7.

### 6a. Plan the change

For all actionable issues, decide the concrete edits, grounded in the Step 4 findings. Follow `.claude/rules/feature-change-guidelines.md` where applicable (e.g., `rules-processor.ts` conventions, frontmatter precedence, `gitignore.ts`, scope support, README/docs sync, and preserving the Tool × Feature happy-path tests).

### 6b. Branch

Create one branch for the whole batch. If the current branch is `main` or `master`, create a descriptive branch (e.g., `resolve-scrap-issues-<short-topic>`); otherwise reuse the current working branch.

### 6c. Implement

Make the edits for every actionable issue. When several issues touch the same area, resolve them together coherently rather than with conflicting patches.

### 6d. Verify

Run the project checks and fix anything they surface before committing:

```bash
pnpm cicheck
```

If the change affects generated config files (commands, rules, gitignore, etc.), regenerate them as the relevant docs/rules instruct (for example, `pnpm dev gitignore`) and keep `README.md` and `docs/**` in sync with the implemented behavior.

### 6e. Commit, push, and open ONE consolidated PR

Stage and commit with a clear message, then push:

```bash
git add .
git commit -m "<message>"
git push -u origin <branch-name>
```

Open a single pull request that resolves all actionable issues in the batch. The body must include a `Closes #<n>` line for every issue it fixes so they auto-close on merge:

```bash
gh pr create --title "<title>" --body "<description>"
```

The PR description should include:

- A summary of the changes, grouped by the issue each part resolves.
- `Closes #<issue_number>` lines for every actionable issue (one consolidated PR even when there are multiple issues).
- The validation evidence (key research links) that justified the change.
- A test plan / the result of `pnpm cicheck`.

If a PR already exists for the branch, update it instead of creating a duplicate (use `gh api repos/<owner>/<repo>/pulls/<pr-number> -X PATCH` to avoid GraphQL deprecation warnings).

## Step 7: Report Result

Summarize, per issue:

- **Closed (no action):** issue number, title, and the reason it was closed.
- **Resolved (PR):** issue number, title, and the single PR URL that closes it.
- **Left open (inconclusive):** issue number, title, and the missing fact or harm that blocked it.

All issue comments, PR title, and PR body must be written in English regardless of the conversation language. Write the final report to the user in the language of the current conversation.

© dyoshikawa · MIT · dyoshikawa/rulesync

Similar skills

All skills for Git and GitHub →

From the same set11

rulesync-feature-research Maps rulesync features against coding-agent docs: what is supported, where the gaps are, how clients differ. CX Codex +1 ★ 1,552repo stars rebase-latest-main A skill that walks the agent through fetching origin/main, rebasing the current branch and resolving conflicts. Handy when your branch has drifted behind main. CX Codex +1 ★ 1,552repo stars prs-awaiting-author Lists open pull requests where the next move belongs to the author: failing CI, unaddressed review comments, or a maintainer question waiting on a reply. CX Codex +1 ★ 1,552repo stars porting-another-repository Reads a feature in your current repo and the target repo's conventions, then writes a porting plan into tmp/ as files you apply yourself. CX Codex +1 ★ 1,552repo stars goal-release Drives a release end to end: opens the PR, waits for green CI, merges it and updates the Homebrew formula. Handy when a version has to ship in one go. CX Codex +1 ★ 1,552repo stars git-worktree-runner A skill that teaches the agent to drive git worktrees through the gtr CLI: create, open in an editor, run commands, remove. CX Codex +1 ★ 1,552repo stars draft-issue-to-external-repository Drafts a GitHub issue for a repository you do not own: reads the project's templates and title style, settles scope with you, and saves the body to a file. CX Codex +1 ★ 1,552repo stars create-issue A skill that walks through issue creation step by step: gathers context, checks the codebase, drafts English text, and assigns labels. Handy when you want a tidy issue without doing it manually. CX Codex +1 ★ 1,552repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor