import

A guide for copying an existing OpenClaw agent into the current project. OpenClaw is an agent system whose workspace stores an agent's identity and working setup.

In plain words
What is it for?
Use it to find an OpenClaw workspace, identify the agent, import it into the project, and continue configuring its related tools.
Why use it?
It avoids rebuilding an existing agent from scratch and accounts for workspaces stored in less common locations. After copying, it offers setup steps for search, messaging, and scheduled jobs.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/crisandrews/clawcode/import
Any agent
npx skills add crisandrews/ClawCode --skill import
Clone the repo
git clone --depth 1 https://github.com/crisandrews/ClawCode

Made for: Claude Code, Codex.

Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,565 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00043 $0.08565
Opus 5 $0.00022 $0.04283
Sonnet 5 $0.00009 $0.01713
Haiku 4.5 $0.00004 $0.00856

Measured 2d ago against content hash d3318f8ec800, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

import scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

"$HOME/.claude/settings.json" \
skills/import/SKILL.md · 669 lines

How it starts

The opening of the file, as written. The whole thing — 669 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Import an OpenClaw Agent

Import an existing agent from an OpenClaw installation into this directory, then offer the same setup steps a new agent gets (QMD, messaging, crons).

Part 1: Copy the agent

  1. Discover OpenClaw workspaces across plausible source locations. Users commonly run OpenClaw as root and then run ClawCode as a non-root user (e.g. inside an LXC where the service user is claude), so checking only ~/.openclaw misses those setups. Look in every readable root below and union the results:

    for root in \
      "${CLAWCODE_OPENCLAW_ROOT:-}" \
      "$HOME/.openclaw" \
      "/root/.openclaw"; do
      [[ -z "$root" ]] && continue
      [[ -r "$root" ]] || continue
      ls -d "$root"/workspace* 2>/dev/null
    done | sort -u
    

    Override the search roots with the CLAWCODE_OPENCLAW_ROOT env var when OpenClaw data lives in a non-standard location (e.g. a mounted volume).

    If the loop returns nothing, ask the user for an absolute path to the source workspace instead of silently falling back.

    For each workspace found, read IDENTITY.md to show the agent's name. Typical layouts:

    • <root>/workspace/ — default agent (main)
    • <root>/workspace-eva/ — agent "eva"
    • <root>/workspace-jack/ — agent "jack"
  2. Let the user choose which agent to import (or use argument if provided).

  3. Determine the source path: use the absolute path from the chosen workspace (e.g. /root/.openclaw/workspace-eva/ or /home/claude/.openclaw/workspace/). Do NOT re-expand ~ from an agent-id alone — the discovered path already carries the correct root.

  4. Copy bootstrap files to the current project root: Files to copy from the source workspace:

    • SOUL.md, IDENTITY.md, USER.md, AGENTS.md, TOOLS.md, HEARTBEAT.md

    Also copy CLAUDE.md from the plugin templates (NOT from OpenClaw):

    cp ${CLAUDE_PLUGIN_ROOT}/templates/CLAUDE.md ./
    
  5. Import memory (ask user first):

    • Copy MEMORY.md to ./memory/MEMORY.md
    • Copy recent memory files from memory/ (last 30 days by default, or all if user wants full history)
    • Create ./memory/.dreams/ directory with empty short-term-recall.json
    • NEVER copy files with credential, password, secret, .env in their name

Read the full file on GitHub · 669 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 669 lines · 43 tokens per session scan B d3318f8ec800

Subscribe to this mod's changes

import is a skill published in the GitHub repository crisandrews/ClawCode (62 stars, last pushed 2d ago), licensed MIT. It adds 43 tokens to every session and 8,565 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

proof-checker

Rigorous mathematical proof verification and fixing workflow. Reads a LaTeX proof, identifies gaps via cross-model review (external reviewer backend, ultra reasoning), fixes each gap with full derivations, re-reviews, and generates an audit report. Use when user says "检查证明", "verify proof", "proof check", "审证明"…

wanshuiyin/Auto-claude-code-research-in-sleep · 87 tokens

citation-audit

Zero-context verification that every bibliographic entry in the paper is real, correctly attributed, and used in a context the cited paper actually supports — catching hallucinated authors, wrong years, fabricated venues, version mismatches, and wrong-context citations. Use when user says "审查引用", "check citations"…

wanshuiyin/Auto-claude-code-research-in-sleep · 86 tokens

idea-creator

Generate and rank research ideas given a broad direction. Use when user says "找idea", "brainstorm ideas", "generate research ideas", "what can we work on", or wants to explore a research area for publishable directions.

wanshuiyin/Auto-claude-code-research-in-sleep · 51 tokens

paper-illustration

Generate publication-quality AI illustrations for academic papers using Gemini image generation. Creates architecture diagrams, method illustrations with Claude-supervised iterative refinement loop. Use when user says "生成图表", "画架构图", "AI绘图", "paper illustration", "generate diagram", or needs visual figures for papers.

wanshuiyin/Auto-claude-code-research-in-sleep · 67 tokens

idea-discovery

Workflow 1: Full idea discovery pipeline to go from a broad research direction to validated, pilot-tested ideas. Use when user says "找idea全流程", "idea discovery pipeline", "从零开始找方向", or wants the complete idea exploration workflow.

wanshuiyin/Auto-claude-code-research-in-sleep · 56 tokens

paper-illustration-image2

Generate publication-quality academic illustrations through a local Codex app-server bridge that uses Codex native image generation. This is a separate experimental alternative to paper-illustration, intended for Claude Code users who want a GPT-image-style renderer without modifying the original skill.

wanshuiyin/Auto-claude-code-research-in-sleep · 59 tokens