Skip to content

Commit 4512f1c

Browse files
luiseimanclaude
andcommitted
feat: add OpenClaw as export target (/forge export openclaw)
Generates an OpenClaw workspace skill (SKILL.md) for the current project with project context, rules as text instructions, deny list, hook logic, and a claude CLI bridge for execution. Preserves project context and audit capabilities; hooks are advisory only. Updated forge.md dispatch, README (EN+ES), and both usage guides. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 88faabc commit 4512f1c

5 files changed

Lines changed: 62 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ All skills are invoked through the `/forge` command:
120120
| `/forge update` | Process practices: inbox → evaluate → incorporate |
121121
| `/forge watch` | Search for upstream changes in Anthropic docs |
122122
| `/forge scout` | Review curated repos for useful patterns |
123-
| `/forge export` | Export config to Cursor, Codex, or Windsurf format |
123+
| `/forge export` | Export config to Cursor, Codex, Windsurf, or OpenClaw format |
124124
| `/forge insights` | Analyze sessions for patterns and recommendations |
125125
| `/forge rule-check` | Detect inert rules by cross-referencing globs against git history |
126126
| `/forge benchmark` | Compare full config vs minimal config on standardized tasks |
@@ -319,7 +319,7 @@ Todos los skills se invocan a través del comando `/forge`:
319319
| `/forge update` | Procesar prácticas: inbox → evaluar → incorporar |
320320
| `/forge watch` | Buscar cambios upstream en la documentación de Anthropic |
321321
| `/forge scout` | Revisar repos curados en busca de patrones útiles |
322-
| `/forge export` | Exportar config a formato Cursor, Codex o Windsurf |
322+
| `/forge export` | Exportar config a formato Cursor, Codex, Windsurf u OpenClaw |
323323
| `/forge insights` | Analizar sesiones para patrones y recomendaciones |
324324
| `/forge rule-check` | Detectar reglas inertes cruzando globs contra historial de git |
325325
| `/forge benchmark` | Comparar config completa vs minimal en tareas estandarizadas |

docs/guia-uso.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ Borra `.claude/` y re-ejecuta bootstrap completo. Pero:
259259
| `/forge export cursor` | Exportar config a Cursor |
260260
| `/forge export codex` | Exportar config a Codex |
261261
| `/forge export windsurf` | Exportar config a Windsurf |
262+
| `/forge export openclaw` | Exportar config a OpenClaw |
262263

263264
### Comandos globales
264265

@@ -582,6 +583,7 @@ Ver `docs/creating-stacks.md` para detalles.
582583
/forge export cursor
583584
/forge export codex
584585
/forge export windsurf
586+
/forge export openclaw
585587
```
586588

587589
Los hooks se convierten a instrucciones textuales (sin enforcement fuera de Claude Code).

docs/usage-guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ Deletes `.claude/` and re-runs a full bootstrap. But:
259259
| `/forge export cursor` | Export config to Cursor |
260260
| `/forge export codex` | Export config to Codex |
261261
| `/forge export windsurf` | Export config to Windsurf |
262+
| `/forge export openclaw` | Export config to OpenClaw |
262263

263264
### Global commands
264265

@@ -584,6 +585,7 @@ See `docs/creating-stacks.md` for details.
584585
/forge export cursor
585586
/forge export codex
586587
/forge export windsurf
588+
/forge export openclaw
587589
```
588590

589591
Hooks are converted to textual instructions (no enforcement outside Claude Code).

global/commands/forge.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Agents: N/M instalados
7878
Commands: forge.md (symlink/archivo/falta)
7979
```
8080

81-
### `export <cursor|codex|windsurf>`
81+
### `export <cursor|codex|windsurf|openclaw>`
8282
Ejecutar el skill `/export-config` con el target especificado.
8383
Exporta la configuración claude-kit del proyecto actual a formato compatible con otra herramienta.
8484

@@ -175,7 +175,7 @@ Comandos:
175175
audit Auditar proyecto actual contra plantilla
176176
sync Sincronizar config contra plantilla
177177
bootstrap Inicializar .claude/ en proyecto nuevo [--profile minimal|standard|full]
178-
export Exportar config a cursor|codex|windsurf
178+
export Exportar config a cursor|codex|windsurf|openclaw
179179
diff Qué cambió desde último sync
180180
reset Restaurar .claude/ a plantilla (con backup)
181181
global sync Sincronizar ~/.claude/ contra plantilla global

skills/export-config/SKILL.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
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).
44
---
55

66
# Export Configuration
77

88
Convert the current project's claude-kit configuration into formats compatible with other AI coding tools.
99

1010
## Input
11-
$ARGUMENTS contains the target format: `cursor`, `codex`, or `windsurf`.
11+
$ARGUMENTS contains the target format: `cursor`, `codex`, `windsurf`, or `openclaw`.
1212

1313
If no argument provided, show available targets and ask.
1414

@@ -49,6 +49,58 @@ Generate `.windsurfrules` at project root:
4949
3. Add Windsurf-specific header: "You are an AI assistant working on this project."
5050
4. Append all rules and converted hooks/permissions
5151

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+
52104
## Step 3: Handle conflicts
53105

54106
Before writing:

0 commit comments

Comments
 (0)