Commands#

You can configure custom command prompts for project, global or via commands config pointing to the path of the commands.
Prompts can use positional variables like $ARGUMENTS, $1, $2, or named {{name}} variables, to replace in the prompt during command call.
Skills support arguments too
Skills also support the same variable substitution when invoked as slash commands, e.g. /review-pr URL.
You can configure in multiple different ways:
A .eca/commands folder from the workspace root containing .md files with the custom prompt.
Check for performance issues in $1 and optimize if needed.
ECA will make available a /check-performance command after creating that file.
A $XDG_CONFIG_HOME/eca/commands or ~/.config/eca/commands folder containing .md files with the custom command prompt.
Check for performance issues in $1 and optimize if needed.
ECA will make available a /check-performance command after creating that file.
Add to your config the commands key. path can point to a single .md file or a directory. Directories load markdown files recursively. Relative paths are searched from each workspace root if not an absolute path:
{
"commands": [{"path": "my-custom-prompt.md"}]
}
// Load all command files from a directory recursively
{
"commands": [{"path": "/home/user/commands"}]
}
Frontmatter: description and named arguments#
A command file may start with optional YAML frontmatter to set a human-readable description (shown in the command list instead of the file path) and to declare named arguments.
Use {{name}} placeholders in the body to define named arguments. When a command uses named placeholders, ECA renders the body with Selmer, mapping the call arguments to the placeholders in the order they first appear:
---
description: Generate a weather report
arguments:
- name: city
description: City to report on
required: true
- name: units
description: metric or imperial
required: false
---
Write a weather report for {{city}} using {{units}} units.
Calling /weather Paris metric renders Write a weather report for Paris using metric units.
Notes:
- The
argumentslist is optional and only attachesdescription/requiredmetadata that editors use when prompting for values. Named arguments default torequired: true; setrequired: falseto make one optional. - For positional commands (
$1,$ARG1),argumentsentries are matched by position, letting you name and describe each placeholder. - Positional (
$1/$ARGS) and named ({{name}}) placeholders cannot be mixed in the same command; such files are ignored. - Commands without frontmatter keep working exactly as before.