Improve claude code

From bendrucker/claude · View interactive version

Improve claude code is an AI agent skill from the GitHub repository bendrucker/claude. Triage and batch-implement Claude-tagged Things todos as PRs for the claude config repo, discover improvement candidates from session history, or watch open PRs to implement review feedback and close shipped todos. Use when the user wants to work on their Claude Code improvement backlog, process Thi

How to use this skill

Skill file

Improve Claude Code

Work through the claude-code Things backlog: fetch todos, triage with the user, then plan and implement each in parallel as separate PRs.

The backlog has two sources. The user files todos tagged claude-code by hand (and agent-ideas files external-harvest ideas in the same shape). Discover mode mines session history for config-change candidates and files the keepers as claude-code todos. Both sources feed the one implement loop below.

In every mode, the loop itself is in scope: this skill's own SKILL.md, the observability:session skill's queries and views, and the Things scripts the loop depends on. Findings in that class may be dispatched to background worktree agents immediately, even when everything else routes to planning or triage discussion.

All Things interaction goes through the things:jxa and things:url skills (never inline JXA). PRs go through pull-request:create (never gh pr create).

Arguments

$0 (optional mode) routes to a workflow. With no mode, run the default backlog loop: Fetch and Triage the claude-code todos, then plan and implement the selection as PRs.

Fetch and Triage

Use things:jxa to find all open todos tagged claude-code. Display a numbered table:

| # | Title | Notes (first line) | List |

|---|-------|--------------------|------|

Ask the user which items to work on (numbers, ranges like 1-3, or all). The workflows below cap their own concurrency at min(16, cores-2), so never manually batch or split a large selection. Before firing a very large selection (roughly more than 15 items), confirm once, since each todo spawns its own worktree and PR.

Session Context

Each todo's notes embed the originating session as Session: <uuid>. For every selected todo, use the observability:session skill to pull the original context (what you were doing, the commands that ran, the errors that prompted the todo) before planning: richer than the todo's prose summary and grounds each plan in the real failure. Session context informs local planning only: never paste session-derived content into PR bodies or any other output that leaves the machine. Index refresh, DuckDB lookup mechanics, host filtering, and the full egress rule: references/session-context.md.

Plan

The mechanical fan-out runs as a Workflow. Instructing Workflow from inside this user-invoked skill is a sanctioned opt-in under the Workflow tool's own rules, so author and run the script rather than refusing mid-run.

Run one Workflow (parallel) with one agent per selected todo. Give each agent its todo title, full notes, and the distilled session context, and have it explore the repo and produce an implementation plan. Point agents at the relevant domain skills: plugin:skill for skill changes, plugin:hook for hooks, bun:bun for scripts. Preserve the egress rule inside the workflow: session-derived context stays local and never enters agent output that leaves the machine.

Each agent returns a structured plan:

{ thingsId, todoTitle, plan, proposedEffort ('low'|'medium'|'high'), filesTouched[] }

The workflow returns the plans to the main loop. Present them there and collect approval plus a per-plan code-review effort (typically low; medium for changes touching multiple plugins) via AskUserQuestion. This gate is interactive, so it stays in the main loop and cannot move into a workflow.

Implement

Feed the approved plans into a pipeline Workflow: implement (a worktree general-purpose agent implements the plan, runs bun test and code-review <effort> at the approved level, commits, and opens the PR via pull-request:create with an Original Task backlink) then ciGate (a fast initial CI check with one trivial-failure fix pass). Do not hold worktree agents open on long CI waits: the gate catches trivial breakage, then Watch handles the rest. Back in the main loop, Annotate Things and Summary consume the pipeline results unchanged. Pipeline shape, stage schemas, and the PR body format: references/implement.md.

Monitor CI and Fix Failures

The ciGate stage already ran a fast initial check with one trivial-failure fix pass, so each PR lands with a first CI signal. Hand ongoing CI and review tracking to Watch: /loop /improve-claude-code watch re-checks every open PR each tick, fixes CI failures, implements review feedback, and closes each backing todo on merge.

Annotate Things

Use things:url to update each todo based on its PR outcome:

Summary

Output a bulleted list (one entry per todo): PR link (pass/fail), Things URL (https://things.bendrucker.me/show?id=<todo-id>), title.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.