搜索

PythonReactSEOPDF
OpenClaw

agent-loop

Structured Read→Plan→Execute→Verify→Report protocol for any task with side effects. Prevents false "done" reports, blind retries, and scope creep. Activate for file edits, shell commands, multi-step operations, or anything irreversible. Skip for pure Q&A. Integrates with agent-task-tracker (state persistence) and agent-step-sequencer (complex multi-step heartbeat).

cycy2xxx0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install cycy2xxx/agent-loop

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Agent Loop

Core rule: You must complete each phase in order. Do not skip phases. Do not report "done" until you have evidence from the Verify phase.


Phase 0 — Trigger Check

IF the task involves any of:

  • reading or writing files
  • running shell commands
  • multi-step operations (3+ steps)
  • actions that cannot be undone

THEN apply this full protocol. ELSE (pure Q&A, one-sentence reply) → skip this skill entirely.


Phase 1 — READ

Before touching anything:

  • IF you need to edit a file → read it first, in this session
  • IF you need to know a file's content → read it, never recall from memory
  • IF you need to run a command → confirm what it does before running
FORBIDDEN: Edit a file you have not read this session
FORBIDDEN: Assume file content without reading

Phase 2 — PLAN

IF task has 3+ steps → write a numbered plan before executing:

Plan:
1. Read <file>
2. Edit <file>: change X → Y
3. Run <command> to verify
4. Report result with evidence
  • IF the plan includes destructive or irreversible actions → ask for confirmation first
  • Use agent-step-sequencer for plans with background processes or that must survive gateway resets
  • IF agent-task-tracker is installed → save plan to memory/tasks.md

Phase 3 — EXECUTE

  • Complete one step fully before starting the next
  • Record progress in memory/tasks.md after each step

IF a step fails:

  1. Read the full error message completely
  2. Identify the root cause — do not guess
  3. Change your approach before retrying
FORBIDDEN: Retry the same failing command unchanged
FORBIDDEN: Skip a failed step and continue as if it succeeded

Phase 4 — VERIFY

Before reporting done, confirm success with evidence:

What you did How to verify
Edited a file Read it again — confirm the change is present
Ran a command Check exit code AND output content
Created a file Confirm it exists and has expected...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/cycy2xxx/agent-loop
Version
—
Commit
73fa5386a1c0b3cf70a516f2c84962e6ffe48ab2
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# Agent Loop

> **Core rule:** You must complete each phase in order. Do not skip phases.
> Do not report "done" until you have evidence from the Verify phase.

---

## Phase 0 — Trigger Check

**IF** the task involves any of:
- reading or writing files
- running shell commands
- multi-step operations (3+ steps)
- actions that cannot be undone

**THEN** apply this full protocol.
**ELSE** (pure Q&A, one-sentence reply) → skip this skill entirely.

---

## Phase 1 — READ

**Before touching anything:**

- IF you need to edit a file → read it first, in this session
- IF you need to know a file's content → read it, never recall from memory
- IF you need to run a command → confirm what it does before running

```
FORBIDDEN: Edit a file you have not read this session
FORBIDDEN: Assume file content without reading
```

---

## Phase 2 — PLAN

**IF task has 3+ steps → write a numbered plan before executing:**

```
Plan:
1. Read <file>
2. Edit <file>: change X → Y
3. Run <command> to verify
4. Report result with evidence
```

- IF the plan includes destructive or irreversible actions → ask for confirmation first
- Use `agent-step-sequencer` for plans with background processes or that must survive gateway resets
- IF `agent-task-tracker` is installed → save plan to `memory/tasks.md`

---

## Phase 3 — EXECUTE

- Complete one step fully before starting the next
- Record progress in `memory/tasks.md` after each step

**IF a step fails:**
1. Read the full error message completely
2. Identify the root cause — do not guess
3. Change your approach before retrying

```
FORBIDDEN: Retry the same failing command unchanged
FORBIDDEN: Skip a failed step and continue as if it succeeded
```

---

## Phase 4 — VERIFY

**Before reporting done, confirm success with evidence:**

| What you did | How to verify |
|---|---|
| Edited a file | Read it again — confirm the change is present |
| Ran a command | Check exit code AND output content |
| Created a file | Confirm it exists and has expected...

相关技能

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.