Awesome Goal Prompts — Coding Agent Rescue Contracts

Awesome Catalog quality Pages Release License: CC0-1.0

When Claude Code, Codex, Cursor, or another coding agent starts making broad edits, paste a contract that says exactly what to inspect, what not to touch, how to verify, and when to stop.

This repo keeps 300+ runnable /goal contracts for engineering work. Start with the provenance-backed rescue prompts below; use seed patterns only when you need a raw shape to adapt.

Search the full catalog: https://majiayu000.github.io/awesome-goal-prompts/

A good goal is not a wish. It is a runnable contract: one goal, enough context to inspect, hard constraints, verifiable completion, and stop rules for uncertainty or risk. This repo turns that contract shape into a catalog you can search, inspect, adapt, and copy.

The public catalog starts with 159 source-backed examples drawn from official docs, public GitHub threads, tutorials, forum posts, and tool READMEs. The other 200 reusable seed patterns are kept in Seed Patterns so they do not dilute provenance-backed examples.

Awesome Goal Prompts — searchable prompt catalog for Claude Code, Codex, and Cursor coding agents

Try It In 60 Seconds

  1. Open the searchable catalog at https://majiayu000.github.io/awesome-goal-prompts/, or pick any contract straight from this README.
  2. Copy the full /goal contract text — the whole block, including GOAL, CONTEXT, CONSTRAINTS, DONE WHEN, VERIFY, OUTPUT, and STOP RULES.
  3. Paste it to your coding agent (Claude Code, Codex, or Cursor) and let it run.

First example — Auth Tests And Lint Clean: use it when your auth tests and lint are both red and "fix auth" keeps inviting API churn.

Expected outcome: the agent keeps working until the auth tests pass and lint is clean, then stops only after pasting the passing command output as evidence. If it cannot reach that state, the stop rules tell it to report instead of editing further.

Contribute A Goal In 5 Minutes

  1. Find a thin category or missing rescue pattern in the catalog browser or catalog health report.
  2. Draft the contract with skills/make-goal/ and its catalog contribution reference.
  3. Add the entry through CONTRIBUTING.md: edit data/source/entries.toml, keep public provenance for source-backed examples, regenerate, and run the validation commands.

Why This Exists

Most prompt lists stop at catchy instructions. This catalog is for the moment after an agent starts drifting: the task is real, the repo has constraints, and "try harder" is not enough. Each contract gives the agent a narrow job, required context, explicit boundaries, proof, and stop rules.

  • Source-backed where possible: external examples keep a public URL, source type, evidence phrase, and generated evidence summary.
  • Runnable by design: every prompt includes GOAL, CONTEXT, CONSTRAINTS, DONE WHEN, VERIFY, OUTPUT, and STOP RULES.
  • Search quality is tested: representative user queries must retrieve the expected contract in CI.
  • Seed patterns are separated: reusable patterns stay available, but the main catalog leads with source-backed contracts.

Start With Ten Rescue Prompts

These are the front door. Each one is source-backed, tied to a common coding-agent failure mode, and links to the full copyable prompt.

If the agent is failing at... Copy this contract Before After
Auth tests and lint are both red Auth Tests And Lint Clean "Fix auth" invites API churn. Auth behavior is preserved; tests and lint prove the fix.
CI has mixed test, lint, and typecheck failures CI Pipeline Green The agent chases one log line at a time. Local and remote CI evidence define done.
A migration needs proof, not vibes Dev Database Migration Proof The agent edits schema without rollback evidence. Dev DB application and schema comparison are required.
A PR may have security bugs Security PR Review Review comments stay generic. File-level auth, injection, XSS, and secret risks are called out.
Checkout crashes from a stack trace Checkout Crash Regression Fix The agent patches the symptom. Reproduction, root cause, fix, and regression test are all required.
Users see an empty billing state Billing Empty State Root Cause The agent rewrites pricing or webhooks. The investigation is scoped to the empty-state cause.
A visual migration must not drift Visual Migration With Playwright "Looks close" becomes the acceptance test. Playwright checks preserve screen output.
Agent runs need traceability Agent Trace Observability Tool calls and handoffs disappear in logs. One representative run produces trace spans.
npm audit is red NPM Audit Clean Remediation The agent upgrades packages blindly. Audit and tests must both pass without public API breakage.
A plan may still have holes Review Plan Until No Gaps The agent accepts the first plausible plan. A fresh review must find no remaining gaps.

