原始内容
cc-openclaw
Claude Code skills for managing your OpenClaw deployment. These slash commands let you scaffold agents, configure channels, set up memory systems, manage secrets, and operate your gateway — all from within Claude Code.
What Are Claude Code Skills?
Claude Code skills are reusable playbooks that Claude Code auto-discovers from .claude/skills/ in your project. Each skill becomes a /slash-command you can invoke during a session. They encode best practices, configuration patterns, and operational procedures so you don't have to remember them.
Quick Start
Clone the repo and use GNU Stow to symlink the skills into your openclaw-home project:
git clone https://github.com/rahulsub-be/cc-openclaw.git ~/cc-openclaw
cd ~/cc-openclaw
stow --no-folding -t ~/your-openclaw-home-repo .
This creates symlinks from your openclaw-home's .claude/skills/openclaw-*/ pointing into the cc-openclaw repo. Only the .claude/ directory is stowed — README.md, LICENSE, and other repo files are excluded via .stow-local-ignore.
Open Claude Code in your openclaw-home directory and type /openclaw- to see all nine skills in autocomplete.
Updating
When skills get updates, pull the latest — symlinks mean changes take effect immediately:
cd ~/cc-openclaw
git pull
If new skills were added, re-run stow to create the new symlinks:
cd ~/cc-openclaw
stow --no-folding -t ~/your-openclaw-home-repo .
This is the same Git+Stow pattern used by OpenClaw itself for agent configuration.
Available Skills
| Skill | Command | Description |
|---|---|---|
| New Agent | /openclaw-new-agent <id> <name> |
Scaffold a complete agent with directory structure, 6 core .md files, and openclaw.json registration |
| Add Channel | /openclaw-add-channel <agent-id> <type> |
Connect Telegram, Slack, WhatsApp, or GChat to an agent with keychain secrets |
| Add Cron Job | /openclaw-add-cron <agent-id> |
Create scheduled tasks — recurring (cron), interval (every), or one-shot (at) |
| Status Check | /openclaw-status |
Health dashboard: gateway, channels, agents, cron jobs, and recent errors |
| Restart | /openclaw-restart |
Restart the gateway with automatic stow conflict resolution |
| Stow Deploy | /openclaw-stow |
Re-deploy config via GNU Stow, resolving the known jobs.json conflict |
| Add Secret | /openclaw-add-secret <service> <ENV_VAR> |
Store a secret in macOS Keychain and wire it into the secrets pipeline |
| Add Script | /openclaw-add-script <agent-id> <name> |
Scaffold a deterministic shell script with JSON output and error handling |
| Dream Setup | /openclaw-dream-setup <agent-id> |
Configure nightly memory distillation with cron job and archive pipeline |
Skills in Detail
/openclaw-new-agent
Creates a fully-configured agent from scratch:
- Directory structure (
memory/,scripts/,sessions/, etc.) - Six core directive files:
SOUL.md,IDENTITY.md,USER.md,AGENTS.md,TOOLS.md,SECURITY.md - Registration in
openclaw.json - Sub-agent wiring (if applicable)
- Stow deployment and gateway restart
/openclaw-add-channel
Handles the full channel setup pipeline per platform:
- Telegram: Bot token via BotFather, keychain storage, account + binding config
- Slack: Bot token + app token, socket mode setup
- WhatsApp: Phone number allowlist
- GChat: Binding configuration
All secrets go to macOS Keychain — never written to files.
/openclaw-add-cron
Interactive cron job builder supporting:
- cron: Standard cron expressions with timezone (
0 9 * * *) - every: Fixed intervals (
30m,1h) - at: One-shot execution at a specific time
- Agent turn payloads with configurable models and timeouts
- Isolated or main session targeting
/openclaw-status
One-command health check covering:
- Gateway process (health endpoint, launchd status)
- Channel connectivity (Telegram bots, Slack socket, WhatsApp)
- Agent count and bindings
- Cron job results (last run, errors, next scheduled)
- Recent error log entries
/openclaw-restart
Handles the restart correctly by:
- Resolving the known
jobs.jsonstow conflict (gateway overwrites the symlink) - Re-stowing config files
- Restarting via
launchctl kickstart - Verifying all channels reconnect
/openclaw-stow
Deploys config from your openclaw-home repo to $HOME via GNU Stow:
- Detects and resolves known conflicts (jobs.json)
- Verifies key symlinks after deployment
- Reports any unresolved conflicts
/openclaw-add-secret
Full secrets pipeline:
- Stores value in macOS Keychain (
openclaw.keychain-db) - Updates
openclaw-secrets.sh(for launchd/gateway) - Updates
openclaw-env.sh(for shell sessions) - Updates
secrets.sh(for provisioning on new machines)
/openclaw-add-script
Scaffolds deterministic shell scripts following production patterns:
set -euo pipefailwith structured error handlingjson-response.shshared library (log, json_success, json_error)- stdout is sacred: only JSON output
- stderr for logging via
log()function - Automatic TOOLS.md documentation
/openclaw-dream-setup
Configures nightly memory distillation:
DREAM-ROUTINE.mdwith distillation spec and token budgets- Cron job for nightly execution
- QMD memory index paths in openclaw.json
- Session startup sequence in AGENTS.md
- Archive pipeline for old distillations
Token budgets: 2,500/day per distillation, 7,500 rolling 3-day digest.
How It Works
All skills use automatic repo detection — no hardcoded paths:
OPENCLAW_REPO=$(readlink ~/.openclaw/openclaw.json 2>/dev/null | sed 's|/.openclaw/openclaw.json||')
This resolves your openclaw-home repo location by following the openclaw.json symlink that GNU Stow creates. Skills work regardless of where you've cloned your repo.
Prerequisites
- OpenClaw installed and configured
- Claude Code CLI
- GNU Stow (
brew install stow) - macOS (skills use
securityCLI for Keychain,launchctlfor service management)
Companion Playbooks
These skills are designed to work alongside the OpenClaw documentation playbooks covering:
- First Agent Setup
- Memory System (QMD + Dream Routines)
- Deterministic Scripts
- Sub-Agent Architecture
- Cron System
- Security Model
- Channel Configuration
- Stow-Based Deployment
- Monitor-DevBot Pattern
Each skill references its corresponding playbook for deeper context.
Contributing
PRs welcome. When adding a new skill:
- Create
.claude/skills/<skill-name>/SKILL.md - Use YAML frontmatter:
name,description,argument-hint,disable-model-invocation: true - Use
$OPENCLAW_REPOdetection — no hardcoded paths - Follow the step-by-step format with bash code blocks
- Include verification steps
- Update this README
License
MIT