Token导航 LogoToken导航TokenDH.com
研究检索权限需确认github未标认证来源可访问许可证需确认审计通过

agent-loopAgent 循环

Agent Skill

agent-loop 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

682

周安装

29

GitHub Stars

55

下载量

239
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agent-loop(Agent 循环)
来源仓库:https://github.com/joelhooks/joelclaw
仓库路径:skills/agent-loop
安装命令:
npx skills add https://github.com/joelhooks/joelclaw --skill agent-loop
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/joelhooks/joelclaw --skill agent-loop

简介

agent-loop 用于 Agent 工作流的循环控制与优化。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中筛选相关实现方案。
  • 支持按任务类型或流程阶段定位候选策略。agent-loop 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 安装前建议确认权限范围和维护状态后再使用。
  • 可结合来源仓库和原始 README 进一步核验具体用法。

SKILL.md

Agent Loop

Run durable PLANNER→IMPLEMENTOR→REVIEWER→JUDGE coding loops via Inngest. Each story in a PRD gets independently implemented, tested, and judged. Survives crashes. Every step is a traceable Inngest run.

After starting a loop, use the loop-nanny skill for monitoring, triage, post-loop cleanup, and knowing when to intervene.

Quick Start

# Start a loop
joelclaw loop start --project /path/to/project --prd prd.json --max-retries 2

# Check status
joelclaw loop status [LOOP_ID]

# Cancel
joelclaw loop cancel LOOP_ID

The joelclaw CLI is the primary interface. Run with bun run packages/cli/src/cli.ts loop start... from the monorepo root.

PRD Format

Create a prd.json in the project root:

{
  "title": "Feature Name",
  "description": "What we're building",
  "stories": [
    {
      "id": "S1",
      "title": "Short title",
      "description": "What to implement. Be specific about files, patterns, behavior.",
      "acceptance_criteria": [
        "Criterion 1 — must be verifiable by automated test",
        "Criterion 2 — must be checkable by typecheck/lint"
      ],
      "priority": 1,
      "passes": false
    }
  ]
}

Story writing tips:

  • Acceptance criteria must be machine-verifiable (tests, typecheck, lint)
  • Lower priority number = runs first
  • Keep stories small and atomic — one concern per story
  • Include file paths in descriptions when possible
  • passes flips to true when JUDGE approves; skipped: true added on max retry exhaustion
  • Runtime preflight normalizes legacy aliases (acceptance, acceptanceCriteria) to acceptance_criteria, but malformed stories still fail fast with explicit schema errors — keep PRDs canonical.

Pipeline Flow

joelclaw loop start → agent/loop.start event
  → PLANNER reads prd.json, finds next unpassed story
    → IMPLEMENTOR spawns codex/claude/pi, commits changes
      → REVIEWER writes tests from acceptance criteria (independently — does NOT read implementation)
        → JUDGE: all green? → mark passed, next story
                 failing?   → retry with feedback (up to maxRetries)
                 exhausted? → skip, flag for human review, next story
  → All done → agent/loop.complete

progress.txt

Create a progress.txt in the project root with a ## Codebase Patterns section at the top. This is read by the implementor for project context and appended by the judge after each story. Defends against context loss across fresh agent instances.

## Codebase Patterns

- Runtime: Bun, not Node
- Tests: bun test
- Key files: src/index.ts, src/lib/...

## Progress

(stories will be appended here)

Infrastructure

  • Canonical source: ~/Code/joelhooks/joelclaw/packages/system-bus/ (monorepo)
  • Inngest functions: agent-loop-plan, agent-loop-implement, agent-loop-review, agent-loop-judge, agent-loop-complete, agent-loop-retro
  • Inngest server: k8s StatefulSet at localhost:8288
  • Loop --project target: Always use ~/Code/joelhooks/joelclaw/packages/system-bus (the monorepo).
  • Apply worker changes: ~/Code/joelhooks/joelclaw/k8s/publish-system-bus-worker.sh
  • Verify functions: joelclaw functions
  • View runs: joelclaw runs -c
  • Inspect a run: joelclaw run RUN_ID

Single-source deployment flow

The monorepo is the source of truth for loop function code. After loop-related function changes merge, deploy the worker from the monorepo:

  1. Run ~/Code/joelhooks/joelclaw/k8s/publish-system-bus-worker.sh
  2. Wait for rollout: kubectl -n joelclaw rollout status deployment/system-bus-worker --timeout=180s
  3. Refresh registration: joelclaw refresh

Event Schema

All events carry loopId for tracing. Key events:

EventPurpose
agent/loop.startKick off loop (loopId, project, prdPath, maxRetries, maxIterations)
agent/loop.planPlanner re-entry (find next story)
agent/loop.implementDispatch to implementor (storyId, tool, attempt, feedback?)
agent/loop.reviewDispatch to reviewer (storyId, commitSha, attempt)
agent/loop.judgeDispatch to judge (testResults, feedback, attempt)
agent/loop.completeLoop finished (summary, counts)
agent/loop.cancelStop the loop
agent/loop.story.passStory passed
agent/loop.story.failStory skipped after max retries

Tool Assignment

Default: codex for implementation, claude for review. Override per-story via toolAssignments in the start event:

{
  "toolAssignments": {
    "S1": { "implementor": "claude", "reviewer": "claude" },
    "S2": { "implementor": "codex", "reviewer": "pi" }
  }
}

Known Gotchas

  • Concurrency keys use CEL expressions (event.data.project), not {{}} templates
  • loop is reserved in CEL — don't use in concurrency key strings
  • Use explicit Codex permissions: codex exec --ask-for-approval never --sandbox danger-full-access PROMPT (no -q flag)
  • Worker changes require a k8s deploy (k8s/publish-system-bus-worker.sh)
  • Docker must be running for Inngest server (open -a OrbStack)
  • Large tool output uses claim-check pattern (written to /tmp/agent-loop/{loopId}/)

Logging

Every story attempt is logged via slog:

slog write --action "story-pass" --tool "agent-loop" --detail "Story title (ID) passed on attempt N" --reason "details"

Actions: story-pass, story-retry, story-skip, build-complete

Source Files

FilePurpose
~/Code/joelhooks/joelclaw/packages/system-bus/src/inngest/client.tsEvent type definitions
~/Code/joelhooks/joelclaw/packages/system-bus/src/inngest/functions/agent-loop/utils.tsPRD parsing, git, cancellation, claim-check
~/Code/joelhooks/joelclaw/packages/system-bus/src/inngest/functions/agent-loop/plan.tsPLANNER
~/Code/joelhooks/joelclaw/packages/system-bus/src/inngest/functions/agent-loop/implement.tsIMPLEMENTOR
~/Code/joelhooks/joelclaw/packages/system-bus/src/inngest/functions/agent-loop/review.tsREVIEWER
~/Code/joelhooks/joelclaw/packages/system-bus/src/inngest/functions/agent-loop/judge.tsJUDGE
~/Code/joelhooks/joelclaw/packages/system-bus/src/serve.tsWorker registration
~/Code/joelhooks/joelclaw/packages/cli/src/cli.tsjoelclaw CLI (loop subcommands)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.45%
按下载量换算78

Claude

31.76%
按下载量换算76

Cursor

16.95%
按下载量换算41

Gemini CLI

9.18%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills