ARIA Skills Engine
ARIA - Technical

Skills Selection Engine

How ARIA autonomously discovers, evaluates, and imports capability-extending skills from the OpenClaw ecosystem — transforming a gap in knowledge into an active capability in seconds, without any human intervention.

How It Works

The Skills Selection Engine — informally called "ARIA React Tier 1" — enables ARIA to recognize when she lacks a capability, search for a matching skill from the OpenClaw community, and import it into her active prompt in a single conversation turn.

Step 1

Need Detection

ARIA encounters a task she cannot handle with existing tools or knowledge.

Step 2

Search ClawHub

Calls skill_search with a descriptive query against 13,000+ community skills.

Step 3

Review & Select

ARIA evaluates results by relevance, description, and tags. Picks the best match.

Step 4

Import & Activate

Calls skill_import. Skill is stored in DB and immediately injected into the system prompt.

User Request
"Can you help me with X?"
Gap Detected
No existing tool or skill
skill_search
Query ClawHub API
Evaluate Results
Semantic match scoring
skill_import
Fetch & store SKILL.md
Skill Active in System Prompt
ARIA can now follow the skill's instructions for the task
Zero-downtime capability extension. The entire flow — from detecting a gap to having an active skill — happens within a single conversation turn. No restarts, no deploys, no manual intervention. Skills become part of ARIA's system prompt immediately after import.

The OpenClaw Ecosystem

OpenClaw is the open-source AI agent platform powering the skill registry. ClawHub is its community skill marketplace — a curated, searchable index of 13,000+ skills contributed by developers worldwide.

🦖

OpenClaw Platform

An open-source AI agent framework with 247K+ GitHub stars. Provides the infrastructure for building, sharing, and deploying AI agent skills across platforms.

Open Source 247K+ Stars
📚

ClawHub Registry

The skill marketplace. 13,000+ community-contributed skills indexed with semantic vector search for natural language discovery. Each skill is a Markdown file with YAML frontmatter.

13,000+ Skills Vector Search
📄

SKILL.md Format

Skills are Markdown files with YAML frontmatter defining name, description, tags, and version. The body contains specialized instructions that extend an AI agent's capabilities.

Markdown YAML Frontmatter

SKILL.md Anatomy

--- name: "Advanced Data Visualization" description: "Create rich, interactive charts and graphs from structured data" tags: ["visualization", "charts", "data", "d3"] version: "2.1.0" --- # Advanced Data Visualization ## When to Use This Skill When the user asks you to create charts, graphs, or visual data representations... ## Instructions 1. Analyze the data structure and recommend the best chart type 2. Generate the visualization using D3.js conventions 3. Include accessibility attributes (aria-labels, descriptions) ...

ClawHub API

// Primary search endpoint — vector-based semantic search GET https://clawhub.ai/api/v1/skills?q=<query>&limit=N // Response shape { results: [ { name: "Advanced Data Visualization", description: "Create rich, interactive charts...", source_url: "https://clawhub.ai/skills/data-viz/SKILL.md", tags: ["visualization", "charts"], install: "skill_import URL" } ], total: 247 }
ARIA interacting with a holographic interface

Skill Architecture

Skills follow a simple but powerful lifecycle: import from a URL, store in the database, load into the system prompt, and optionally override built-in integration behavior. The architecture prioritizes immediacy — a skill is active the moment it's imported.

1
Import & Storage skills table

Skills are fetched from a URL (typically ClawHub or raw GitHub) and stored in the skills database table. Each record holds the skill's name, source_url, content (full Markdown body), is_active flag, and imported_at timestamp. Skills can be toggled on/off, refreshed from source, or removed entirely.

2
Prompt Injection formatSkillsForPrompt()

Active skills are loaded at the start of every chat request via formatSkillsForPrompt(). The function queries all rows where is_active = true, formats them as labeled Markdown sections, and injects them into the system prompt. Skills appear as dedicated instruction blocks that Claude treats as authoritative guidance for their domain.

3
Priority Override integration keyword matching

Skills can override built-in integration behavior. When a skill's content matches an integration keyword (e.g., "looki", "calendar", "gmail"), the prompt instructs Claude to "defer to the imported skill as your primary authority" for that domain. This allows community skills to supersede default instructions with more specialized or up-to-date guidance.

ColumnTypePurpose
id SERIAL PK Auto-incrementing primary key
name TEXT Human-readable skill name (extracted from YAML frontmatter or URL)
source_url TEXT Origin URL for the SKILL.md file (ClawHub, GitHub raw, or custom)
content TEXT Full Markdown content of the skill, injected verbatim into system prompt
is_active BOOLEAN Whether the skill is currently loaded into the prompt (default: true)
imported_at TIMESTAMPTZ When the skill was first imported
Skills are persona-independent. Unlike PRISM personas which shape ARIA's tone and behavior, skills are loaded regardless of which persona is active. A skill imported while using the "Professional" persona remains active when switching to "Casual." Skills extend capability; personas shape personality.

The skill_search Tool

The gateway to the OpenClaw ecosystem. When ARIA calls skill_search, it queries ClawHub's vector search API and falls back to GitHub code search if the primary API is unavailable. Results include ready-to-use import URLs.

Primary: ClawHub API

Vector-based semantic search across 13,000+ indexed skills. Returns results ranked by embedding similarity to the query.

● Endpoint: GET clawhub.ai/api/v1/skills
● Parameters: q (query), limit (max results)
● Timeout: 15 seconds
● Returns: name, description, source URL, tags, install command
Primary Semantic Search

Fallback: GitHub Code Search

If ClawHub API is unavailable or times out, falls back to searching the openclaw/skills repository via GitHub's code search API.

● Searches openclaw/skills repository
● Keyword-based (not semantic)
● Filters by filename:SKILL.md
● Constructs raw GitHub URLs for import
Keyword Search

Implementation

// src/lib/skill-tools.ts — searchClawHub() async function searchClawHub(query: string): Promise<SkillSearchResult[]> { try { // Primary: ClawHub vector search API (15s timeout) const response = await fetch( `https://clawhub.ai/api/v1/skills?q=${encodeURIComponent(query)}&limit=10`, { signal: AbortSignal.timeout(15000) } ); return response.json(); } catch (err) { // Fallback: GitHub code search on openclaw/skills repo return searchClawHubGitHub(query); } }

Search Result Shape

// Each result returned to ARIA { name: "Looki Memory Wearable", description: "Specialized instructions for Looki AI memory pendant...", source_url: "https://clawhub.ai/skills/looki-memory/SKILL.md", tags: ["wearable", "memory", "looki", "hardware"], install: "skill_import https://clawhub.ai/skills/looki-memory/SKILL.md" } // ARIA can immediately call skill_import with the source_url // to add the skill to her active prompt
Status feedback in the chat UI. When ARIA calls skill_search, the chat interface displays a status message: "Searching ClawHub for skills..." — giving the user visibility into what ARIA is doing while the API call is in flight. If no relevant skill is found, ARIA reports what she would need (a signal for future ARIA React Tier 2 development).

Skill Management Tools

ARIA has six tools for the complete skill lifecycle — from discovery through maintenance. All tools use the skill_* prefix and are registered in the chat route's tool dispatch.

🔍

skill_search

Search the ClawHub registry for skills matching a natural language query. Returns ranked results with install URLs.

skill_search({ query: "data visualization charts" })
📥

skill_import

Import a skill from a URL. Fetches the Markdown content, stores it in the skills table, and activates it immediately.

skill_import({ url: "https://clawhub.ai/skills/..." })
📋

skill_list

List all imported skills with their active/inactive status. Shows name, source, and import date for each skill.

skill_list({}) // Returns all imported skills
🔄

skill_toggle

Enable or disable a skill without removing it. Toggled-off skills remain in the database but are excluded from the system prompt.

skill_toggle({ name: "Looki Memory", active: false })
🗑

skill_remove

Permanently remove a skill from the database. The skill will no longer appear in listings or be available for reactivation.

skill_remove({ name: "Outdated Skill" })
🔄

skill_refresh

Re-fetch a skill's content from its original source URL. Updates the stored content to the latest version without changing activation state.

skill_refresh({ name: "Moltbook Social" })

Currently Active Skills

ARIA currently has two active imported skills. Each provides specialized domain knowledge that supplements or overrides built-in integration instructions.

🌐

Moltbook Social Network

Active

Provides ARIA with comprehensive instructions for interacting with the Moltbook social network — posting, engaging, managing identity, understanding platform conventions, and maintaining a consistent social presence.

Integration: social_* tools
Overrides: Built-in social network instructions
💎

Looki Memory

Active

Specialized instructions for the Looki AI memory wearable pendant — understanding memory captures, interpreting ambient context data, managing Rewind sessions, and correlating Looki data with other ARIA knowledge sources.

Integration: looki_* tools
Overrides: Built-in Looki instructions
Skill priority override in action. Because the Looki Memory skill matches the "looki" integration keyword, ARIA's system prompt includes the directive: "defer to the imported skill as your primary authority" for all Looki-related queries. The skill's more detailed instructions supersede the default built-in Looki integration section.

