goal-loop
यह क्या करती है
`/goal` कमांड किसी काम को एक लगातार चलने वाली प्रक्रिया में बदल देता है, जिसे एजेंट अपने आप संभालता है। यह योजना बनाना, काम करना, जाँचना और समीक्षा करना, इस चक्र को तब तक दोहराता है जब तक काम पूरा न हो जाए, यूज़र उसे रोक न दे, या समय और संसाधन खत्म न हो जाएँ।
कब इस्तेमाल करें
- ✓जब किसी काम को पूरा होने में 30 मिनट से ज़्यादा लगने की उम्मीद हो।
- ✓जब यह जाँचने का साफ़ तरीका हो कि काम पूरा हुआ है या नहीं (जैसे टेस्ट पास हो जाएँ)।
- ✓जब प्रोजेक्ट पहले से ऑटोमेशन के लिए तैयार हो (टेस्ट और डॉक्यूमेंटेशन के साथ)।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/goal-loop/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमारे प्रोजेक्ट को Python 2 से Python 3 में माइग्रेट करने की योजना बनाओ, और ध्यान रखो कि सारे टेस्ट पास हों और public API जैसा है वैसा ही रहे।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट को काम का लक्ष्य, क्या नहीं बदलना है, प्रगति कैसे जाँचनी है और कब रुकना है, ये सब साफ़ निर्देश मिलते हैं। वह चरणों में काम करता है, अपने हर कदम की रिपोर्ट देता है, और तब तक चलता रहता है जब तक लक्ष्य पूरा न हो या इंसान की मदद की ज़रूरत न पड़े।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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.
…
अक्सर पूछे जाने वाले सवाल
'Ralph loop' क्या है?
यह उस प्रक्रिया का अंदरूनी नाम है जिसका इस्तेमाल `/goal` करता है: योजना बनाना, काम करना, टेस्ट करना, समीक्षा करना, और लक्ष्य पूरा होने तक इसे दोहराना।
क्या मैं `/goal` किसी भी काम के लिए इस्तेमाल कर सकता हूँ?
नहीं, यह लंबे और अच्छी तरह से परिभाषित कामों के लिए सबसे अच्छा है, जिनमें 'पूरा हुआ' की साफ़ कसौटी हो। खोजबीन वाले काम या ऐसे काम जिनका कोई तय अंत न हो, उनके लिए यह ठीक नहीं है।
'verifiable stop condition' क्या है?
यह एक साफ़ और वस्तुनिष्ठ नियम है जो बताता है कि काम कब खत्म हुआ, जैसे 'सारे टेस्ट पास हो गए' या 'कोड कवरेज X% तक पहुँच गया'। यानी कुछ ऐसा जिसे नापा जा सके।
जानकारी
लेखक का मूल विवरण
Draft and explain persistent goal-loop prompts for long-running agent work with clear stop conditions.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #4765
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।