Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

init

БесплатноБез исполняемых скриптовНе проверен

Set up a minimal AGENTS.md (and optionally skills and hooks) for this repo. Use when the user asks to "initialize the project", "generate AGENTS.md", "set up…

Sivan757от Sivan757★ 23 звезды на GitHub

Об этом скилле

Set up a minimal AGENTS.md (and optionally skills and hooks) for this repo. AGENTS.md is loaded into every session, so it must be concise — only include what the agent would get wrong without it.

Phase 1: Ask what to set up

When the invocation names --local, --skills or --hooks, preselect the matching choice below instead of asking that question; otherwise ask both questions.

Use ask_user_question to find out what the user wants:

  • "Which AGENTS.md files should /init set up?" Options: "Project AGENTS.md" | "Personal AGENTS.local.md" | "Both project + personal" Description for project: "Team-shared instructions checked into source control — architecture, coding standards, common workflows." Description for personal: "Your private preferences for this project (gitignored, not shared) — your role, sandbox URLs, preferred test data, workflow quirks."

  • "Also set up skills and hooks?" Options: "Skills + hooks" | "Skills only" | "Hooks only" | "Neither, just AGENTS.md" Description for skills: "On-demand capabilities you or the agent invoke with /skill-name — good for repeatable workflows and reference knowledge." Description for hooks: "Deterministic shell commands that run on tool events (e.g., format after every edit). The agent can't skip them."

If an AGENTS.md already exists with content in this shape, read it first and ask whether to improve it in place as diffs or rewrite it.

Phase 2: Explore the codebase

Launch a subagent to survey the codebase, and ask it to read key files to understand the project: manifest files (package.json, Cargo.toml, pyproject.toml, go.mod, pom.xml, etc.), README, Makefile/build configs, CI config, existing AGENTS.md, assistant or editor rule files, .mcp.json.

Detect:

  • Build, test, and lint commands (especially non-standard ones)
  • Languages, frameworks, and package manager
  • Project structure (monorepo with workspaces, multi-module, or single project)
  • Code style rules that differ from language defaults
  • Non-obvious gotchas, required env vars, or workflow quirks
  • Existing .agents/skills/ directories and nested AGENTS.md files
  • Formatter configuration (prettier, biome, ruff, black, gofmt, rustfmt, or a unified format script like npm run format / make fmt)
  • Git worktree usage: run git worktree list to check if this repo has multiple worktrees (only relevant if the user wants a personal AGENTS.local.md)

Note what you could NOT figure out from code alone — these become interview questions.

Phase 3: Fill in the gaps

Use ask_user_question to gather what you still need to write good AGENTS.md files and skills. Ask only things the code can't answer.

If the user chose project AGENTS.md or both: ask about codebase practices — non-obvious commands, gotchas, branch/PR conventions, required env setup, testing quirks. Skip things already in README or obvious from manifest files. Do not mark any options as "recommended" — this is about how their team works, not best practices.

If the user chose personal AGENTS.local.md or both: ask about them, not the codebase. Do not mark any options as "recommended" — this is about their personal preferences, not best practices. Examples of questions:

  • What's their role on the team?
  • How familiar are they with this codebase and its languages/frameworks?
  • Do they have personal sandbox URLs, test accounts, API key paths, or local setup details the agent should know?
  • Only if Phase 2 found multiple git worktrees: ask whether their worktrees are nested inside the main repo or siblings/external. If nested, the upward file walk finds the main repo's AGENTS.local.md automatically — no special handling needed. If sibling/external, the personal content should live in a home-directory file (e.g., ~/.dsh/<project-name>-instructions.md) and each worktree gets a one-line AGENTS.local.md stub that imports it. Never put this import in the project AGENTS.md — that would check a personal reference into the team-shared file.
  • Any communication preferences? (e.g., "be terse", "always explain tradeoffs", "don't summarize at the end")

Synthesize a proposal from Phase 2 findings — e.g., format-on-edit if a formatter exists, a /verify skill if tests exist, an AGENTS.md note for anything from the gap-fill answers that's a guideline rather than a workflow. For each, pick the artifact type that fits, constrained by the Phase 1 skills+hooks choice:

  • Hook (stricter) — deterministic shell command on a tool event; the agent can't skip it. Fits mechanical, fast, per-edit steps: formatting, linting, running a quick test on the changed file.
  • Skill (on-demand) — you or the agent invoke /skill-name when you want it. Fits workflows that don't belong on every edit: deep verification, session reports, deploys.
  • AGENTS.md note (looser) — influences behavior but not enforced. Fits communication/thinking preferences: "plan before coding", "be terse", "explain tradeoffs".

**Respect Phase 1's skills+hoo

Полный SKILL.md на GitHub

Установить init в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл init?

Set up a minimal AGENTS.md (and optionally skills and hooks) for this repo. Use when the user asks to "initialize the project", "generate AGENTS.md", "set up project instructions", or runs /init.

Как установить скилл init?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл init запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить init с