goal-loop
Fungsinya
Perintah `/goal` mengubah sebuah tugas menjadi proses berkelanjutan yang ditangani oleh agent secara mandiri. Prosesnya mengikuti siklus rencanakan, kerjakan, uji, dan tinjau, sampai tugasnya selesai, pengguna menghentikannya, atau waktu dan sumber dayanya habis.
Kapan dipakai
- βKetika sebuah tugas diperkirakan membutuhkan waktu lebih dari 30 menit untuk diselesaikan.
- βKetika ada cara yang jelas untuk memverifikasi apakah tugasnya sudah selesai (misalnya, semua tes berhasil).
- βKetika proyek sudah siap untuk otomatisasi (sudah ada tes dan dokumentasi).
Link skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/goal-loop/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBuatkan rencana untuk memigrasikan proyek kami dari Python 2 ke Python 3, pastikan semua tes berhasil dan API publik tetap tidak berubah.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent menerima instruksi yang jelas tentang tujuan, apa yang tidak boleh diubah, cara memeriksa kemajuan, dan kapan harus berhenti. Agent bekerja secara bertahap sambil melaporkan tindakannya, sampai tujuan tercapai atau sampai dibutuhkan masukan dari manusia.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Agent /goal Loop
What /goal is
/goal is a slash command that turns an agent prompt into a persistent agent looping plan β act β test β review β iterate until a stop condition is met, the user pauses, or the token budget runs out. Internally called the "Ralph loop."
Agents with the /goal feature right now: Codex, Claude Code, and Hermes Agent.
Key difference from a normal prompt: when a turn ends but the goal isn't met, the agent auto-continues instead of waiting for input.
Lifecycle states: pursuing, paused, achieved, unmet, budget-limited.
When monitoring a running /goal, every check should include a one-line update to the user: what the agent is doing and whether it is on track. Keep it extremely concise.
Not: a budget command, a safety boundary, "run forever", or a replacement for /plan. It's a contract enforcer with a verification loop.
Requirements
- An agent with the
/goalfeature β right now: Codex, Claude Code, or Hermes Agent - The goals feature enabled in the agent's config
- Subscription auth β API-key auth does not work. A pro-tier plan is the realistic minimum for long runs.
When to Use it
Use only when all three are true:
- Task is >30 min of mechanical work.
- There's a verifiable stop condition (tests pass, coverage hit, eval β₯ X, build green).
- Repo is agent-ready (working build, decent tests,
AGENTS.mdpresent).
Fits: migrations, coverage lifts, TDD feature builds, refactors with contract tests, prompt/eval optimization, deploy retry loops, bug-repro-then-fix.
Bad fits: exploratory work, vague "improve this", anything without a "done" definition, prod credentials, destructive shared-infra ops.
The 5-part contract (every goal needs this)
- Objective β one sentence, one concrete outcome.
- Constraints β what must NOT change (public API, files, libs, conventions).
- Validation command β the exact shell command that proves progress (
pytest -q,pnpm test, etc.). - Stop condition β verifiable: "Stop when X passes" OR "when further changes need human/product input."
- Documentation β one sentence instructing the agent to write concise, targeted docs for every change, either creating new
.mdfiles or updating existing ones.
Plus: tell the agent what to read first, ask it to work in checkpoints with a short progress log.
Writing a goal (the core deliverable)
When the user wants a quick /goal instruction, produce a structured markdown block with one line per contract item (proper newlines, not flowing prose). Do not prefix the output with /goal β the user adds the slash command themselves in the composer. Emit only the contract body. Template:
**Objective:** <one-sentence objective>
**Read first:** <files/PLAN.md/issue>
**Constraints:** <what not to change, libs, conventions>
**Validate:** `<exact command>` after each change
**Document:** Write concise, targeted documentation for all changes β create new `.md` files or update existing docs as needed.
**Checkpoints:** work in checkpoints and log progress briefly
**Stop when:** <verifiable condition>, OR when further changes require human/product input
Example (migration)
**Objective:** Migrate this project from Pydantic v1 to v2.
**Read first:** pyproject.toml, src/, tests/
**Constraints:** no public API changes; keep imports backwards-compatible via shims if needed; no new dependencies
**Validate:** `pytest -q` after each change
**Checkpoints:** work in checkpoints; log progress briefly
**Stop when:** full suite passes with zero deprecation warnings, OR when a change requires architecture decisions
Example (coverage lift)
**Objective:** Raise coverage in src/auth/ from ~38% to β₯75%.
**Read first:** src/auth/, tests/auth/, AGENTS.md
**Constraints:** no new deps; mirror existing test style; do not modify production code unless strictly required for testability
**Validate:** `pytest --cov=src/auth --cov-report=term-missing`
**Checkpoints:** work in checkpoints; log coverage delta each one
**Stop when:** coverage β₯75% AND all tests pass, OR when uncovered code needs design changes
Writing rules
- One objective, one stop condition. Not a backlog.
- Documentation is mandatory. Every
/goalprompt must include a single sentence committing the agent to concise, targeted docs β new.mdfiles or focused updates to existing docs.
β¦
Pertanyaan umum
Apa itu 'Ralph loop'?
Itu adalah nama internal untuk proses yang digunakan `/goal`: rencanakan, kerjakan, uji, tinjau, lalu ulangi sampai tujuan tercapai.
Bisakah saya menggunakan `/goal` untuk tugas apa pun?
Tidak. Cara ini paling cocok untuk tugas yang panjang dan terdefinisi dengan jelas, serta punya kriteria 'selesai' yang jelas. Cara ini tidak cocok untuk pekerjaan eksplorasi atau tugas tanpa titik akhir yang jelas.
Apa itu 'kondisi berhenti yang bisa diverifikasi'?
Itu adalah aturan yang jelas dan objektif yang menandakan tugas sudah selesai, misalnya 'semua tes sudah berhasil' atau 'cakupan kode sudah mencapai X%'. Sesuatu yang bisa diukur.
Detail
Deskripsi asli dari pembuat
Draft and explain persistent goal-loop prompts for long-running agent work with clear stop conditions.
Popularitas
- Bintang GitHub
- 48k
- Peringkat
- #4765
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
00-andruia-consultant
48kMembantu agent Anda memulai atau meningkatkan proyek AI. Agent menganalisis kode, menyarankan tools, dan membuat rencana aksi dalam bahasa Spanyol.
007
48kMemungkinkan agent Anda melakukan audit keamanan dan threat modeling. Berguna untuk melindungi proyek dari serangan dan celah keamanan.
10-andruia-skill-smith
48kMembantu agent Anda membuat atau meningkatkan tools AI. Agent mendefinisikan cara kerja tools, menulis dokumentasi, dan memvalidasi strukturnya.
20-andruia-niche-intelligence
48kMemungkinkan agent Anda membuat ringkasan industri tertentu. Berguna untuk memahami konteks, aturan, pola penggunaan, dan risiko proyek dengan sumber terpercaya.
Skill serupa
add-model-provider
394kMemungkinkan agent Anda menghubungkan penyedia model AI baru ke OpenClaw dengan perintah pengaturan yang aman, menjaga kunci API tetap di luar teks biasa, dan menjalankan uji langsung.
acp-router
394kMembantu agent Anda mengirim tugas ke asisten pemrograman seperti Claude Code atau Cursor lewat OpenClaw, sehingga pekerjaan dijalankan di alat tersebut.
browser-automation
394kMengajari agent Anda mengendalikan halaman web langkah demi langkah, termasuk login, tab, dan pemulihan saat halaman berhenti merespons.