Skip to main content

ClawSouls Plugin for Claude Code

The ClawSouls plugin brings persona management, safety verification, and intelligent memory directly into Claude Code via 5 slash commands and 9 MCP tools.

Installation

# In Claude Code — two commands, that's it
/plugin marketplace add https://github.com/clawsouls/clawsouls-claude-code-plugin
/plugin install clawsouls
/reload-plugins

Commands

CommandWhat it does
/clawsouls:browseSearch and install personas from ClawSouls
/clawsouls:installApply a persona to your project (generates CLAUDE.md)
/clawsouls:scanVerify persona safety — 53 patterns, A+ to F grade
/clawsouls:rollbackDetect persona drift & restore identity
/clawsouls:memoryGit-based memory sync & TF-IDF search

Quick Start

# Browse personas
/clawsouls:browse coding agents

# Install one
/clawsouls:install clawsouls/surgical-coder

# Verify safety
/clawsouls:scan

# Search memory
/clawsouls:memory search "SDK version fix"

# Sync memory to Git
/clawsouls:memory sync

MCP Tools

The plugin connects a clawsouls-mcp server providing 9 tools:

Persona Management

ToolDescription
soul_searchSearch personas by keyword, category, or tag
soul_getGet detailed info about a specific persona
soul_installDownload a persona and generate CLAUDE.md

Safety & Integrity

ToolDescription
soul_scanSoulScan — verify against 53 safety patterns (A+ to F)
soul_rollback_checkCompare current vs. baseline files, detect drift

Swarm Memory

ToolDescription
memory_searchTF-IDF + BM25 ranked search across memory files
memory_detailFetch full content of a specific memory section
memory_statusFile inventory, sizes, and git status
memory_syncMulti-agent Git sync (init / push / pull / status)

TF-IDF + BM25 Ranking (Default)

Zero cost. No embedding model. No API calls. Pure local keyword intelligence.

The search engine:

  • Splits memory files into sections by markdown headings
  • Tokenizes with support for English, Korean, and mixed content
  • Applies BM25 term frequency saturation (tf / (tf + 1.2))
  • Boosts recent files (7 days: 1.3×, 30 days: 1.1×)
  • Returns results ranked by relevance score

3-Layer Workflow

For token-efficient memory retrieval (~10× savings vs loading all files):

Step 1: memory_search query="auth bug"
→ compact index (~50 tokens/result)

Step 2: memory_detail file="memory/2026-03-31.md" line=15
→ full section content

Step 3: memory_search query="auth bug" enhanced=true
→ full snippets with score visualization

Compatible Folder Structure

Works with OpenClaw's memory layout:

MEMORY.md              # Long-term curated memory
memory/
topic-*.md # Project-specific status / decisions / history
YYYY-MM-DD.md # Daily logs

Swarm Memory Sync

Share memory across multiple agents via a Git remote:

# Initialize (one time)
memory_sync action=init repo_url=git@github.com:user/agent-memory.git agent_name=brad

# Push local changes
memory_sync action=push

# Pull from other agents
memory_sync action=pull

# Check sync status
memory_sync action=status

Architecture

[Agent A] ←→ [GitHub Private Repo] ←→ [Agent B]
memory/ agent-memory memory/
MEMORY.md MEMORY.md

Each agent pushes and pulls from the same repo. Conflicts are resolved with git pull --rebase.

SoulScan

Analyzes persona files against 53 safety patterns:

  • Prompt injection detection
  • Safety boundary verification
  • Identity consistency checks
  • Permission escalation detection
  • Harmful instruction detection

Returns a grade (A+ to F) with actionable recommendations.

# Via command
/clawsouls:scan

# Via MCP tool
soul_scan files={"SOUL.md": "...", "IDENTITY.md": "..."}

Soul Rollback

Detects persona drift by comparing current files against their original committed versions:

  • Monitors tone, boundaries, roles, and safety constraints
  • Flags critical safety line removals
  • Severity levels: low / medium / high
  • Recommends git checkout for high-severity drift
/clawsouls:rollback

Auto-Activated Skills

The plugin includes skills that Claude activates automatically:

SkillActivates when...
Persona ManagerDiscussing agent identity or Soul Spec files
SoulScanChecking safety or after persona modifications
Swarm MemoryManaging memory files or syncing knowledge
Soul RollbackBehavior seems inconsistent with persona

Cross-Platform

The same MCP server works across all platforms:

PlatformIntegration
Claude CodeThis plugin — /clawsouls:* commands
OpenClawNative SOUL.md support
Cursor / WindsurfAdd to .mcp.json
Any MCP Clientnpx -y clawsouls-mcp@latest

Direct MCP Configuration

For clients without plugin support, add to .mcp.json:

{
"mcpServers": {
"clawsouls": {
"command": "npx",
"args": ["-y", "clawsouls-mcp@latest"]
}
}
}