Awesome-omni-skill import-existing-ai-config
Import existing AI tool configurations (from Claude, Copilot, or Cursor) into universal-ai-config templates. Converts target-specific files into universal templates.
git clone https://github.com/diegosouzapw/awesome-omni-skill
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data-ai/import-existing-ai-config" ~/.claude/skills/diegosouzapw-awesome-omni-skill-import-existing-ai-config-e5e330 && rm -rf "$T"
skills/data-ai/import-existing-ai-config/SKILL.mdImport 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:
— each file has.claude/rules/*.md
and optionaldescription
frontmatterpaths - Skills:
— skill directories with frontmatter (.claude/skills/*/SKILL.md
,name
,description
,allowed-tools
,model
,context
,agent
,disable-model-invocation
,user-invocable
,argument-hint
). Skill directories may also contain extra supporting files (references, examples, scripts) alongsidehooks
.SKILL.md - Agents:
— agent files with frontmatter (.claude/agents/*.md
,name
,description
,tools
,disallowedTools
,permissionMode
,skills
,hooks
,memory
)model - Hooks:
→.claude/settings.json
key — JSON with PascalCase event names (hooks
,SessionStart
,SessionEnd
,UserPromptSubmit
,PreToolUse
,PostToolUse
,PostToolUseFailure
,Stop
,SubagentStart
,SubagentStop
,PreCompact
,PermissionRequest
)Notification - MCP:
— JSON with.mcp.json
wrapper containing server configs (mcpServers
,type
,command
,args
,env
,url
)headers - Commands (deprecated):
— single-file slash commands with optional frontmatter (.claude/commands/*.md
,description
,allowed-tools
,argument-hint
). May include subdirectories for namespacing (e.g.model
— command name is.claude/commands/frontend/component.md
). Body may usecomponent
placeholder,$ARGUMENTS
prefix for bash execution, and!
prefix for file references.@
Copilot (
.github/):
- Instructions:
(always-apply) and.github/copilot-instructions.md
(with.github/instructions/*.instructions.md
frontmatter)applyTo - Skills:
— skill directories with frontmatter (.github/skills/*/SKILL.md
,name
,description
,license
,compatibility
). May contain extra supporting files alongsidemetadata
.SKILL.md - Agents:
— agent files with frontmatter (.github/agents/*.agent.md
,name
,description
,tools
,model
,target
,mcp-servers
)handoffs - Hooks:
— JSON with version field and camelCase event names (.github/hooks/hooks.json
,sessionStart
,sessionEnd
,userPromptSubmitted
,preToolUse
,postToolUse
)errorOccurred - MCP:
— JSON with.vscode/mcp.json
wrapper (notservers
), may includemcpServers
array for interactive secret promptsinputs
Cursor (
.cursor/):
- Instructions:
or.cursor/rules/*.mdc
— with.cursor/rules/*.md
,description
,globs
frontmatteralwaysApply - Skills:
— skill directories with frontmatter (.cursor/skills/*/SKILL.md
,name
,description
,license
,compatibility
,metadata
). May contain extra supporting files alongsidedisable-model-invocation
.SKILL.md - Hooks:
— JSON with version field and camelCase event names (.cursor/hooks.json
,sessionStart
,sessionEnd
,beforeSubmitPrompt
,preToolUse
,postToolUse
,postToolUseFailure
,stop
,subagentStart
,subagentStop
, plus Cursor-specific events likepreCompact
,beforeShellExecution
)afterFileEdit - MCP:
— JSON with.cursor/mcp.json
wrapper, omitsmcpServers
field (Cursor infers transport fromtype
vscommand
)url - Note: Cursor does not have agents
2. Convert to Universal Format
For each file found, convert it to a universal-ai-config template:
Frontmatter mapping (target-specific → universal):
| Claude | Copilot | Cursor | Universal |
|---|---|---|---|
| | | |
| (no paths field) | (copilot-instructions.md) | | |
| — | | |
| — | — | |
| — | — | |
| — | — | |
| — | — | |
| — | — | |
| — | — | |
| (commands: manual-only) | — | — | |
| — | | — | |
| — | | | |
| — | | | |
| — | | | |
| — | | — | |
| — | | — | |
| — | | — | |
Hook event mapping (target-specific → universal):
| Claude | Copilot | Cursor | Universal |
|---|---|---|---|
| | | |
| | | |
| | | |
| | | |
| | | |
| — | | |
| — | | |
| — | | |
| — | | |
| — | | |
| — | — | |
| — | — | |
| — | | — | |
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 |
|---|---|---|---|
| | | |
| | | |
(in parent group) | — | | |
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.
| Source | Conversion |
|---|---|
Claude | Copy as-is (already matches universal format) |
Copilot | Rename → , add field if missing, copy |
Cursor | Copy , add for servers with (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
or something equivalent, because the source files will be deleted afterwards.include() - If a template with the same name already exists, overwrite it (the import represents the latest version)
File placement:
- Instructions →
<%= instructionTemplatePath('{name}') %> - Skills →
<%= skillTemplatePath('{name}') %> - Agents →
<%= agentTemplatePath('{name}') %> - Hooks →
<%= hookTemplatePath('{source-name}') %> - MCP →
<%= mcpTemplatePath('{source-name}') %> - Commands →
(commands convert to skills)<%= skillTemplatePath('{name}') %>
4. Handle Special Cases
- Claude hooks: Extract the
key fromhooks
. Flatten the nested matcher group structure into individual handlers with.claude/settings.json
fields.matcher - Copilot always-apply: Convert
to an instruction with.github/copilot-instructions.md
.alwaysApply: true - Copilot hook
field: Convert to universalbash
field.command - Copilot hook
field: Convert to universaltimeoutSec
field (both use seconds).timeout - Cursor
files: Read as regular markdown (the.mdc
extension is just a convention)..mdc - Copilot MCP
key: Rename toservers
in the universal template.mcpServers - Copilot MCP
array: Preserve as-is — it's included in Copilot output only, ignored by Claude/Cursor.inputs - Cursor MCP missing
: Addtype
for servers with"type": "stdio"
, orcommand
for servers with"type": "sse"
.url - MCP env var references: Leave
syntax as-is — it's passed through to generated output. If values look like they could be config variables, consider converting to${ENV_VAR}
syntax and adding a{{varName}}
entry in the config file.variables - 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
. Extra files (references, examples, scripts, data) should be placed in the same relative paths within the universal template's skill directory (e.g.SKILL.md
→.claude/skills/my-skill/references/example.md
, i.e.<%= skillTemplatePath('my-skill') %>/../references/example.md
in the templates dir). During generation,skills/my-skill/references/example.md
extra files are rendered through EJS (with access to.md
,target
, path helpers), while non-config
files are copied as-is..md - Claude commands → skills: Commands are single
files but skills are directories. Create a skill directory and place the converted command content as.md
inside it. Use the filename (withoutSKILL.md
) as the skill name..md - Claude commands:
: Commands are manual-only (no auto-invocation by the AI). SetdisableAutoInvocation
on the converted skill to preserve this behavior.disableAutoInvocation: true - Claude commands: namespaced subdirectories: Subdirectories in
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..claude/commands/
).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:
→ Describe what input is expected. E.g.,$ARGUMENTS
becomes "The user will specify an issue number when invoking this skill. Fix the GitHub issue specified by the user."Fix issue #$ARGUMENTS
command`!\
!`git status`(pre-executed bash) → Convert to step-by-step instructions for the agent to run itself. E.g.,
git status` to see current changes". The agent runs these as tool calls rather than having them pre-executed.becomes "Run
(file references) → Convert to instructions to read those files. E.g.,@filepath
becomes "Read the file@src/utils/helpers.js
".src/utils/helpers.js
- Claude commands: personal commands: Personal commands from
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..claude/commands/
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