/init
Analyze the current project with the /init prompt of another coding agent and write AGENTS.md. Works in Pi, DSH, Cline, Grok Build, goose and Aider.
Usage
The three agents take the same arguments:
/init # use the default preset (DSH opens the preset list first)
/init kimi-code # use the kimi-code preset
/init opencode focus on the test workflow # use the opencode preset and append an extra prompt
/init write in Chinese # if the first word is not a preset name, the whole line is the extra prompt and the default preset is usedPick a preset in DSH
In the / menu of DSH, /init is in the Commands section with the title Init.
Pick Init in the menu, or type only /init and press Enter, to open the preset list.
The default preset has a check mark and is already highlighted. Type to filter the presets. Custom presets are listed in their own Custom group.
Press Enter to run the highlighted preset.
To give a preset name or an extra prompt, type a space after /init and continue, as shown in the Pi, DSH and Cline tab. Subagent sessions have no /init.
Presets
.github/workflows/sync-init-prompts.yml updates the presets synced from upstream once a day:
| Preset | Upstream | License |
|---|---|---|
codex (default) | openai/codex | Apache-2.0 |
kimi-code | MoonshotAI/kimi-code | MIT |
opencode | anomalyco/opencode | MIT |
crush | charmbracelet/crush | FSL-1.1-MIT |
copilot | microsoft/vscode | MIT |
qwen-code | QwenLM/qwen-code | Apache-2.0 |
kilo-code | Kilo-Org/kilocode | MIT |
Presets maintained by hand:
| Preset | Source |
|---|---|
claude-code | /init from Claude Code v2.1.306 (classic) |
claude-code-init-new | /init from Claude Code v2.1.306 (multi-phase) |
All presets except copilot and claude-code-init-new write AGENTS.md.
copilotkeeps the upstream VS Code behavior: it prefersAGENTS.md, updates an existingAGENTS.mdor.github/copilot-instructions.mdinstead of creating a new file, and can also create skills and custom agents.claude-code-init-newfirst asks what to set up. It can write the projectAGENTS.md, a personalCLAUDE.local.md, or both. It can also create skills under.claude/skills/and add hooks to.claude/settings.json.
Extra instructions and placeholders
Before the prompt is sent, the YAML frontmatter at the start of the template is removed and the following placeholders are replaced:
${path}: the current project directory. In DSH it is the current working directory of the session. In Cline it is the workspace root. For Grok Build and goose, the commands are files written at install time, so the value is., the current directory of the agent at run time.{{.Config.Options.InitializeAs}}: the instructions file name in the Crush template. It is replaced withAGENTS.md.$ARGUMENTS: the extra instructions.
If the template has no $ARGUMENTS, the extra instructions are appended to a ## Additional instructions from the user section at the end of the prompt. Without extra instructions, the section is not added. Grok Build skills are static files, so this section is always present and stays empty when there are no extra instructions.
Configuration
| Agent | Config file |
|---|---|
| Pi | ~/.pi/agent/agent-stash/init.json, then <project-root>/.pi/agent-stash/init.json (read only when the project is trusted) |
| DSH | $DSH_HOME/agent-stash/init.json (default ~/.dsh/agent-stash/init.json) |
| Cline | $CLINE_DIR/agent-stash/init.json (default ~/.cline/agent-stash/init.json) |
agent-stash CLI (Grok Build, goose, Aider) | $XDG_CONFIG_HOME/agent-stash/init.json (default ~/.config/agent-stash/init.json) |
When PI_CODING_AGENT_DIR is set for Pi, the first file is $PI_CODING_AGENT_DIR/agent-stash/init.json instead.
{
"defaultPreset": "team",
"presets": {
"team": {
"file": "./team-init.md",
"description": "..."
}
}
}Prop
Type
Message edit
Edit a user message or an assistant reply, regenerate the last reply, or retry any turn. Each change opens a new session version.
Skills
The Agent Skills in this collection and how to install them. They are style guides synced from upstream and skills that delegate tasks to subagents by model in DSH.