The provenance-backed library stays below as the primary reference catalog.

Contents

Source-Backed Catalog

The source-backed index lives in prompts/source-backed-goals.md, and the searchable UI defaults to source-backed examples in the GitHub Pages catalog.

Reusable patterns that are not backed by public sources live in Seed Patterns.

workflow

  • Verifiable End-State Contract - Complete one goal only when a verifiable end state is met.
  • Four Files Walkthrough - Create four note files across turns and verify each contains its number.
  • Meta Goal Prompt Generator - Ask the agent to inspect the session, repo, history, and docs before writing the actual /goal prompt.
  • AGENTS.md Goal Workflow - Use AGENTS.md rules together with /goal so long-running work keeps repo-specific constraints.
  • Plan-Then-Goal Execution - Use plan mode to define the work, then start a new goal session to implement the plan completely.
  • Measurable Goal Structure - Write goals with a clear target, proof requirement, and explicit limits.
  • Interview-Driven Goal Prompt Generator - Use a meta prompt to interview the user with clarifying questions until 'done' can be expressed in specific, measurable, verifiable terms, then output a high-quality structured /goal prompt.
  • Non-Interactive Goal Creation - Create and confirm an active goal during non-interactive Codex execution before continuing.
  • Prep A Goal Workspace - Prepare a goal workspace with board, notes, receipts, and an exact /goal command.
  • Long Goal With Constraints - Use a longer goal template with repo path, constraints, plan pointer, and execution order.
  • User-Facing Coherence Closure - Finish a coherence pass so CLI help, docs, JSON/plain output, colors, prompts, flags, and next-action grammar stay aligned.
  • Three Questions Goal Framework - Write higher quality goals by explicitly answering three core questions: what needs to be done, how success will be measured, and what is off-limits.
  • Explicit Stop Rules for Goal Loops - Prevent infinite loops, cost overruns, and unsafe behavior in autonomous /goal executions by defining clear, explicit stop conditions and escalation rules.
  • Dual-Model Evaluator Loop for Goals - Run long /goal sessions reliably and cost-effectively by using a strong worker model for execution paired with a cheap fast evaluator model (typically Haiku) that periodically judges progress against the goal criteria and decides whether to continue or stop.
  • CLAUDE.md + Goal Workflow - Combine a persistent project-level CLAUDE.md (or AGENTS.md) file containing rules, standards, and context with /goal commands so long-running autonomous agent work stays aligned with repository-specific constraints and learned lessons.
  • Goal Ledger for Long-Running Runs - Maintain a live, browser-viewable HTML progress ledger during extended /goal executions to provide visibility, persistent memory, decision logging, and self-reflection, reducing drift in long autonomous sessions.
  • Artifact-Backed Phase Runner - Run a long-horizon task from one short /goal by storing the roadmap, state, protocol, and phase specs on disk, then auditing final deliverables against the original plan.
  • Well-Scoped Agent Issue - Turn a backlog item into a coding-agent-ready issue with a clear problem statement, acceptance criteria, file directions, and test expectations.
  • Research And Plan Before PR - Have an agent research the repository, create an implementation plan, and iterate on a branch before deciding whether to open a pull request.
  • Goalcraft Six-Field Contract Spine - Write any /goal as a compact, evidence-first, thread-scoped completion contract with explicit outcome, verification surface, constraints, boundaries, iteration policy, and blocked stop conditions instead of vague effort descriptions.
  • Strong Verifiable Goal Contract After Alignment Interview - After a structured alignment interview, produce a binding /goal contract with explicit success evidence, hard constraints, file boundaries, iteration strategy, and blocking/escape handling so a Ralph-loop or native /goal agent can run autonomously until evidence-based completion.
  • Codex Acceptance-Criteria Stop - Put explicit acceptance and stopping criteria directly in the agent task so it stops when the condition is met instead of running open-ended.
  • Oracle Definition Of Done - Define an oracle — the concrete checks (tests, edge cases, benchmarks, static checks) that decide success — before running the agent task.
  • Goal Finish Line Built From Evidence - Write the /goal finish line as an outcome plus success criteria built from evidence, not vibes, so the agent knows when it is truly done.

