Import existing AI tool configurations (from Claude, Copilot, or Cursor) into universal-ai-config templates. Converts target-specific files into universal templates.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Import existing AI tool configurations (from Claude, Copilot, or Cursor) into universal-ai-config templates. Converts target-specific files into universal templates.
argumentHint
[target: claude|copilot|cursor]
Import Existing AI Config
Convert existing target-specific AI configuration files into universal-ai-config templates. The user must specify which target to import from.
Usage
The user should specify the source target: claude, copilot, or cursor.
Import Process
1. Identify Source Files
Scan the target's config directory for existing configuration files:
Claude (.claude/):
Instructions: .claude/rules/*.md โ each file has description and optional paths frontmatter
Skills: .claude/skills/*/SKILL.md โ skill directories with frontmatter (name, description, allowed-tools, model, context, agent, disable-model-invocation, user-invocable, argument-hint, hooks). Skill directories may also contain extra supporting files (references, examples, scripts) alongside SKILL.md.
MCP: .mcp.json โ JSON with mcpServers wrapper containing server configs (type, command, args, env, url, headers)
Commands (deprecated): .claude/commands/*.md โ single-file slash commands with optional frontmatter (description, allowed-tools, argument-hint, model). May include subdirectories for namespacing (e.g. .claude/commands/frontend/component.md โ command name is component). Body may use $ARGUMENTS placeholder, ! prefix for bash execution, and @ prefix for file references.
Copilot (.github/):
Instructions: .github/copilot-instructions.md (always-apply) and .github/instructions/*.instructions.md (with applyTo frontmatter)
Skills: .github/skills/*/SKILL.md โ skill directories with frontmatter (name, description, license, compatibility, metadata). May contain extra supporting files alongside SKILL.md.
Hooks: .github/hooks/hooks.json โ JSON with version field and camelCase event names (sessionStart, sessionEnd, userPromptSubmitted, preToolUse, postToolUse, errorOccurred)
MCP: .vscode/mcp.json โ JSON with servers wrapper (not mcpServers), may include inputs array for interactive secret prompts
Cursor (.cursor/):
Instructions: .cursor/rules/*.mdc or .cursor/rules/*.md โ with description, globs, alwaysApply frontmatter
Skills: .cursor/skills/*/SKILL.md โ skill directories with frontmatter (name, description, license, compatibility, metadata, disable-model-invocation). May contain extra supporting files alongside SKILL.md.
Hooks: .cursor/hooks.json โ JSON with version field and camelCase event names (sessionStart, sessionEnd, beforeSubmitPrompt, preToolUse, postToolUse, postToolUseFailure, stop, subagentStart, subagentStop, preCompact, plus Cursor-specific events like beforeShellExecution, afterFileEdit)
MCP: .cursor/mcp.json โ JSON with mcpServers wrapper, omits type field (Cursor infers transport from command vs url)
Note: Cursor does not have agents
2. Convert to Universal Format
For each file found, convert it to a universal-ai-config template:
Cursor-specific events (e.g. beforeShellExecution, afterFileEdit) should be preserved as-is โ they pass through to Cursor and are dropped for other targets.
Hook handler field mapping:
Claude
Copilot
Cursor
Universal
command
bash
command
command
timeout
timeoutSec
timeout
timeout
matcher (in parent group)
โ
matcher
matcher
MCP server conversion (target-specific โ universal):
The universal MCP format uses mcpServers as the wrapper key, with each server having type, command, args, env, url, and headers fields.
Rename servers โ mcpServers, add type field if missing, copy inputs
Cursor .cursor/mcp.json
Copy mcpServers, add type: "stdio" for servers with command (Cursor omits it)
3. Write Universal Templates
For each converted file:
Use the same base name as the source file (e.g. .claude/rules/coding-style.md โ <%= instructionTemplatePath('coding-style') %>)
Write the universal frontmatter and body content. Copy and paste the body content, instead of trying to use EJS include() or something equivalent, because the source files will be deleted afterwards.
If a template with the same name already exists, overwrite it (the import represents the latest version)
Commands โ <%= skillTemplatePath('{name}') %> (commands convert to skills)
4. Handle Special Cases
Claude hooks: Extract the hooks key from .claude/settings.json. Flatten the nested matcher group structure into individual handlers with matcher fields.
Copilot always-apply: Convert .github/copilot-instructions.md to an instruction with alwaysApply: true.
Copilot hook bash field: Convert to universal command field.
Copilot hook timeoutSec field: Convert to universal timeout field (both use seconds).
Cursor .mdc files: Read as regular markdown (the .mdc extension is just a convention).
Copilot MCP servers key: Rename to mcpServers in the universal template.
Copilot MCP inputs array: Preserve as-is โ it's included in Copilot output only, ignored by Claude/Cursor.
Cursor MCP missing type: Add "type": "stdio" for servers with command, or "type": "sse" for servers with url.
MCP env var references: Leave ${ENV_VAR} syntax as-is โ it's passed through to generated output. If values look like they could be config variables, consider converting to {{varName}} syntax and adding a variables entry in the config file.
Fields that only exist for one target: Preserve them as-is. They'll be passed through to matching targets and ignored by others.
Skill extra files: When importing skill directories, copy all files in the directory โ not just SKILL.md. Extra files (references, examples, scripts, data) should be placed in the same relative paths within the universal template's skill directory (e.g. .claude/skills/my-skill/references/example.md โ <%= skillTemplatePath('my-skill') %>/../references/example.md, i.e. skills/my-skill/references/example.md in the templates dir). During generation, .md extra files are rendered through EJS (with access to target, config, path helpers), while non-.md files are copied as-is.
Claude commands โ skills: Commands are single .md files but skills are directories. Create a skill directory and place the converted command content as SKILL.md inside it. Use the filename (without .md) as the skill name.
Claude commands: disableAutoInvocation: Commands are manual-only (no auto-invocation by the AI). Set disableAutoInvocation: true on the converted skill to preserve this behavior.
Claude commands: namespaced subdirectories: Subdirectories in .claude/commands/ are organizational only โ they don't affect the command name. Use the filename as the skill name. If two commands from different subdirectories share a filename, disambiguate by prefixing with the subdirectory name (e.g. frontend-component).
Claude commands: rewrite body to agent-agnostic language: Command bodies use Claude-specific syntax that must be converted to plain, agent-agnostic instructions:
$ARGUMENTS โ Describe what input is expected. E.g., Fix issue #$ARGUMENTS becomes "The user will specify an issue number when invoking this skill. Fix the GitHub issue specified by the user."
!\command`(pre-executed bash) โ Convert to step-by-step instructions for the agent to run itself. E.g.,!`git status`becomes "Rungit status` to see current changes". The agent runs these as tool calls rather than having them pre-executed.
@filepath (file references) โ Convert to instructions to read those files. E.g., @src/utils/helpers.js becomes "Read the file src/utils/helpers.js".
Claude commands: personal commands: Personal commands from ~/.claude/commands/ are user-level, not project-level. Only import project commands (.claude/commands/) by default โ flag personal commands and ask the user whether to include them.
5. Verify
After importing, run uac generate targeting all configured targets and compare the generated output against the original source files to ensure the conversion is accurate.
Report to the user:
How many files were imported per type
Any files that couldn't be converted (with reasons)
Whether the generated output matches the originals