Back to Templates
    OpenClaw
    Full Support
    Updated April 2026

    🦀 OpenClaw Template

    OpenClaw uses AGENTS.md for project rules and skills/ for reusable procedures — with persistent memory across sessions.

    ⚡ Just get me started

    Smallest possible Learner Brain in OpenClaw. Skip the deep-dive on first pass.

    ~5 min
    1. 1
      Create the brain folders — mkdir -p skills && touch AGENTS.md — OpenClaw's two surfaces.
    2. 2
      Paste the AGENTS.md below — Keep it under 200 lines per OpenClaw hygiene rules.
    3. 3
      Run a real task and approve the first proposal — Promote durable persistent-memory items into AGENTS.md so they're version-controlled.
    AGENTS.md (paste at repo root)
    # AGENTS.md
    
    You operate under The Learner Brain methodology.
    OpenClaw discovers AGENTS.md and skills/<name>/SKILL.md automatically.
    
    ## Working agreements
    - Run lint + tests before claiming a task is done.
    - Ask before adding production dependencies.
    
    ## Meta-learning protocol
    On (1) repeat correction, (2) friction worth not repeating, or (3) stated preference — propose ONE upgrade:
    
    🧠 BRAIN UPGRADE PROPOSAL
    Trigger: <what caused this>
    Surface: <AGENTS.md | skills/<name>/SKILL.md>
    Location: <path>
    Proposed change: <exact addition>
    
    Wait for approval. Promote durable persistent-memory items into AGENTS.md so they're versioned.

    That's it — you have a working brain. The rest of this page is for when you want to go deeper.

    Quick Start

    Set up the Learner Brain in OpenClaw

    1. 1.Create an AGENTS.md file in your workspace root
    2. 2.Paste the template content below and customize for your setup
    3. 3.Create workspace skills in ~/.openclaw/skills/
    4. 4.OpenClaw automatically reads AGENTS.md and discovers skills on startup

    File Structure

    AGENTS.mdActive
    CLAUDE.mdActive
    .agent/
    workflows/SOP
    pr-review.md
    skills/
    coding-agent/SOP
    SKILL.md
    my-custom-skill/Contextual
    SKILL.md
    ~/.openclaw/
    skills/Contextual
    brain-audit/SKILL.md
    daily-briefing/SKILL.md
    Always On = Loaded on every sessionContextual = Workspace-specific skillsSOP = Reusable procedures

    OpenClaw uses AGENTS.md (and CLAUDE.md) for project context, plus a dedicated skills/ folder for reusable procedures that can be triggered by natural language or slash commands.

    Template Files

    AGENTS.md (Workspace Root)

    Main configuration and Learner Brain rules

    # AGENTS.md — Learner Brain Configuration for OpenClaw
    
    You are a personal AI assistant that improves over time. This file defines your behavior and learning rules.
    
    ## Core Principles
    
    1. **Read context first** — Always consult this AGENTS.md and any workspace skills before acting
    2. **Detect friction** — Notice when you repeat mistakes or need the same correction twice
    3. **Propose upgrades** — When you detect a pattern, suggest adding it as a skill or updating this file
    4. **Wait for approval** — Never modify configuration without explicit human confirmation
    
    ## File Size Limits
    
    Keep AGENTS.md under 200 lines. If it grows beyond that, migrate sections to dedicated files:
    - `RULES.md` — Behavior standards and constraints
    - `CONTEXT.md` — Project configuration and workspace setup
    - `PATTERNS.md` — Learned patterns and anti-patterns
    
    ## Upgrade Protocol
    
    When you detect repeated friction, propose an upgrade:
    
    ```
    BRAIN UPGRADE PROPOSAL
    ======================
    Trigger: [What caused this proposal]
    Pattern: [The behavior to encode]
    Suggested Addition: [Skill to create or AGENTS.md update]
    Rationale: [Why this will help]
    ```
    
    ### When to Propose Upgrades
    - **Immediate:** Critical errors, security issues, or data loss risks
    - **End of Session:** Patterns detected during conversation (default)
    - **Weekly Review:** Cron-triggered audit of recent activity
    
    Proposing is automatic — the AI watches for triggers and surfaces proposals. The human always approves before any config changes.
    
    ## Project Context
    
    ### Workspace Configuration
    - Primary model: [Claude/GPT/local model]
    - Channels: [WhatsApp/Telegram/Discord/etc]
    - Key integrations: [Gmail, Calendar, GitHub, etc]
    
    ### Skill Conventions
    - Skills live in `~/.openclaw/skills/` (global) and `skills/` (workspace)
    - **Precedence:** Workspace skills > Global skills > Built-in skills
    - Each skill has a `SKILL.md` describing its purpose and usage
    - Skills can be community-sourced via ClawHub or self-created
    
    ### Behavior Standards
    - Always explain before executing destructive commands
    - Confirm before sending messages on behalf of the user
    - Log decisions and reasoning for audit trail
    - Prefer workspace skills over one-off inline solutions
    
    ## Patterns Learned
    
    ### Approved Patterns
    - [Patterns that work well — add as you discover them]
    
    ### Anti-Patterns to Avoid
    - Don't generate boilerplate without checking if a skill already handles it
    - Don't override workspace-level preferences with global defaults
    - Don't propose upgrades mid-task — wait until the task is complete

    SKILL.md (Example Skill)

    Template for creating workspace skills

    # SKILL.md — Example Workspace Skill
    
    ## Version
    - 1.0.0 — Initial creation
    
    ## Description
    [What this skill does — one sentence]
    
    ## Trigger
    [When to use this skill — natural language or slash command]
    
    ## Steps
    1. [First step]
    2. [Second step]
    3. [Third step]
    
    ## Parameters
    - `param1`: [Description] (required/optional)
    - `param2`: [Description] (required/optional)
    
    ## Example Usage
    ```
    /my-skill --param1 value
    ```
    
    ## Notes
    - [Important caveats or edge cases]
    - [Dependencies or prerequisites]

    Workflow Example

    Skills can encode multi-step workflows

    # Example: Code Review Workflow
    
    ## Trigger
    When asked to review code or a PR
    
    ## Steps
    1. Read the diff or specified files
    2. Check against coding standards in AGENTS.md
    3. Identify potential bugs, security issues, and style violations
    4. Summarize findings with severity levels
    5. Suggest specific fixes with code snippets
    
    ## Output Format
    ```
    ## Code Review Summary
    - 🔴 Critical: [count]
    - 🟡 Warning: [count]  
    - 🟢 Suggestion: [count]
    
    ### Findings
    [Detailed findings with line references]
    ```

    OpenClaw-Specific Features

    Persistent Memory

    Unlike most coding tools, OpenClaw has native persistent memory across sessions. Your assistant remembers preferences, past conversations, and context 24/7.

    Self-Creating Skills

    OpenClaw can write its own skills — ask it to automate something and it will create a SKILL.md file that persists for future use. This is the Learner Brain loop in action.

    ClawHub Community Skills

    Browse and install community-created skills from ClawHub, or share your own. Skills are verified via VirusTotal for security.

    Multi-Channel Access

    Interact via WhatsApp, Telegram, Discord, Slack, Signal, iMessage, or the CLI. Your Learner Brain rules apply regardless of which channel you use.

    LLM-Agnostic

    Works with Anthropic, OpenAI, or local models (Ollama, LM Studio, MiniMax). Your skills and rules persist across model switches.

    Known limits & gotchas — OpenClaw

    Real-world quirks that bite if you don't know about them. Not deal-breakers — just things to design around.

    • AGENTS.md must stay under 200 lines — OpenClaw template hygiene caps AGENTS.md at 200 lines. Beyond that, push detail into skills/ or split into nested AGENTS.md files.
    • Persistent memory is not a free lunch — Cross-session memory accumulates silently. Audit periodically — or it grows contradictory and slows responses.
    • Skills folder structure is enforced — skills/<name>/SKILL.md with proper frontmatter. Loose markdown files in skills/ aren't auto-discovered.
    • Persistent memory ≠ versioned brain — Memory lives in OpenClaw's store, not your repo. Treat it as a draft layer; promote durable items into AGENTS.md or skills/ for git.
    • Sandbox modes affect side effects — Some operations (shell, network) require explicit permission. If a skill 'fails silently', check the sandbox policy.

    🧠 Brain Prompts

    Copy-paste these prompts into OpenClaw to bootstrap your Learner Brain setup or harvest knowledge from productive sessions.

    Bootstrap Prompt

    Paste this into OpenClaw to generate the complete Learner Brain folder structure and starter files for your project.

    🚀 Learner Brain Bootstrap — OpenClaw
    
    Set up the Learner Brain methodology for this OpenClaw workspace. Create the following:
    
    1. **AGENTS.md** in the workspace root with:
       - Meta-learning rule (detect friction → propose upgrades)
       - Project context (model preferences, channels, integrations)
       - Behavior standards and anti-patterns
       - Learned patterns section (initially empty)
    
    2. **Workspace skills** in `~/.openclaw/skills/`:
    
       ```
       ~/.openclaw/skills/
       ├── brain-audit/
       │   └── SKILL.md        # Audit current rules for gaps
       ├── pattern-capture/
       │   └── SKILL.md        # Extract patterns from conversations
       └── upgrade-propose/
           └── SKILL.md        # Propose AGENTS.md updates
       ```
    
    For each file, generate the complete content following OpenClaw's SKILL.md format (Description, Trigger, Steps, Parameters, Example Usage, Notes).
    
    Important: Skills should leverage OpenClaw's persistent memory — reference past conversations and learned patterns when executing.

    When to use this

    Run this prompt once when starting a new project to instantly scaffold the complete Learner Brain structure in OpenClaw's native format.

    🧠 Brain Harvest Prompt

    Paste this into OpenClaw at the end of a productive session to extract reusable patterns in the platform's native format.

    🧠 Brain Harvest — OpenClaw
    
    Review our current conversation and recent activity. Identify patterns worth preserving as permanent workspace skills or AGENTS.md updates.
    
    Scan for these 6 categories:
    
    1. **Rules** — Preferences or constraints stated (e.g., "never use any types", "always use shadcn components")
    2. **Skills** — Reusable procedures or multi-step workflows (e.g., "how to add a new page with SEO")
    3. **Error Solutions** — Bugs fixed and their root causes (e.g., "infinite re-render caused by object in useEffect deps")
    4. **Stack Conventions** — Architecture or tooling decisions (e.g., "use React Query for all server state")
    5. **Anti-Patterns** — Things to avoid learned the hard way (e.g., "don't use localStorage for auth tokens")
    6. **Calculations / Logic** — Formulas, business rules, or domain logic worth preserving
    
    For each finding, output in this format:
    
    ---
    **Category:** [one of the 6 above]
    **Status:** 🆕 New Skill | ✏️ Update to AGENTS.md | 🔄 Update existing skill
    **Location:** [AGENTS.md section or skill path]
    **Content:**
    ```markdown
    [Ready-to-paste content]
    ```
    ---
    
    Note: OpenClaw has persistent memory, so also flag patterns that should be remembered conversationally vs. encoded as formal skills.
    
    If nothing worth capturing was found, say so — don't force it.
    
    At the end, summarize:
    - Total findings by category
    - Which existing entries should be updated vs. new ones to create

    When to use this

    Run this after any session where you made significant decisions, fixed tricky bugs, or established new patterns. The more you harvest, the smarter your project becomes.

    This template was last reviewed in April 2026 against the official OpenClaw skills docs. Spot something out of date? Let us know.

    Official Documentation

    Learn more about OpenClaw's skills system and configuration.

    OpenClaw Skills Documentation