Integration with ARIA Platform

The Skills Engine is woven into ARIA's core systems — the prompt composition pipeline, the PRISM persona system, and the chat tool dispatch. Understanding how these pieces connect explains why skills can be so immediately effective.

System Prompt Base
Identity, personality, rules
+
PRISM Persona
Tone, behavior, style
+
Active Skills
formatSkillsForPrompt()
+
Context Window
Memory, calendar, etc.

skill_search
Discover new skills
skill_import
Fetch & store
skills table
Persistent storage
Next request
Skill in prompt

PRISM Persona System

Skills and personas are independent layers that compose together without conflict.

● Personas control tone and behavior
● Skills provide domain knowledge
● Both injected into system prompt
● Skills persist across persona switches
● No ordering dependency between them

Tool Dispatch

All skill_* tools are registered in chat/route.ts and dispatched by prefix.

skill_searchsearchClawHub()
skill_import ➔ fetch URL + INSERT
skill_list ➔ SELECT from skills
skill_toggle ➔ UPDATE is_active
skill_remove ➔ DELETE from skills
skill_refresh ➔ re-fetch + UPDATE content

Integration Keyword Override Logic

// When building the system prompt, skills matching integration keywords // get special treatment — they supersede the built-in section const integrationKeywords = [ "looki", "calendar", "gmail", "contacts", "twilio", "health", "homekit", "music", "photos", "reminders", "social", "notion" ]; // If a skill's content contains an integration keyword, // the prompt includes: // "Note: An imported skill provides specialized guidance for [integration]. // Defer to the imported skill as your primary authority."

Key Files & Entry Points

The Skills Engine is compact — the core logic lives in just a handful of files. Here is where each piece of the system is implemented.

FileResponsibilityKey Functions
src/lib/skill-tools.ts Tool definitions, skill CRUD, ClawHub search searchClawHub(), searchClawHubGitHub(), executeSkillTool()
src/app/api/chat/route.ts Tool registration and dispatch for skill_* prefix Tool dispatch switch case
src/lib/anthropic.ts System prompt composition, skill injection formatSkillsForPrompt(), buildSystemPrompt()
sql/005_skills.sql Database migration creating the skills table CREATE TABLE skills

Future: ARIA React Tier 2

When no OpenClaw skill exists for a capability gap and the need requires executable code rather than prompt instructions, ARIA React Tier 2 would enable autonomous tool building — researching patterns, designing tool specifications, generating code, and deploying new tools with an approval gate.

Detect

Gap Identified

No ClawHub skill matches. ARIA determines executable code is needed, not just instructions.

Research

Pattern Analysis

Study existing tools and integration patterns. Understand API conventions and data models.

Design

Tool Spec

Generate a complete tool specification: name, schema, description, implementation plan.

Build

Code + Test

Generate implementation code, write tests, validate against tool conventions.

Tool Proposal
Logged in tool_proposals table
Approval Gate
Human review required (initially)
Deploy
Tool becomes available

PIE Autonomy Level
High-autonomy PIE mode active
Auto-Approve Read-Only
Safe tools skip approval
Write Tools Need Review
Mutation tools always gated

Tier 1 vs Tier 2

AspectTier 1 (Current)Tier 2 (Future)
Output Markdown instructions Executable code
Source OpenClaw community Self-generated
Approval None needed Gate required
Risk Low (prompt only) Higher (code exec)
Status Live Planned

Safety Model

Tier 2 introduces a carefully layered safety model to manage the risk of autonomous code generation.

tool_proposals table logs all proposals
● Human approval required by default
● High-autonomy PIE mode can auto-approve read-only tools
● Write/mutation tools always require human review
● Generated code must pass tool convention linting
● Rollback mechanism for failed tools
🌱
The progression from Tier 1 to Tier 2 is deliberate. Tier 1 establishes the pattern: ARIA recognizes a gap and fills it. But Tier 1 is constrained to what the community has already built. Tier 2 removes that constraint — when ARIA needs something that doesn't exist anywhere, she can build it herself. The approval gate ensures this power is exercised responsibly.

Full System Architecture

User Request
No Matching Tool
Gap detected by Claude
skill_search
Query ClawHub
Semantic vector search across 13,000+ skills

skill_import
Fetch SKILL.md
skills table
Persistent storage
formatSkillsForPrompt()
Inject into system prompt
Active Capability
Ready to use

PRISM Persona
Active Skills
Core Memory
All compose together in system prompt
toggle
refresh
remove
Full lifecycle control
No skill found
Build custom tool
Autonomous tool generation (planned)