Agent Stash Docs

/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 used

Pick 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.

In DSH, pick Init in the / menu to open the preset list, type to filter, and press Enter to run

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:

PresetUpstreamLicense
codex (default)openai/codexApache-2.0
kimi-codeMoonshotAI/kimi-codeMIT
opencodeanomalyco/opencodeMIT
crushcharmbracelet/crushFSL-1.1-MIT
copilotmicrosoft/vscodeMIT
qwen-codeQwenLM/qwen-codeApache-2.0
kilo-codeKilo-Org/kilocodeMIT

Presets maintained by hand:

PresetSource
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.

  • copilot keeps the upstream VS Code behavior: it prefers AGENTS.md, updates an existing AGENTS.md or .github/copilot-instructions.md instead of creating a new file, and can also create skills and custom agents.
  • claude-code-init-new first asks what to set up. It can write the project AGENTS.md, a personal CLAUDE.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 with AGENTS.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

AgentConfig 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.

init.json
{
  "defaultPreset": "team",
  "presets": {
    "team": {
      "file": "./team-init.md",
      "description": "..."
    }
  }
}

Prop

Type

Contributors

Page history