npx skills add https://github.com/getpaseo/paseo --skill paseo-loop您正在将 /paseo-loop 设置为一个灵活的循环原语。
可以将其视为一个 while 循环:
用户参数: $ARGUMENTS
首先加载 Paseo 技能。它包含 paseo run、paseo send、paseo wait 及相关命令的 CLI 参考。
每个循环都包含以下部分:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
有两种目标模式:
self循环每次迭代都将提示发送回当前代理。当前代理由 $PASEO_AGENT_ID 标识。
在以下情况下使用 self:
new-agent循环每次迭代都会启动一个新的工作代理。
在以下情况下使用 new-agent:
验证器与目标是正交的:
如果存在验证器,它就是循环完成的最终判断依据。
根据用户的措辞推断默认值:
默认为:
target=selfsleep=<显式值或合理的默认值>max-time=1h默认为:
target=self原因:默认情况下,当用户要求保证时,不应信任同一个代理来判断其自身的完成情况。
默认为:
target=new-agent支持两者:
--max-iterations N--max-time DURATION当用户未指定限制时,对于开放式或轮询循环,至少使用一个限制条件。
每次迭代都应接收前一次的结果作为 <previous-iteration-result>。
这适用于所有情况:
reasonreason每个循环将状态持久化在:
~/.paseo/loops/<loop-id>/
target-prompt.md # 发送给自身或工作者的提示(可实时编辑)
verifier-prompt.md # 验证器提示(可实时编辑,可选)
last_reason.md # 用于反馈的最新原因
history.log # 每次迭代的记录
对提示文件的编辑将在下一次迭代时生效,无需重启循环。
循环实现在:
skills/paseo-loop/bin/loop.sh
| 标志 | 必需 | 默认值 | 描述 |
|---|---|---|---|
| `--target self | new-agent` | 否 | 推断 / 原始脚本中为 new-agent |
--target-prompt | 是* | — | 每次迭代给目标的提示 |
--target-prompt-file | 是* | — | 从文件读取目标提示 |
--worker | 否 | codex | new-agent 循环的工作代理 |
--agent-id | 否 | $PASEO_AGENT_ID | self 循环的现有代理 ID |
--verifier-prompt | 否* | — | 独立验证器的提示 |
--verifier-prompt-file | 否* | — | 从文件读取验证器提示 |
--verifier | 否 | claude/sonnet | 验证器代理 |
--name | 是 | — | 用于循环跟踪的名称前缀 |
--sleep | 否 | — | 迭代之间的延迟 |
--max-iterations | 否 | 无限制 | 迭代次数的硬性上限 |
--max-time | 否 | 无限制 | 总运行时间的硬性上限 |
--archive | 否 | 关闭 | 迭代后归档新创建的代理 |
--worktree | 否 | — | new-agent 循环的 worktree 名称 |
--thinking | 否 | medium | 工作者的思考级别 |
--target-prompt 或 --target-prompt-file 中的一个。最多提供 --verifier-prompt 或 --verifier-prompt-file 中的一个。target=self,无验证器当前代理必须返回结构化的 JSON:
{ "done": true, "reason": "..." }
适用于:
target=self,启用验证器当前代理执行工作。一个独立的验证器决定循环是否完成。
适用于:
target=new-agent,无验证器每次迭代都会启动一个新的工作者,并且它必须自行返回结构化的 JSON。
适用于:
target=new-agent,启用验证器每次迭代都会启动一个新的工作者。完成后,一个独立的验证器判断是否完成。
适用于:
解释:
target=selfsleep=2mmax-time示例:
skills/paseo-loop/bin/loop.sh \
--target self \
--target-prompt "检查 PR #42。审查 CI、审查评论和分支状态。出现问题即修复。仅当 PR 完全就绪且状态为绿色时,才返回 done=true 的 JSON。" \
--sleep 2m \
--max-time 1h \
--name babysit-pr-42
解释:
target=new-agent
worker=codex
sleep=2m
通常归档
skills/paseo-loop/bin/loop.sh
--target new-agent
--worker codex
--target-prompt "检查 PR #42。审查 CI、审查评论和分支状态。出现问题即修复。仅当 PR 完全就绪且状态为绿色时,才返回 done=true 的 JSON。"
--sleep 2m
--max-time 1h
--archive
--name babysit-pr-42
解释:
target=self
启用验证器
不休眠
skills/paseo-loop/bin/loop.sh
--target self
--target-prompt "运行测试套件,调查失败,并修复代码。在本次迭代中做出连贯的尝试后停止。"
--verifier-prompt "运行相关的测试套件。仅当所有测试通过时才返回 done=true。原因必须引用确切的命令和结果。"
--max-iterations 10
--name fix-tests
解释:
target=new-agent
启用验证器
通常使用 worktree
skills/paseo-loop/bin/loop.sh
--target new-agent
--worker codex
--target-prompt "运行测试套件,调查失败,修复代码,并为本次迭代将仓库保持在干净可验证的状态。"
--verifier-prompt "运行相关的测试套件。仅当所有测试通过时才返回 done=true。原因必须引用确切的命令和结果。"
--worktree fix-tests
--max-iterations 10
--name fix-tests
解释:
target=new-agent
worker codex
启用验证器
启用 worktree
skills/paseo-loop/bin/loop.sh
--target new-agent
--worker codex
--target-prompt "在此仓库中实现 issue #456。使用 issue 描述和周围代码作为上下文。每次迭代都取得增量进展,并留下清晰的更改证据。"
--verifier-prompt "验证 issue #456 是否完成。检查更改的文件,运行类型检查和相关测试,仅当实现满足 issue 要求且有证据时才返回 done=true。"
--worktree issue-456
--max-iterations 8
--max-time 2h
--name issue-456
$ARGUMENTS 中理解用户的意图target=self 或 target=new-agentskills/paseo-loop/bin/loop.sh目标提示必须:
如果没有验证器,目标提示必须指示目标以严格的 JSON 格式结束,匹配:
{ "done": boolean, "reason": "string" }
验证器提示应:
检查事实,而不是提供修复
引用命令、输出或文件证据
返回严格的 JSON,匹配:
{ "done": boolean, "reason": "string" }
目标提示可以指示工作者使用其他技能:
skills/paseo-loop/bin/loop.sh \
--target new-agent \
--target-prompt "如果卡住,请先使用 /committee,然后修复 provider list 的 bug。" \
--verifier-prompt "验证 provider list 是否正确渲染且类型检查通过。" \
--name provider-fix
每周安装
126
仓库
GitHub 星标
287
首次出现
10 天前
安全审计
安装于
amp126
gemini-cli126
github-copilot126
codex126
kimi-cli126
cursor126
You are setting up /paseo-loop as a flexible loop primitive.
Think of it like a while loop:
User's arguments: $ARGUMENTS
Load the Paseo skill first. It contains the CLI reference for paseo run, paseo send, paseo wait, and related commands.
Every loop has these parts:
There are two target modes:
selfThe loop sends the prompt back to the current agent each iteration. The current agent is identified by $PASEO_AGENT_ID.
Use self when:
new-agentThe loop launches a fresh worker agent each iteration.
Use new-agent when:
The verifier is orthogonal to the target:
If a verifier exists, it is the source of truth for loop completion.
Infer defaults from the user's phrasing:
Default to:
target=selfsleep=<explicit value or sensible default>max-time=1h if the user gives no bound and the task could run indefinitelyDefault to:
target=selfReason: by default, do not trust the same agent to judge its own completion when the user is asking for assurance.
Default to:
target=new-agentSupport both:
--max-iterations N--max-time DURATIONUse at least one bound for open-ended or polling loops when the user does not specify one.
Each iteration should receive the previous result as <previous-iteration-result>.
This applies in all cases:
reasonreasonEach loop persists state in:
~/.paseo/loops/<loop-id>/
target-prompt.md # prompt sent to self or worker (live-editable)
verifier-prompt.md # verifier prompt (live-editable, optional)
last_reason.md # latest reason used for feedback
history.log # per-iteration records
Edits to prompt files are picked up on the next iteration without restarting the loop.
The loop is implemented at:
skills/paseo-loop/bin/loop.sh
| Flag | Required | Default | Description |
|---|---|---|---|
| `--target self | new-agent` | No | inferred / new-agent in raw script |
--target-prompt | Yes* | — | Prompt given to the target each iteration |
--target-prompt-file | Yes* | — | Read the target prompt from a file |
--worker | No | codex |
--target-prompt or --target-prompt-file. Provide at most one of --verifier-prompt or --verifier-prompt-file.target=self, no verifierThe current agent must return structured JSON:
{ "done": true, "reason": "..." }
Use this for:
target=self, verifier enabledThe current agent does the work. A separate verifier decides whether the loop is done.
Use this for:
target=new-agent, no verifierA fresh worker launches each iteration and must return structured JSON itself.
Use this when:
target=new-agent, verifier enabledA fresh worker launches each iteration. After it finishes, a separate verifier judges completion.
Use this for:
Interpretation:
target=selfsleep=2mmax-time if none givenExample:
skills/paseo-loop/bin/loop.sh \
--target self \
--target-prompt "Check PR #42. Review CI, review comments, and branch status. Fix issues as they arise. Return JSON with done=true only when the PR is fully green and ready." \
--sleep 2m \
--max-time 1h \
--name babysit-pr-42
Interpretation:
target=new-agent
worker=codex
sleep=2m
usually archive
skills/paseo-loop/bin/loop.sh
--target new-agent
--worker codex
--target-prompt "Check PR #42. Review CI, review comments, and branch status. Fix issues as they arise. Return JSON with done=true only when the PR is fully green and ready."
--sleep 2m
--max-time 1h
--archive
--name babysit-pr-42
Interpretation:
target=self
verifier enabled
no sleep
skills/paseo-loop/bin/loop.sh
--target self
--target-prompt "Run the test suite, investigate failures, and fix the code. Stop after you have made a coherent attempt for this iteration."
--verifier-prompt "Run the relevant test suite. Return done=true only if all tests pass. Reason must cite the exact command and outcome."
--max-iterations 10
--name fix-tests
Interpretation:
target=new-agent
verifier enabled
often use a worktree
skills/paseo-loop/bin/loop.sh
--target new-agent
--worker codex
--target-prompt "Run the test suite, investigate failures, fix the code, and leave the repo in a clean verifiable state for this iteration."
--verifier-prompt "Run the relevant test suite. Return done=true only if all tests pass. Reason must cite the exact command and outcome."
--worktree fix-tests
--max-iterations 10
--name fix-tests
Interpretation:
target=new-agent
worker codex
verifier enabled
worktree enabled
skills/paseo-loop/bin/loop.sh
--target new-agent
--worker codex
--target-prompt "Implement issue #456 in this repo. Use the issue description and surrounding code as context. Make incremental progress each iteration and leave clear evidence of what changed."
--verifier-prompt "Verify issue #456 is complete. Check changed files, run typecheck and relevant tests, and return done=true only if the implementation meets the issue requirements with evidence."
--worktree issue-456
--max-iterations 8
--max-time 2h
--name issue-456
$ARGUMENTStarget=self or target=new-agentskills/paseo-loop/bin/loop.sh with the final argumentsThe target prompt must be:
If there is no verifier, the target prompt must instruct the target to end with strict JSON matching:
{ "done": boolean, "reason": "string" }
The verifier prompt should:
check facts, not offer fixes
cite commands, outputs, or file evidence
return strict JSON matching:
{ "done": boolean, "reason": "string" }
The target prompt can instruct the worker to use other skills:
skills/paseo-loop/bin/loop.sh \
--target new-agent \
--target-prompt "Use /committee first if you are stuck, then fix the provider list bug." \
--verifier-prompt "Verify the provider list renders correctly and typecheck passes." \
--name provider-fix
Weekly Installs
126
Repository
GitHub Stars
287
First Seen
10 days ago
Security Audits
Gen Agent Trust HubWarnSocketWarnSnykPass
Installed on
amp126
gemini-cli126
github-copilot126
codex126
kimi-cli126
cursor126
Azure RBAC 权限管理工具:查找最小角色、创建自定义角色与自动化分配
131,500 周安装
Worker agent for new-agent loops |
--agent-id | No | $PASEO_AGENT_ID | Existing agent id for self loops |
--verifier-prompt | No* | — | Prompt for an independent verifier |
--verifier-prompt-file | No* | — | Read verifier prompt from a file |
--verifier | No | claude/sonnet | Verifier agent |
--name | Yes | — | Name prefix for loop tracking |
--sleep | No | — | Delay between iterations |
--max-iterations | No | unlimited | Hard cap on iteration count |
--max-time | No | unlimited | Hard cap on total wall-clock runtime |
--archive | No | off | Archive newly created agents after iteration |
--worktree | No | — | Worktree name for new-agent loops |
--thinking | No | medium | Thinking level for worker |