How It Works

Architecture & Skills System

OpenClaw — AI-assisted Coding Community · February 2026

OpenClaw Demo

Architecture Overview

OpenClaw Architecture

Key insight: The LLM returns tool calls — the Gateway executes them locally. Your infra never talks to the LLM directly.

Message Flow

1. You send a message

"Scale redquiz to 3 replicas"

2. Gateway routes it

  • Authenticates the channel
  • Loads workspace context
  • Prepares system prompt

3. LLM reasons

  • Reads your request
  • Checks available skills
  • Decides what tools to call

4. Gateway executes tools

exec: kubectl scale 
  deployment/redquiz 
  --replicas=3

5. Results flow back

  • Gateway sends output → LLM
  • LLM summarizes
  • Gateway routes response

6. You see the result

"Done! Scaled redquiz to 3 replicas. Pods coming up now."

What the LLM Sees

Every message includes rich context automatically:

ContextSourcePurpose
AGENTS.mdYour workspaceHow to behave, memory rules
SOUL.mdYour workspacePersonality, tone, values
USER.mdYour workspaceWho you are, preferences
TOOLS.mdYour workspaceLocal secrets, server IPs, credentials
SkillsSystem + customAvailable capabilities
Memorymemory/*.mdConversation history, notes
This is why OpenClaw feels different: It's not starting from zero. It knows your infrastructure, your preferences, your tools.

Built-in Tools

These are always available — no configuration needed:

Core

  • exec — Run any shell command
  • read/write/edit — File operations
  • web_search — Brave Search API
  • web_fetch — Fetch URLs as markdown
  • browser — Browser automation

Memory

  • memory_search — Semantic search (via embeddings)
  • memory_get — Read memory files

Embeddings turn text into vectors that capture meaning — so "deployment decision" finds notes about "agreed to ship Friday".

Scheduling

  • cron — Schedule tasks, reminders
  • sessions_spawn — Background agents

Communication

  • message — Send to channels
  • tts — Text to speech
  • nodes — Mobile device control

Meta

  • gateway — Self-update, config
  • session_status — Usage stats

The Skills System

Skills teach the LLM how to use specific tools.

What's a Skill?

  • A markdown file (SKILL.md)
  • Documents a CLI or API
  • Includes usage examples
  • May bundle helper scripts

How It Works

  1. You ask about GitLab pipelines
  2. LLM sees "gitlab" skill exists
  3. LLM reads SKILL.md
  4. Now knows exact commands to run
Think of it as: Just-in-time documentation the LLM reads when it needs a specific capability.

Skill Discovery

The system prompt includes a skill index:

<available_skills>
  <skill>
    <name>gitlab</name>
    <description>GitLab CI/CD: pipelines, jobs, logs, artifacts.</description>
    <location>~/clawd/skills/gitlab/SKILL.md</location>
  </skill>
  <skill>
    <name>hetzner</name>
    <description>Hetzner Cloud: servers, metrics, firewall.</description>
    <location>~/clawd/skills/hetzner/SKILL.md</location>
  </skill>
  <skill>
    <name>weather</name>
    <description>Get current weather and forecasts.</description>
    <location>/opt/openclaw/skills/weather/SKILL.md</location>
  </skill>
  ...
</available_skills>

Rule: The LLM only reads a skill file when the task matches its description. Keeps context lean.

Why XML? LLMs are trained heavily on HTML/XML. They parse it reliably with clear start/end boundaries — fewer ambiguity errors than YAML or JSON. The token overhead is minimal compared to parsing reliability.

Anatomy of a Skill

skills/gitlab/
├── SKILL.md          # The documentation the LLM reads
└── gitlab-ci.sh      # Helper script (optional)

# SKILL.md structure:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# GitLab CI/CD Skill

## Overview
Query GitLab CI pipelines, jobs, and logs.

## Authentication
Token at: ~/.gitlab-token

## Commands

### List pipelines
```bash
./gitlab-ci.sh pipelines <project>
```

### Get job log
```bash
./gitlab-ci.sh log <project> <job-id>
```

## Examples
"Show me the latest pipeline for redquiz" →
  ./gitlab-ci.sh pipelines gutschilla/redquiz
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Where Skills Come From

SourceLocationExamples
Built-in /opt/openclaw/skills/ weather, web_search, himalaya (email)
Your workspace ~/clawd/skills/ gitlab, hetzner, k8s, inwx-dns
Community clawhub.com Shared skills (coming soon)

Creating a New Skill

  1. Create folder: ~/clawd/skills/my-tool/
  2. Write SKILL.md with commands and examples
  3. Optionally add wrapper scripts
  4. Done! The LLM will discover it automatically.
Pro tip: I created all my custom skills using the AI itself — didn't write a single line of code manually. Just described what I needed, and it wrote the SKILL.md and helper scripts. You can even version them in a separate repo.

Real Example: INWX Skill

Domain management with 2FA — from the demo:

# SKILL.md (excerpt)

## Authentication
- User: gutsch.it  
- Password: in TOOLS.md
- **2FA Required**: Ask user for OTP each time

## Commands

### List domains
```bash
INWX_USER="..." INWX_PASS="..." INWX_OTP=<code> \
  python3 ~/clawd/tools/inwx-dns/inwx-dns.py list
```

### Check domain expiry
```bash
... inwx-dns.py info <domain>
```

## Notes
- OTPs expire in ~30 seconds
- Always ask user for fresh OTP before API calls

Result: Claude knows it needs to ask for OTP, runs the command, parses the result.

The Magic Moment

"When do my production domains expire?"

The LLM's reasoning:

  1. User wants domain expiry info
  2. Need to know which domains → check k8s ingresses
  3. Need expiry dates → use INWX skill
  4. INWX needs 2FA → ask user for OTP
  5. Run query, parse results, flag risks

Cross-system correlation — that's not a script. It's reasoning about which tools to combine.

System Properties

Separation of Concerns

  • LLM = reasoning, planning
  • OpenClaw = routing, auth, execution
  • Skills = domain knowledge
  • Tools = actual capabilities

Context Efficiency

  • Skills loaded on-demand
  • Only relevant context injected
  • Memory is searchable, not dumped

Extensibility

  • Add a skill = add a markdown file
  • No code changes to OpenClaw
  • The LLM figures out the rest

Security Model

  • Tool execution runs locally (your machine)
  • LLM can be cloud (Claude, GPT) or local (Ollama)
  • You control what tools exist

Credential Storage

Risk: LLM sees tokens → prompt injection could exfiltrate

  • Plain text (TOOLS.md) — simple, fine for isolated setups
  • Wrapper scripts — inject secrets at runtime, LLM only sees the command
  • Keyring / secret manager — LLM can't read directly
  • Env vars — not in prompt context

Architecture Summary

LayerWhat It Does
ChannelsSignal, Telegram, Discord, Webchat, TUI — where you talk
GatewayRoutes messages, manages sessions, loads context
LLMReasons about your request, decides what tools to use
SkillsJust-in-time docs for specific tools
ExecutionShell commands, APIs, file operations — on your machine

The key insight:

Skills are just markdown. The LLM reads them when needed. You teach it new capabilities by writing documentation.

💡 The TUI is incredibly powerful on a big screen — full path completions, syntax highlighting, and you see the AI working in real-time.

Cost & Hardware

For real work, you need capable models — that's not free.

OptionCostNotes
Claude Pro $20/month Good for daily use, rate-limited
Claude Max $100+/month Heavy use, Opus 4.5 access
API (pay-as-you-go) ~$15/M tokens (Opus) Best quality, no rate limits
Local (Ollama) Hardware once RTX 3090 or Mac Mini M4 (~€2500)

Embeddings (for memory_search)

Semantic memory search requires an embedding model:

Reality check: Local models (even on beefy hardware) are faster but noticeably worse than Opus 4.5. I'm currently using Opus via API — the quality difference is real.

Outlook

What I'd love to try

Running OpenClaw on my company-provided Mac

Potential providers

Thanks!

Open for Questions

5:00

github.com/openclaw/openclaw