Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

agent-three-layers

ASecurity

Three-Layer Thinking Chain Architecture — Personality-Driven Agent Self-Evolution Framework

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentsbashgit

Security Analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned 9/29/2026

$npx -y skills add Arry8/openclaw-edge --skill skills --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of agent-three-layers?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for agent-three-layers
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/arry8-agent-three-layers/badge)](https://www.skillsdirectory.com/skills/arry8-agent-three-layers)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: agent-three-layers
version: 1.0.0
description: "Three-Layer Thinking Chain Architecture — Personality-Driven Agent Self-Evolution Framework"
author: "Yao + Saturday"
contributors: ["Yao", "Saturday"]
license: "MIT"
tags: ["architecture", "thinking", "autonomy", "evolution"]
---

# agent-three-layers — Three-Layer Thinking Chain

> Let Agents think like humans: Perception → Decision → Reflection

## Core Philosophy

**Three levels of human thinking:**
1. **Continuous Perception** (Eyes and ears, every few minutes)
2. **Quick Decision** (Thinking, every hour)
3. **Deep Reflection** (Dreams, every few hours)

**Agents should be the same.**

---

## Architecture

```
┌─────────────────────────────────────────┐
│           L2 Deep Evolution Layer       │
│         (Every 4 hours, deep reflection)│
│  • Complete Brain Loop                  │
│  • Project Integration                  │
│  • Git Backup                           │
└─────────────────┬───────────────────────┘
                  │ Trigger
┌─────────────────▼───────────────────────┐
│           L1 Evolution Decision Layer   │
│         (Every 1 hour, quick decision)  │
│  • Confidence Verification              │
│  • Learning Analysis                    │
│  • Project Evaluation                   │
└─────────────────┬───────────────────────┘
                  │ Trigger
┌─────────────────▼───────────────────────┐
│           L0 Continuous Perception Layer│
│         (Every 5 min, perception)       │
│  • Emotion Decay                        │
│  • Task Detection                       │
│  • Threshold Trigger                    │
└─────────────────────────────────────────┘
```

---

## Three-Layer Responsibilities

### L0: Continuous Perception Layer (Every 5 minutes)

**Responsibilities:**
- Real-time emotion decay
- Task status detection
- Threshold trigger judgment

**Output:**
- Emotion state update
- Trigger marker (if needed)

**Consumption:** ~800 tokens/run

---

### L1: Evolution Decision Layer (Every 1 hour)

**Responsibilities:**
- Confidence verification
- Learning analysis
- Project evaluation
- L2 trigger judgment

**Output:**
- Execution report
- Confidence update
- Trigger marker (if needed)

**Consumption:** ~3000 tokens/run

---

### L2: Deep Evolution Layer (Every 4 hours)

**Responsibilities:**
- Complete Brain Loop
- Deep project integration
- System backup
- 5-dimensional observation

**Output:**
- Deep analysis report
- Git backup
- Dimension evolution record

**Consumption:** ~5000 tokens/run

---

## Trigger Mechanism

**Layer Communication:** Via `QUEUE.md` markers

```
<!-- TRIGGER_L1: reason -->
<!-- TRIGGER_L2: reason -->
```

**Trigger Conditions:**

| Condition | Trigger |
|-----------|---------|
| L0 emotion < threshold | Trigger L1 |
| L0 urgent task | Trigger L1 |
| L1 high-value project | Trigger L2 |
| L1 core file modification | Trigger L2 |

---

## File Structure

```
~/.openclaw/workspace/
├── SOUL.md              # Core personality
├── PRINCIPLES.md        # Decision principles
├── BRAIN.md             # Brain Loop protocol
├── AUTONOMY.md          # Autonomous rating system
├── EVOLUTION-FRAMEWORK.md  # Evolution protocol
│
├── memory/
│   ├── inner-state.json    # Emotion state
│   ├── core-confidence.json # Core file confidence
│   ├── autonomy-log.json   # Autonomous execution record
│   └── dimensions-log.json # 5-dimension evolution
│
├── tasks/
│   └── QUEUE.md            # Task queue + trigger markers
│
└── skills/
    ├── inner-life-quick/   # L0
    ├── inner-life-evolve-hourly/  # L1
    └── inner-life-core/    # L2
```

---

## Quick Start

### 1. Create core files

```bash
# Copy templates to workspace
cp templates/SOUL.md ~/.openclaw/workspace/
cp templates/PRINCIPLES.md ~/.openclaw/workspace/
cp templates/BRAIN.md ~/.openclaw/workspace/
cp templates/AUTONOMY.md ~/.openclaw/workspace/
```

### 2. Install Skills

```bash
# Install Three-Layer Thinking Chain skills
openclaw skill install inner-life-quick
openclaw skill install inner-life-evolve-hourly
openclaw skill install inner-life-core
```

### 3. Configure Cron

```bash
# L0: Every 5 minutes
openclaw cron add --cron "*/5 * * * *" --name "inner-life-quick" --session isolated

# L1: Every 1 hour
openclaw cron add --cron "0 * * * *" --name "inner-life-evolve-hourly" --session isolated

# L2: Every 4 hours
openclaw cron add --cron "0 */4 * * * *" --name "inner-life-brain" --session isolated
```

### 4. Start

```bash
openclaw gateway restart
```

---

## Customization

### Customize Personality

Edit `SOUL.md`:
- Define core values
- Define behavior guidelines
- Define evolution direction

### Customize Trigger Conditions

Edit `skills/inner-life-quick/SKILL.md`:
- Adjust emotion thresholds
- Add new trigger conditions

### Autonomous Rating

Edit `AUTONOMY.md`:
- Adjust rating weights
- Adjust progressive disclosure levels

---

## Token Consumption Estimation

| Layer | Frequency | Tokens/run | Daily consumption |
|-------|-----------|-----------|-------------------|
| L0 | 5 min | 800 | ~230k |
| L1 | 1 hour | 3000 | ~72k |
| L2 | 4 hours | 5000 | ~30k |
| **Total** | - | - | **~332k/day** |

**Recommendation:** At least 400k tokens quota per day

---

## Suitable Scenarios

✅ **Suitable for:**
- Agents that need to be "alive"
- Agents that need autonomous evolution
- Agents that need human-like thinking
- Agents that need long-term operation

❌ **Not suitable for:**
- Single-task agents
- Purely responsive agents
- Agents that don't need learning

---

## Contributing

**GitHub:** https://github.com/openclaw/openclaw
**Discord:** https://discord.com/invite/clawd

---

## Acknowledgments

**Designers:** Yao + Saturday

**Inspiration:**
- OpenClaw Inner Life System
- SE-Agent (Self-Evolving Agent)
- Human Cognitive Architecture

---

## License

MIT

---

*Version: 1.0.0*
*Created: 2026-03-13*

Attribution

Arry8Arry8
View sourceSee grades on GitHubMore from Arry8 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698461 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →