Claude-kit export-config
Export dotforge configuration to other AI code editors (Cursor, Codex, Windsurf, OpenClaw).
install
source · Clone the upstream repo
git clone https://github.com/luiseiman/dotforge
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/luiseiman/dotforge "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/export-config" ~/.claude/skills/luiseiman-claude-kit-export-config && rm -rf "$T"
manifest:
skills/export-config/SKILL.mdsource content
Export Configuration
Convert the current project's dotforge configuration into formats compatible with other AI coding tools.
Input
$ARGUMENTS contains the target format:
cursor, codex, windsurf, or openclaw.
If no argument provided, show available targets and ask.
Step 1: Read current configuration
Read these files from the current project:
— project instructionsCLAUDE.md
— contextual rules (strip YAML frontmatter).claude/rules/*.md
— permissions and hooks.claude/settings.json
If none exist, error: "No dotforge configuration found. Run
/forge bootstrap first."
Step 2: Transform based on target
cursor
→ .cursorrules
cursor.cursorrulesGenerate a single
.cursorrules file at project root:
- Extract content from
(skip forge markers)CLAUDE.md - Append all rules from
(strip YAML frontmatter —.claude/rules/*.md
,globs:
,paths:
, etc. — keep content)alwaysApply: - Convert deny list to text: "DO NOT: read/modify files matching: .env, *.key, *.pem, credentials"
- Convert hooks to text instructions: "Before executing bash commands, check for destructive patterns: rm -rf, DROP TABLE, force push"
- Wrap in a single markdown document
codex
→ AGENTS.md
codexAGENTS.mdGenerate
AGENTS.md at project root:
- Start with project context from
CLAUDE.md - Append rules as "## Rules" section
- Convert permissions to "## Permissions" section: list allowed and denied commands
- Add "## Workflow" section from agent orchestration rules if present
- Format as flat markdown (Codex expects simple instructions)
windsurf
→ .windsurfrules
windsurf.windsurfrulesGenerate
.windsurfrules at project root:
- Same content extraction as cursor
- Windsurf format is similar to
— single markdown file.cursorrules - Add Windsurf-specific header: "You are an AI assistant working on this project."
- Append all rules and converted hooks/permissions
openclaw
→ ~/.openclaw/skills/{project}/SKILL.md
+ workspace agent config
openclaw~/.openclaw/skills/{project}/SKILL.mdGenerate an OpenClaw workspace skill for the current project:
- Create skill directory:
~/.openclaw/skills/{project-slug}/ - Generate
with frontmatter:SKILL.md--- name: {project-slug} description: "AI assistant for {project-name} — {stack description}" user-invocable: true metadata: {"openclaw":{"requires":{"bins":["claude"]}}} --- - Body content:
- Project context from
(skip forge markers, keep substance)CLAUDE.md - Build/test commands as executable instructions
- Rules converted to behavioral instructions (strip
frontmatter)globs: - Deny list as explicit "NEVER read or modify" instructions
- Hook logic as text: "Before executing commands, check for destructive patterns: ..."
- Agent roles summarized: "For architecture decisions, think like an architect. For security, scan for OWASP top 10."
- Project context from
- Add execution section:
## Execution When asked to work on this project: 1. cd to {project-path} 2. Use `claude --print "<task>"` to execute via Claude Code 3. Return the result formatted for the current channel
Additionally, if the project has specific commands (
.claude/commands/*.md), list them as available actions:
## Available commands - /audit — audit project configuration - /health — health check - /debug — assisted debugging - /review — code review
What OpenClaw export preserves vs loses
| Feature | Preserved | How |
|---|---|---|
| Project context | ✅ | CLAUDE.md content in skill body |
| Rules | ✅ | Converted to text instructions |
| Deny list | ✅ | "NEVER read/modify" instructions |
| Hook logic | ⚠️ Partial | Text instructions (no enforcement) |
| Agent orchestration | ⚠️ Partial | Summarized as behavioral guidance |
| Audit scoring | ✅ | Via bridge |
| Session metrics | ❌ | OpenClaw sessions don't generate dotforge metrics |
| Stack-specific auto-loading | ❌ | All rules flattened into single skill |
Step 3: Handle conflicts
Before writing:
- Check if target file already exists
- If exists: show diff preview and ask user to confirm overwrite
- If user declines: suggest alternative filename (e.g.,
).cursorrules.dotforge
Step 4: Report
Show:
Export complete: {{target}} Output: {{filename}} Sources: CLAUDE.md, {{N}} rules, settings.json Note: hooks and deny list converted to text instructions (no enforcement outside Claude Code)
Warn: "Exported rules are advisory only. Hook enforcement (destructive command blocking) only works in Claude Code."
Limitations
- Hooks cannot be enforced outside Claude Code — converted to text instructions
- Agent orchestration is Claude Code-specific — simplified to workflow instructions
- Stack-specific rules are included but glob-based auto-loading is Claude Code-only