# backlog cleanup

> Groom GitHub Issues by identifying completed work, duplicates, and stale labels using real code evidence.

backlog cleanup is a free AI agent skill on Agensi by Mark Myslin, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Mark Myslin](https://www.agensi.io/creators/mark-myslin)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-07
- Security: scan passed (2026-10-07); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/backlog-cleanup
- Tags: ai-agents, github-cli, git, project-management, code-review

## About this skill

Maintaining a clean issue tracker shouldn't be a manual chore. This skill grooms your GitHub repository by identifying issues that no longer belong in the backlog based on the actual state of your codebase. It cross-references open issues against your files, commits, and activity logs to find finished work that was never closed.

### What it does
- **Verify implementations** by scanning code for file:line evidence, functions, or endpoints that prove an issue is already done.
- **Detect redundancies** by finding duplicate or overlapping issues across both open and closed states.
- **Audit stale progress** by identifying "in progress" labels on issues with no commits or PR activity for 14 days.
- **Cleanup labels** by automatically finding closed issues that still carry active progress tags.
- **Batch propose changes** via a structured checklist for your approval before any write actions occur.

### How it works
1. **Fetch state** from the GitHub CLI, retrieving the latest 500 open issues and any closed issues with active labels.
2. **Scan the codebase** using `git log` and file inspection to find evidence of completed work or recent activity.
3. **Draft a proposal** listing specific issues to close, merge, or unlabel with a concrete reason for each.
4. **Execute updates** once you approve, using the `gh` tool to update issue statuses and labels.

### Frameworks & tools
This skill requires the GitHub CLI (`gh`), `git`, and an authenticated session. It works with any repository regardless of language or framework.

### Why this beats prompting it yourself
Generic prompts can't verify code evidence or calculate label staleness accurately. This skill uses specific `git log` grep patterns and `gh api` event timelines to ensure every suggestion is backed by hard data rather than LLM hallucinations.

### Use cases
- **Post-sprint cleanup** to close issues that were accidentally left open after a merge.
- **Duplicate hunting** to consolidate feedback during high-volume periods.
- **Backlog grooming** to remove progress labels from tasks that were abandoned or paused.

### Known limitations
Requires local git checkout and GitHub CLI authentication. It cannot see private data outside the repository scope or analyze third-party project boards not integrated with GitHub Issues.

One of five backlog skills that work together: suggest, order, next, keeper, cleanup. From the maker of Sideboard, a live GitHub Issues board for Claude Code.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the backlog cleanup skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What are the technical requirements to run the Backlog Cleanup skill?

The skill requires an authenticated GitHub CLI (`gh`) session and a local clone of the repository you wish to audit. It uses these local tools to cross-reference your actual code and commit history against the GitHub Issues API.

### Will this agent automatically close my GitHub issues without my permission?

No, the skill operates on a 'proposal-first' basis. It generates a detailed checklist of suggested changes and reasons for your review, and only executes updates once you provide explicit approval.

### How does this verify that an issue is actually 'done' compared to just guessing?

Unlike generic LLM prompts, this skill uses specific `git log` grep patterns and file-level inspection to find 'hard evidence' of completed work. This prevents the agent from hallucinating or closing issues based on vague similarities.

### Which AI agents or development environments are compatible with this skill?

This skill is compatible with any AI agent or IDE that supports tool-calling and has access to your local terminal environment. It is language-agnostic and works with any repository regardless of the tech stack.

### Can this skill help me identify tasks that have been abandoned by contributors?

The skill is specifically designed to detect 'in progress' or 'active' labels on issues that have seen no commit or PR activity for 14 days. It flags these as stale so you can clear the noise from your active sprint view.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
