import
Adopt a project's existing AI config (CLAUDE.md, AGENTS.md, .cursor/rules, and friends) into agnostic-ai specs, then fan it out to every other tool. Use when the project already has config for one AI CLI and should feed the rest.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 27
- Forks
- 6
01 前言 Front Matter
- name
- import
- description
- Adopt a project's existing AI config (CLAUDE.md, AGENTS.md, .cursor/rules, and friends) into agnostic-ai specs, then fan it out to every other tool. Use when the project already has config for one AI CLI and should feed the rest.
03 SKILL.md 正文
import
Captures what one tool already knows and makes it drive all of them, without retyping the conventions.
Steps
-
Confirm the CLI is present:
agnostic-ai --version. If missing, run theinstallskill first. -
Inventory what exists. Check for
CLAUDE.md,AGENTS.md,GEMINI.md,CONVENTIONS.md,.cursor/rules/,.clinerules/,.devin/rules/,.continue/rules/,.github/copilot-instructions.md, and any.claude/{agents,skills,settings.json}. -
Scaffold the config if absent:
agnostic-ai init. -
Import each source you found, one command per tool:
agnostic-ai import claude # CLAUDE.md + .claude/{agents,skills,settings.json} agnostic-ai import codex # AGENTS.md, root and nested agnostic-ai import cursor # .cursor/rules/*.mdc agnostic-ai import cline # .clinerules/, .cline/agents/ agnostic-ai import windsurf # .devin/rules/ agnostic-ai import continue # .continue/rules/importwrites spec files only. It never editstargets:or the rest of the config. -
Commit the import before syncing, then sync as its own commit:
git add .agnostic-ai/ agnostic-ai.yaml git commit -m "chore(agnostic-ai): import existing config" agnostic-ai sync git add -A git commit -m "chore(agnostic-ai): regenerate per-target configs"Splitting them keeps the review honest: the first commit carries the real content, the second is mechanical (headers, key order) and can be skimmed.
-
Read the imported specs with the user. An imported rule often mixes several concerns because it came from one long file; split it into one file per rule so scoping and per-target emission work properly.
Notes
- Importing from several tools: run each
importand its commit before the finalsync. - Round-trip is byte-stable:
importstrips the generated markers it wrote, so a latersyncproduces the same bytes. - What
importdoes not capture: helper scripts referenced fromsettings.json,statusline.sh, and ad-hoc config files. Keep those in git next to.agnostic-ai/. Files bundled inside a skill directory do round-trip.
04 同仓库更多 Skills
release
Cut a release and verify it. Use only when asked to release.
sample-skill
A sample skill for golden snapshot tests.
sample-command
A sample command for golden snapshot tests.
sample-skill
A sample skill for golden snapshot tests.
sample-command
A sample command for golden snapshot tests.
sample-skill
A sample skill for golden snapshot tests.