Macros#

In the .enkaidu/ profile directory, you can define macros in two ways:

  1. You can create a file called macros.yml or macros.yaml (not both!) and define one or more macros.

  2. You can create a folder called macros/ and within the folder define as many different YAML files, each with one or more named macros.

Example#

Regardless of the how you define the macro files, the content should follow the YAML structure of the following example.

compact:
  description: Compact the current session with a summary
  queries:
    - /session push system_prompt_name=compact
    - /prompt use compact
    - /session pop_and_take response_only=yes reset_parent=yes
init:
  description: Review current folder and create an AGENTS.md file
  queries:
    - /session push
    - /toolset load FileManagement
    - /toolset load TextEditing
    - |
      Please analyze this codebase and create an `AGENTS.md` file, which will be given to future instances of this AI coding agent (like Enkaidu, Claude Code) to operate in this project.

      What to add:
      1. Commands that will be commonly used, such as how to build, lint, and run tests. Include the necessary commands to develop in this codebase, such as how to run a single test.
      2. High-level code architecture and structure so that future instances can be productive more quickly. Focus on the "big picture" architecture that requires reading multiple files to understand

      Usage notes:
      - Ignore the contents of hidden folders, including `.git/` and `.enkaidu/`
      - If there's already an `AGENTS.md`, suggest improvements to it vs creating a new file.
      - When you make the initial `AGENTS.md` do not repeat yourself and do not include obvious instructions like "Provide helpful error messages to users", "Write unit tests for all new utilities", "Never include sensitive information (API keys, tokens) in code or commits"
      - Avoid listing every component or file structure that can be easily discovered
      - Don't include generic development practices
      - If there are `ops` commands (in `ops.yml`) then use those when identifying development commands.
      - If there are Cursor rules (in .cursor/rules/ or .cursorrules), CLAUDE.md, GEMINI.md or Copilot rules (in .github/copilot-instructions.md), make sure to include the important parts.
      - If there is a README.md, PROJECT.md, make sure to include the important parts.
      - Do not make up information such as "Common Development Tasks", "Tips for Development", "Support and Documentation" unless this is expressly included in other files that you read.
      - Be sure to prefix the file with the following text:

      ```
      This file provides guidance to agentic AI coding assistants like Enkaidu and Claude Code when working with code in this repository.
      ```

      Best practices:
      * Good rules are focused, actionable, and scoped.
      * Keep rules under 500 lines
      * Avoid vague guidance. Write rules like clear internal docs
      * Reuse rules when repeating prompts in chat
    - /session pop

See the configuration section for the specification defining macros.