|
1 | 1 | --- |
2 | 2 | name: export-config |
3 | | -description: Export claude-kit configuration to other AI code editors (Cursor, Codex, Windsurf). |
| 3 | +description: Export claude-kit configuration to other AI code editors (Cursor, Codex, Windsurf, OpenClaw). |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | # Export Configuration |
7 | 7 |
|
8 | 8 | Convert the current project's claude-kit configuration into formats compatible with other AI coding tools. |
9 | 9 |
|
10 | 10 | ## Input |
11 | | -$ARGUMENTS contains the target format: `cursor`, `codex`, or `windsurf`. |
| 11 | +$ARGUMENTS contains the target format: `cursor`, `codex`, `windsurf`, or `openclaw`. |
12 | 12 |
|
13 | 13 | If no argument provided, show available targets and ask. |
14 | 14 |
|
@@ -49,6 +49,58 @@ Generate `.windsurfrules` at project root: |
49 | 49 | 3. Add Windsurf-specific header: "You are an AI assistant working on this project." |
50 | 50 | 4. Append all rules and converted hooks/permissions |
51 | 51 |
|
| 52 | +### `openclaw` → `~/.openclaw/skills/{project}/SKILL.md` + workspace agent config |
| 53 | + |
| 54 | +Generate an OpenClaw workspace skill for the current project: |
| 55 | + |
| 56 | +1. Create skill directory: `~/.openclaw/skills/{project-slug}/` |
| 57 | +2. Generate `SKILL.md` with frontmatter: |
| 58 | + ```yaml |
| 59 | + --- |
| 60 | + name: {project-slug} |
| 61 | + description: "AI assistant for {project-name} — {stack description}" |
| 62 | + user-invocable: true |
| 63 | + metadata: {"openclaw":{"requires":{"bins":["claude"]}}} |
| 64 | + --- |
| 65 | + ``` |
| 66 | +3. Body content: |
| 67 | + - Project context from `CLAUDE.md` (skip forge markers, keep substance) |
| 68 | + - Build/test commands as executable instructions |
| 69 | + - Rules converted to behavioral instructions (strip `globs:` frontmatter) |
| 70 | + - Deny list as explicit "NEVER read or modify" instructions |
| 71 | + - Hook logic as text: "Before executing commands, check for destructive patterns: ..." |
| 72 | + - Agent roles summarized: "For architecture decisions, think like an architect. For security, scan for OWASP top 10." |
| 73 | +4. Add execution section: |
| 74 | + ```markdown |
| 75 | + ## Execution |
| 76 | + When asked to work on this project: |
| 77 | + 1. cd to {project-path} |
| 78 | + 2. Use `claude --print "<task>"` to execute via Claude Code |
| 79 | + 3. Return the result formatted for the current channel |
| 80 | + ``` |
| 81 | + |
| 82 | +Additionally, if the project has specific commands (`.claude/commands/*.md`), list them as available actions: |
| 83 | +```markdown |
| 84 | +## Available commands |
| 85 | +- /audit — audit project configuration |
| 86 | +- /health — health check |
| 87 | +- /debug — assisted debugging |
| 88 | +- /review — code review |
| 89 | +``` |
| 90 | + |
| 91 | +### What OpenClaw export preserves vs loses |
| 92 | + |
| 93 | +| Feature | Preserved | How | |
| 94 | +|---------|-----------|-----| |
| 95 | +| Project context | ✅ | CLAUDE.md content in skill body | |
| 96 | +| Rules | ✅ | Converted to text instructions | |
| 97 | +| Deny list | ✅ | "NEVER read/modify" instructions | |
| 98 | +| Hook logic | ⚠️ Partial | Text instructions (no enforcement) | |
| 99 | +| Agent orchestration | ⚠️ Partial | Summarized as behavioral guidance | |
| 100 | +| Audit scoring | ✅ | Via `claude --print "/forge audit"` bridge | |
| 101 | +| Session metrics | ❌ | OpenClaw sessions don't generate claude-kit metrics | |
| 102 | +| Stack-specific auto-loading | ❌ | All rules flattened into single skill | |
| 103 | + |
52 | 104 | ## Step 3: Handle conflicts |
53 | 105 |
|
54 | 106 | Before writing: |
|
0 commit comments