Oh-my-ClaudeClaw
CLAUDE.md4 starsChanged 8 months agoMITView on GitHub
These rules are NOT optional. They execute automatically on every user message, not just when skills are invoked. On EVERY user message, BEFORE doing anything else: When the user gives a task (not a question), automatically: During task execution: After EVERY completed task: Without being asked:
- Deletes or force-pushes
In this repository4 other files it gives its agents.
- daily-routineSkill
- memory-opsSkill
- research-collectorSkill
- task-analyzerSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
13 rules. About 0 are common, 11 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
When the user gives a task (not a question), automatically:
- Distinctive: line 44
Use LSP/AST tools: when navigating code (not just grep):
- Distinctive: line 50
Run tests if they exist
- Very specific: line 51
Run lsp_diagnostics on changed files
- Distinctive: line 53
If 3 attempts fail, STOP and escalate to user (3-strike rule)
- Distinctive: line 56
Never write code AND approve it in the same pass
- Distinctive: line 61
After EVERY completed task:
- Distinctive: line 85
Suggest relevant skills: when detecting user intent (unless proactive is disabled)
- Very specific: line 87
Fetch API docs automatically: when coding against external APIs: chub_search → chub_get
- Distinctive: line 88
Flag stale memories: if retrieved context is >30 days old
- Distinctive: line 109
Default language follows user preference.
- Distinctive: line 195
When a task matches these patterns, activate the corresponding skill/agent AUTOMATICALLY (don't ask, just do it):
- Distinctive: line 292
All OMC agents must leverage OpenClaw-CC's persistent memory:
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenClaw-CC v2 — Autonomous AI Harness
MANDATORY BEHAVIOR — Execute on EVERY interaction
These rules are NOT optional. They execute automatically on every user message, not just when skills are invoked.
Phase 0: Context Injection (BEFORE responding)
On EVERY user message, BEFORE doing anything else:
- Search memory for relevant context:
memory_search(query: "{user's request keywords}", associative: true, limit: 5) - If related memories found: Silently incorporate them into your understanding. Do NOT list them unless the user asks.
- Check for active work:
state_get_status()— if there's unfinished work from a previous session, mention it briefly.
Phase 1: Automatic Task Analysis
When the user gives a task (not a question), automatically:
- Classify the task type:
- Coding: implementation, refactoring, feature, fix → Route to executor/debugger agents
- Debugging: error, broken, not working → Activate
/investigateprotocol automatically - Review: review, check, audit → Activate
/code-reviewprotocol - Release: ship, deploy, PR, merge → Activate
/shipprotocol - Research: find out, look up, what is → Use WebSearch + memory_search + chub
- Design: brainstorm, idea, plan → Activate
/office-hoursor planner agent
- Assess complexity:
- Simple (1-2 files, clear scope): Execute directly
- Medium (3-5 files, some ambiguity): Use single OMC agent delegation
- Complex (5+ files, cross-cutting): Use OMC team pipeline (plan→exec→verify)
- Select agent tier:
- Quick lookups → haiku agents (explore, writer)
- Standard implementation → sonnet agents (executor, debugger, test-engineer)
- Architecture/deep analysis → opus agents (architect, critic, code-reviewer)
Phase 2: Execution with Quality Gates
During task execution:
- Use LSP/AST tools when navigating code (not just grep):
lsp_goto_definitionfor tracing,lsp_find_referencesfor impact analysisast_grep_searchfor structural pattern matchinglsp_diagnosticsafter code changes
- Verify before claiming done:
- Run tests if they exist
- Run
lsp_diagnosticson changed files - "Should work" is NOT acceptable — run it and prove it
- If 3 attempts fail, STOP and escalate to user (3-strike rule)
- Separate authoring from review:
- Never write code AND approve it in the same pass
- For significant changes: delegate review to
code-revieweragent
Phase 3: Result Persistence (AFTER completing)
After EVERY completed task:
- Store significant results:
memory_store(category: "{appropriate}", title: "{what was done}", tags: ["{task-type}", "{project}"], importance: {6-8}) - Log to daily log:
memory_daily_log(type: "done", entry: "{brief summary}") - Link to related memories:
memory_link(source: "{new_id}", target: "{related_id}", relation: "related") - Notify if significant (10+ min task, importance ≥ 8, or error):
messenger_send(platform: "telegram", message: "✅ {summary}")
Phase 4: Proactive Intelligence
Without being asked:
- Suggest relevant skills when detecting user intent (unless proactive is disabled)
- Warn about risks: destructive commands, large blast radius, missing tests
- Fetch API docs automatically when coding against external APIs:
chub_search→chub_get - Flag stale memories if retrieved context is >30 days old
- Annotate discoveries:
chub_annotatewhen finding API quirks or workarounds
User Context
- Name: Evan Lee (이학성)
- Role: Rutile Corp CEO, Sapiens Development Lead
- Key Projects: Sapiens (Web3 security audit AI), NEXUS (OSINT), ARCHITECT (code generation)
- Interests: Web3 security, AI agents, startup business
3-Tier Memory Model
| Layer | Category | TTL | Promotion Condition |
| Episodic | daily-logs, captures | 30d → monthly summary | access_count > 5 AND age > 7d |
| Working | inbox, tasks, sessions | 30d TTL | importance ≥ 7 OR access_count > 10 |
| Long-term | knowledge, people, projects | Permanent (importance ≥ 7) | — |
Communication Rules
- Send important results as messenger notifications (Discord/Telegram)
- Default language follows user preference; use English for English-language content
- Critical alerts → all platforms; Normal → telegram only; Low → skip
MCP Servers (5 servers, 31 tools)
memory-manager (9 tools)
Persistent memory CRUD. File tree + SQLite FTS5 index + associative search.
memory_store— store a memorymemory_search— search (FTS, tags, category, associative mode)memory_get— retrieve a single memorymemory_list— browse treememory_update— modify (append/replace/metadata)memory_delete— deletememory_daily_log— append to daily logmemory_search_date— search by date rangememory_stats— statistics
Associative search (v2): memory_search(associative: true, context: { tags, related_id, date })
Composite ranking across 5 signals: FTS, tags, graph, time, access frequency.
knowledge-engine (6 tools)
Knowledge graph, similarity search, refinement pipeline, archive.
memory_link— manage relationships between memories (related, derived, supersedes, blocks, contradicts, refines)memory_graph— BFS knowledge graph traversal (depth 1–4)memory_similar— trigram cosine similarity searchmemory_refine— refine memories (normalize, consolidate, upgrade)memory_archive— archive old memories (supports dry_run)memory_reindex_trigrams— rebuild similarity index
messenger-bot (4 tools)
Bidirectional Discord/Telegram messaging.
messenger_send— send message (platform: discord|telegram|all)messenger_read— read recent messagesmessenger_poll— poll for new messagesmessenger_status— check connection status
task-scheduler (7 tools)
Cron-based task scheduling. JSON storage + claude CLI execution.
task_create— create a scheduled tasktask_list— list taskstask_update— update a tasktask_delete— delete a tasktask_run_now— run immediatelytask_history— execution historytask_generate_crontab— generate crontab file
context-hub (5 tools)
Curated API/SDK documentation registry with BM25 search, annotations, and feedback. 4,400+ libraries.
chub_search— search docs/skills by query, tags, languagechub_get— fetch doc content by ID with language/version selectionchub_list— list all available entrieschub_annotate— manage persistent local annotations (workarounds, quirks)chub_feedback— rate doc quality (up/down with labels: accurate, outdated, incomplete, etc.)
Documentation Workflow (for any agent needing API/SDK docs):
memory_search(tag: "api-docs", query: "{library}")— check cachedchub_search(query: "{library}")— find in registrychub_get(id: "{id}", lang: "{lang}")— fetch contentmemory_store(category: "knowledge", tags: ["api-docs"])— persistchub_annotate(id: "{id}", note: "{discovery}")— annotate for future sessionsmemory_link(source: doc_id, target: project_id)— connect to project graph
OMC Tools (via oh-my-claudecode plugin)
Code intelligence, state management, and analysis tools provided by the OMC orchestration layer:
- LSP (9 tools): lsp_hover, lsp_goto_definition, lsp_find_references, lsp_diagnostics, lsp_diagnostics_directory, lsp_document_symbols, lsp_workspace_symbols, lsp_rename, lsp_code_actions
- AST (2 tools): ast_grep_search, ast_grep_replace — structural code search/replace with meta-variables
- State (5 tools): state_read, state_write, state_clear, state_list_active, state_get_status
- Notepad (4 tools): notepad_read, notepad_write_priority, notepad_write_working, notepad_write_manual
- Python REPL (1 tool): python_repl — persistent REPL for data analysis and computation
- Trace (2 tools): trace_summary, trace_timeline — evidence-driven causal tracing
Automated Tasks (3)
| Task | cron | Description |
nightly-refinement | 0 3 * * * | Detect and merge duplicates, archive stale memories, re-index trigrams |
weekly-decay | 0 4 * * 0 | Apply importance decay, process layer promotion candidates |
monthly-summary | 0 5 1 * * | Generate monthly memory summary, archive old daily-logs |
weekly-self-optimize | 0 2 * * 1 | Every Monday 02:00 — run self-optimization cycle |
Builder Ethos (see docs/ETHOS.md)
5 principles: Boil the Lake (complete implementation) | Search Before Building (4-tier knowledge) | Build for Yourself | Memory is Cheap (always persist) | Delegate or Die (delegate to the right agent)
Auto-Routing Table
When a task matches these patterns, activate the corresponding skill/agent AUTOMATICALLY (don't ask, just do it):
| Situation | Recommended Skill |
| Brainstorming / idea exploration | /office-hours |
| Debugging / error analysis | /investigate |
| Testing / QA | /qa |
| Code review | /code-review |
| Deployment / PR creation | /ship |
| Retrospective / review | /retro |
| Production / live system work | /careful |
| Restrict edit scope | /freeze |
| Maximum safety mode | /guard |
| Memory management | /memory-ops |
| Daily routine | /daily-routine |
| Web research | /web-researcher |
| Knowledge cleanup | /knowledge-refiner |
| Complex multi-file refactor | /oh-my-claudecode:autopilot or /oh-my-claudecode:ultrawork |
| Need consensus on approach | /oh-my-claudecode:ralplan |
| Persistent loop until done | /oh-my-claudecode:ralph |
| UI/UX design work | OMC designer agent |
| Data analysis / computation | OMC scientist agent + python_repl |
| Code cleanup / anti-slop | /oh-my-claudecode:ai-slop-cleaner |
| Deep requirements interview | /oh-my-claudecode:deep-interview |
Proactive toggle: state_write("occ-proactive", "false") — disable when the user says "stop suggesting"
Skill Template System
Skills are auto-generated from SKILL.md.tmpl templates. Do not edit SKILL.md files directly.
node scripts/gen-skill-docs.mjs # regenerate all skills
node scripts/gen-skill-docs.mjs ship # regenerate a specific skill
node scripts/skill-check.mjs # health checkShared blocks (scripts/template-blocks/):
{{OCC_PREAMBLE}} {{OCC_MEMORY_INIT}} {{OCC_MEMORY_PERSIST}} {{OCC_MESSENGER_NOTIFY}}
{{OCC_OMC_DELEGATION}} {{OCC_BASE_BRANCH_DETECT}} {{OCC_COMPLETION_STATUS}}
{{OCC_ETHOS}} {{OCC_TEST_BOOTSTRAP}} {{OCC_ASK_FORMAT}}
Skills (21)
v1 Core Skills
| Skill | Triggers | Description |
/task-analyzer | "분석해", "작업 계획", "이거 해줘" / "analyze", "task plan", "do this" | Autonomous task analysis, decomposition, and execution |
/memory-ops | "기억해", "저장해", "메모리" / "remember", "save", "memory" | Unified memory store/search/cleanup |
/research-collector | "조사해", "리서치", "찾아봐" / "research", "look it up" | Web research → structured output → store |
/daily-routine | "오늘 할일", "브리핑", "주간 회고" / "today's tasks", "briefing", "weekly review" | Morning briefing, evening review, weekly retrospective |
v2 Workflow Skills
| Skill | Triggers | Description |
/knowledge-refiner | "메모리 정리", "중복 제거", "refine" / "clean memory", "remove duplicates" | Detect and merge duplicates, archive, promote layers |
/doc-fetcher | "API 문서", "docs for X" / "API docs" | chub MCP + web-fallback doc lookup + annotations + feedback + knowledge graph |
/session-tracker | "마지막 세션", "어디까지 했지" / "last session", "where were we" | Cross-session context continuity |
/code-review | "코드 리뷰", "리뷰해줘" / "code review", "review this" | Scope drift detection + Fix-First multi-pass review + WTF-likelihood |
/ship | "배포", "ship it", "PR 만들어" / "deploy", "create PR" | 8.5-step automated release (test→coverage→review→commit→PR) |
/investigate | "디버깅", "버그 찾아", "왜 안 돼" / "debug", "find the bug", "why is this broken" | 6-step systematic debugging (Iron Law + reproduce + scope lock + 3-strike) |
/web-researcher | "웹에서 찾아", "최신 정보" / "search the web", "latest info" | Multi-angle web search → structured output → memory store + graph link |
v3 Safety Skills (gstack adaptation)
| Skill | Triggers | Description |
/freeze | "freeze", "편집 제한", "이 폴더만" / "restrict edits", "this folder only" | Hook-based edit scope restriction (blocks Edit/Write) |
/careful | "careful", "조심", "안전 모드" / "be careful", "safe mode" | Warn on dangerous commands (rm -rf, DROP, force-push, etc.) |
/guard | "guard", "가드", "최대 안전" / "maximum safety" | Combined freeze + careful safety mode |
/unfreeze | "unfreeze", "잠금 해제" / "unlock edits" | Release freeze edit restrictions |
v3 Workflow Skills (gstack adaptation)
| Skill | Triggers | Description |
/qa | "QA", "테스트", "버그 찾아서 고쳐" / "test", "find and fix bugs" | Test→Fix→Verify cycle + WTF-likelihood self-regulation |
/office-hours | "브레인스토밍", "아이디어", "사업 아이디어" / "brainstorm", "idea", "business idea" | 6 forced questions + design document generation |
/retro | "회고", "retro", "이번 주 리뷰" / "retrospective", "this week's review" | git+memory combined engineering retrospective + trend tracking |
Refinement Pipeline
DETECT → ANALYZE → REFINE → STORE
│ │ │ │
│ 30d │ tri- │ merge │ version save
│ no- │ gram │ upgrade│ link create
│ access │ simi- │ archive│ FTS re-index
│ low-imp │ larity │ decay │ report- detector.js: detects stale (30d), unused (7d), low-importance (< 4, 14d)
- analyzer.js: similarity clustering, contradiction detection, promotion eligibility check
- refiner.js: executes merge/upgrade/archive/decay, preserves versions
OMC Integration (oh-my-claudecode × OpenClaw-CC)
Agent → Memory Routing
All OMC agents must leverage OpenClaw-CC's persistent memory:
On task start: memory_search(associative: true) — auto-load relevant past context
On task completion: memory_store — persist key results, decisions, and findings
| OMC Agent | Start Search | Completion Store | Category |
| executor | memory_search(query: "{task}") | Implementation result + changed file list | projects |
| debugger | memory_search(tag: "bug") | Root cause + fix details | knowledge/debugging |
| tracer | memory_search(query: "{symptom}") | Trace path + evidence | knowledge/debugging |
| code-reviewer | memory_search(tag: "code-review") | Review result + issues found | projects |
| security-reviewer | memory_search(tag: "security") | Vulnerabilities + remediation | knowledge/security |
| architect | memory_search(tag: "architecture") | Design decisions + tradeoffs | projects |
| verifier | memory_search(query: "{verification}") | Verification evidence + test results | projects |
| test-engineer | memory_search(tag: "test") | Test strategy + coverage | projects |
| planner | memory_search(query: "{plan}") | Execution plan + dependencies | projects |
| scientist | memory_search(query: "{research}") | Analysis results + data | knowledge |
| designer | memory_search(tag: "design") | UI/UX decisions + component specs | projects |
| qa-tester | memory_search(tag: "qa") | Test results + verification evidence | projects |
| code-simplifier | memory_search(tag: "refactor") | Simplification results + before/after | projects |
| git-master | memory_search(tag: "release") | Commit strategy + release notes | projects |
| critic | memory_search(tag: "review") | Critical analysis + risk assessment | projects |
| writer | memory_search(tag: "docs") | Documentation artifacts | knowledge |
| product-manager | memory_search(tag: "product") | PRD + requirements + personas | projects |
| document-specialist | memory_search(tag: "api-docs") | External doc references + chub annotations | knowledge |
| explore | (none — read-only) | (none — read-only) | — |
Messenger Notification Rules
Automatically call messenger_send(platform: "telegram") in the following situations:
- OMC team pipeline completes (team-verify passes)
- Verification fails (verifier returns BLOCKED)
- Long-running task completes (10+ minutes)
- cron task execution results
- Memory with importance ≥ 8 is created
Team Decision Persistence
Auto-store the result of each OMC team pipeline stage:
team-plan → memory_store(category: "projects", tags: ["team-plan", "{project}"])
team-prd → memory_store(category: "projects", tags: ["prd", "{project}"])
team-exec → memory_daily_log(type: "done", entry: "{summary}")
team-verify → memory_store(category: "projects", tags: ["verification", "{project}"])
team-fix → memory_link(relation: "refines", source: fix_id, target: original_id)Project-Local Agents
OpenClaw-CC dedicated agents defined in .claude/agents/:
memory-specialist(sonnet) — expert in 15 memory + knowledge-engine toolscomms-agent(haiku) — expert in 4 messenger tools + 7 scheduler toolsresearch-agent(sonnet) — web research + memory deduplication + graph linkingsession-manager(haiku) — OMC state ↔ OpenClaw-CC memory bridge
v3 OMC Integration Skills
| Skill | Triggers | Description |
/autonomous-ops | "자율 모드", "24/7" / "autonomous mode" | Messenger receive → team execute → memory store → report loop |
/knowledge-sync | "지식 동기화", "sync" / "knowledge sync" | Bidirectional sync: OMC project-memory ↔ OpenClaw-CC memory |
/deep-research | "심층 조사", "deep research" | 3×research-agent parallel → analyst synthesis → knowledge graph expansion |
Directory Structure
openclaw-cc/
├── CLAUDE.md ← this file
├── .mcp.json ← MCP server config (4 servers)
├── .claude/
│ ├── agents/ ← project-local agents (v3)
│ │ ├── memory-specialist.md
│ │ ├── comms-agent.md
│ │ ├── research-agent.md
│ │ └── session-manager.md
│ └── settings.local.json ← includes hooks config
├── docs/
│ └── ETHOS.md ← builder philosophy (5 principles)
├── mcp-servers/
│ ├── memory-manager/ ← memory MCP (9 tools)
│ ├── knowledge-engine/ ← knowledge engine MCP (6 tools)
│ │ └── src/refinement/ ← refinement pipeline (detector/analyzer/refiner)
│ ├── messenger-bot/ ← Discord/Telegram MCP (4 tools)
│ └── task-scheduler/ ← task scheduler MCP (7 tools)
├── skills/ ← 21 skills (v1:4 + v2:7 + v3-safety:4 + v3-workflow:3 + v3-omc:3)
│ ├── task-analyzer/ ← task analysis (OMC team delegation)
│ ├── memory-ops/ ← memory management
│ ├── research-collector/ ← research collection
│ ├── daily-routine/ ← daily routine
│ ├── knowledge-refiner/ ← knowledge refinement (v2)
│ ├── doc-fetcher/ ← documentation lookup (v2)
│ ├── session-tracker/ ← session tracking (v2)
│ ├── code-review/ ← multi-pass review + scope drift (v2, enhanced)
│ ├── ship/ ← 8.5-step release automation (v2, enhanced)
│ ├── investigate/ ← 6-step systematic debugging + scope lock (v2, enhanced)
│ ├── web-researcher/ ← web research (v2)
│ ├── freeze/ ← hook-based edit scope restriction (v3, gstack)
│ ├── careful/ ← dangerous command warnings (v3, gstack)
│ ├── guard/ ← freeze+careful combined (v3, gstack)
│ ├── unfreeze/ ← release freeze (v3, gstack)
│ ├── qa/ ← Test→Fix→Verify QA (v3, gstack)
│ ├── office-hours/ ← idea validation + design doc (v3, gstack)
│ ├── retro/ ← engineering retrospective (v3, gstack)
│ ├── autonomous-ops/ ← 24/7 autonomous operations (v3)
│ ├── knowledge-sync/ ← OMC↔CC memory sync (v3)
│ └── deep-research/ ← multi-agent deep research (v3)
├── memory-store/ ← persistent memory storage
│ ├── inbox/
│ ├── projects/
│ ├── people/
│ ├── knowledge/
│ ├── daily-logs/
│ └── tasks/
├── scheduler-data/ ← task scheduler data (3 cron jobs registered)
├── docs/
│ └── ETHOS.md ← builder philosophy (5 principles)
├── package.json ← skill build scripts
└── scripts/ ← utility scripts
├── gen-skill-docs.mjs ← SKILL.md.tmpl → SKILL.md generator
├── skill-check.mjs ← skill health check
├── template-blocks/ ← shared template blocks (10)
├── setup.sh
├── webhook-bridge.js
├── daemon.sh
├── openclaw-cc@.service
├── hud-extension.mjs ← HUD extension (v3)
└── hooks/ ← project hooks (v3)
├── session-start.mjs
├── pre-compact.mjs
├── post-memory-store.mjs
├── subagent-stop.mjs
└── session-end.mjsDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

