Agentuna Agentuna
Build an agent

Recipe · Build apps (vibe coding)

Hand a GitHub issue to Claude Code and get back a tested pull request

Turn a clear bug report into a pull request without opening your editor: Claude Code (or OpenAI Codex) reads the issue, reproduces the bug with a failing test, fixes it, runs your test suite and prepares a pull request. You review the diff and merge; nothing reaches the main branch without you.

Not tested yet. Vote for it to be next ⏱ ~45 min Updated: 2026-10-19

Jump to the prompt

Steps

  1. Check the basics: admin access to a github.com repository, a test command that already runs in CI (for example npm test or pytest), and either a Claude API key or a paid Claude plan (Pro, Max, Team or Enterprise). Protect the main branch so every pull request needs your approval before it can merge.
  2. Install the GitHub integration. Quick way: open a terminal in the repository, start claude and run /install-github-app. It installs the Claude GitHub App, saves a repository secret (ANTHROPIC_API_KEY for an API key, or CLAUDE_CODE_OAUTH_TOKEN for a subscription token made with claude setup-token) and opens a pull request with the workflow file; merge it. Manual way: install the Claude GitHub App, add the secret yourself and copy examples/claude.yml from the claude-code-action repository into .github/workflows/.
  3. Add a short CLAUDE.md at the repository root: how to install dependencies, the exact test and lint commands, the code style, and folders that must not be touched. Claude reads it on every run, so keep it under a page.
  4. Make the issue reproducible before you hand it over: steps to reproduce, expected and actual result, the error message or log, and the file or screen where it happens. A vague issue produces a vague fix.
  5. Comment on the issue with the prompt below (it starts with @claude; fill the placeholders). Only people with write access to the repository can trigger it. Claude replies in a comment and updates it as it works: it reads the code, writes a failing test, fixes the bug, runs your tests and pushes a branch for the pull request.
  6. Review it like a colleague’s pull request: read the new test first (does it fail without the fix?), then the diff, then the CI result. If something is off, comment on the pull request with @claude and one specific change, for example “keep the public function signature unchanged”.
  7. Merge it yourself once CI is green and you understand every line. Prefer Codex? In Codex cloud, connect GitHub, create an environment for the repository (Codex installs the dependencies and tests the setup), click Publish, then Start a new task with the same prompt plus the issue text. Review the changes and test results, and open a pull request from the task.

Prompt

Replace anything in { } with your details.

Copy & paste
@claude Fix the bug described in this issue.
Work in this order:
1. Find the cause. Quote the file and lines responsible in your first update.
2. Write a test that reproduces the bug and fails on the current code ({TEST FRAMEWORK, e.g. Vitest or pytest}), next to the existing tests in {TEST FOLDER}.
3. Make the smallest change that makes the test pass. Do not refactor unrelated code, rename public functions or add dependencies.
4. Run the full test suite with `{TEST COMMAND}` and the linter with `{LINT COMMAND}`. If anything else fails, stop and report it instead of changing other tests.
5. Open a pull request titled "Fix: {SHORT DESCRIPTION}" that contains "Fixes #{ISSUE NUMBER}" and explains the cause in 2-3 sentences, what changed and how you tested it.
If you cannot reproduce the bug, do not guess a fix: comment with what you tried and the one piece of information you need from me.

Expected output

A pull request linked to the issue, with a new test that failed before the fix and passes after it, a minimal code change, green CI and a short explanation of the cause; you review and merge it yourself.

Gotchas

  • ⚠ Every run uses GitHub Actions minutes plus Claude usage (API tokens, or your plan’s limits with a subscription token). Cap long runs with --max-turns in claude_args and a workflow timeout, as Anthropic’s GitHub Actions docs suggest (code.claude.com/docs/en/github-actions).
  • ⚠ The Claude GitHub App requests broad repository permissions (contents, issues, pull requests, workflows and more), and GitHub does not let you accept only some of them. If your organisation needs least privilege, create a custom GitHub App as the action’s setup guide explains.
  • ⚠ CI does not run on commits pushed with the default GITHUB_TOKEN. If your checks never start on Claude’s branch, remove any github_token input so the action authenticates as the Claude GitHub App.
  • ⚠ A green test suite is not proof the fix is right: agents sometimes weaken or delete a test to make it pass. Read the test diff first, and never give the agent permission to merge.
  • ⚠ Never paste secrets into issues or comments; the agent reads them, and so does everyone with access to the repository. Keep keys in GitHub Secrets.
  • ⚠ Codex cloud needs a ChatGPT plan that includes Codex and its own environment setup; usage limits depend on the plan and change often, so check them in Codex settings before you rely on it.
Where these tools break
  • The limit, from Claude Code’s page: Claude Code draws from the same pool as Claude chat: Pro ($20/mo) and Max ($100/mo, 5x Pro) each have a 5-hour session cap plus a weekly cap, while Ultra ($200/mo, 10x Pro… (support.claude.com, checked )
  • Known problem with Claude Code: Fake extension copies on Cursor's marketplace (29 Oct) (, cursor.com)
  • Watch out with Claude Code: Claude Code is not on the free Claude plan; it uses your Pro or Max usage limits, and a batch of photos burns through them faster than text. Do 30 to 50 receipts at a time. From a recipe
  • Real example with Claude Code: Burned a 5-hour Claude Max quota in 30 minutes via subagent file reads vs Spotify's 90% token-reduction harness. The catch: Self-reported developer post on X (24 Oct 2026) and architectural summary of Spotify's engineering setup; token savings depend on codebase size and subagent… (source dated )

All notes for Claude Code

Real examples All real examples

What people actually did with these tools or for this problem, with the source.

Build apps (vibe coding) Not tested yet

Cap Cursor on-demand spend before it surprises you

Set a monthly limit on the paid usage Cursor bills after your included usage runs out, using Cursor's own settings, so an AI agent can't run up a bill you didn't plan for.

  • Cursor

8 min · Free to start · Copy-paste prompt

Build apps (vibe coding) Not tested yet

Slow Claude Code token burn: idle compaction, resume warnings and /rate-limit-options

Cut wasted weekly and 5-hour Claude Code usage by turning on Anthropic's idle compaction, heeding the Pro/Max resume warning, starting fresh sessions instead of reprocessing a huge idle thread, and stopping unattended sessions from burning the limit after you walk away.

  • Claude Code

15 min · From $20/mo · Agent template

Build apps (vibe coding) Not tested yet

Check Claude Code's local settings file for secrets

Find whether a "Yes, and don't ask again" approval saved a command that holds a secret in .claude/settings.local.json, rotate any key first, then untrack the file and stop it being committed.

  • Claude Code

15 min · From $20/mo · Copy-paste prompt