migration

prototype

prompt-optimization

  • Eval-Driven Prompt Optimization - Optimize prompts against an eval suite until the target score or pass rate is reached.
  • Router Prompt Eval Score - Improve a router prompt against an eval directory until the result score reaches a target.
  • RAG Chat Flywheel - Iterate on code, tests, and metrics to improve a document-chat RAG system.
  • Difficult Task Eval Loop - Run a difficult task as an eval-driven improvement loop with one focused change, rerun scores, and direct artifact inspection each iteration.
  • Fitness Function Dual-Score Improvement Loop - For goals without natural scalar metric (docs quality, code health, consistency), construct an explicit runnable fitness function plus dual-score (outcome + instrument quality guard) and drive an improvement loop with iterations.jsonl ledger until converge criteria.

testing

docs

  • Weekly Changelog Coverage - Ensure CHANGELOG.md includes an entry for every PR merged this week.
  • Contributor README Rewrite - Rewrite README installation, run, test, and architecture guidance for new contributors.
  • Public API Docs Coverage - Add JSDoc and examples for public functions while keeping documentation links valid.
  • Payment Retry Logic Diagram - Explain payment retry behavior as a browsable HTML page with a diagram for developer or support review.
  • Implementation Notes Decision Ledger - Keep live implementation notes and the final run decisions document aligned around decisions, deviations, tradeoffs, and open questions.
  • Repository Agent Instructions - Add repository-level agent instructions that document project structure, build/test/validate commands, coding standards, and documentation expectations.
  • Documentation Matches Code - Update stale API or function documentation so parameters, behavior, examples, thrown errors, and links match the current implementation.

investigation

cli

  • EXIF Rename CLI - Build a small CLI that renames photos by EXIF date and test it on a photos folder.
  • Agent-Friendly CLI And Skill - Create a composable CLI and companion skill so future agent tasks can search, read, download, or draft against a recurring source safely.

refactor

  • Auth Dependency Injection Refactor - Refactor auth code to dependency injection while preserving tests, coverage, and public API.
  • Split Oversized File - Split an oversized source file into focused modules while preserving behavior.
  • Centralize Cross-Cutting Logging - Centralize scattered logging, validation, security, or error-handling behavior without changing the core business behavior of the services.
  • Structured-Prompt-Driven Refactor - Keep the spec or prompt and the code in sync during a refactor; when reality diverges, fix the prompt or spec first, then update the code.
  • Refactor Until Stop Conditions Met - Let the agent iterate on a refactor continually until one of several predefined stop conditions is met, resolving blockers so each run works longer.

security-ops

performance

greenfield-build

product

  • Design Doc Acceptance Complete - Implement a design document until every acceptance criterion is satisfied.
  • Feature Flag System - Implement boolean, percentage, and user-based feature flags with service logic, API middleware, a React hook, docs, and tests.
  • OKR Development From Vague Priorities - Turn vague strategic priorities into measurable OKRs with objectives, key results, alignment, scoring, guardrails, and a communication summary.

backlog

data-analytics

frontend

research

  • Read-Only Font Match - Research font matches in read-only mode and produce a report without purchasing or downloading assets.
  • Public Benchmark Table - Collect distinct public benchmarks and build a date-sorted comparison table.
  • Review Sentiment JSON Agent - Fetch reviews with browser automation, classify sentiment, and write structured JSON output.
  • Clinical Research AI Safety Boundary - Review clinical research AI work with evidence-first boundaries so agents do not invent medical sources, expose private data, or turn research notes into patient-specific advice.
  • Cited Architecture Research Report - Produce a saved, cited Markdown architecture report after inspecting the local codebase, relevant repositories, and web sources.
  • Evidence-Backed Research Reproduction - Reproduce a paper or research result as far as local materials allow while separating confirmed findings, approximate reconstructions, blocked claims, and remaining uncertainty.

maintenance

devops-ci

  • CI Pipeline Green - Repair CI test, lint, typecheck, and security scan failures until checks pass.
  • Bounded Autopilot CI Repair - Run a bounded autonomous CI repair after plan acceptance, with explicit continuation limits, permissions, validation commands, and blocker reporting.

goal-maintenance