init
Set up agnostic-ai in a project by scaffolding the spec directories, picking target AI CLIs, and producing the first generated config. Use when a project has no .agnostic-ai/ directory yet.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 27
- Forks
- 6
01 前言 Front Matter
- name
- init
- description
- Set up agnostic-ai in a project by scaffolding the spec directories, picking target AI CLIs, and producing the first generated config. Use when a project has no .agnostic-ai/ directory yet.
03 SKILL.md 正文
init
Turns a project with no shared AI config into one where a single set of specs drives every tool.
Steps
-
Confirm the CLI is present:
agnostic-ai --version. If missing, run theinstallskill first. -
Check whether the project already has AI config worth keeping:
CLAUDE.md,AGENTS.md,GEMINI.md,.cursor/rules/,.github/copilot-instructions.md. If any exist, stop and use theimportskill instead; it captures them as specs rather than overwriting them. -
Scaffold:
agnostic-ai init --all # every target, no prompt agnostic-ai init --demo # plus example specs to start frominitalone opens a target picker when stdin is a TTY. In a non-interactive session, pass--allor pipe a list:echo "claude,codex" | agnostic-ai init. -
Ask which AI tools the team actually uses, then narrow
targets:inagnostic-ai.yamlto those. Fewer targets means fewer generated files to review. -
Write the project's real conventions as rules under
.agnostic-ai/rules/, one file per rule. Keep each rule to a single concern with adescriptionthat says when it applies. -
Run
agnostic-ai sync, then show the user what appeared withgit status --short.
Notes
initwritesgitignore.enabled: trueby default: generated files stay out of git and each contributor runssync. Pass--gitignore=falseto commit them instead, which suits a team where not everyone has the CLI.- One spec per file.
agnostic-ai new rule <name>(alsoagent,skill,hook,mcp) scaffolds the right frontmatter for the kind. - Never hand-edit a generated file such as
CLAUDE.mdor.cursor/rules/*.mdc. The nextsyncoverwrites it. Edit the spec under.agnostic-ai/instead.
04 同仓库更多 Skills
side-conversation
Start a side conversation in a new terminal tab, linked to this one. Use when asked to spin a task off, or to follow something up in its own conversation.
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.