Choose the kind of reuse you need
| Building block | In plain terms | Example |
|---|---|---|
| Slash command | A reusable prompt with arguments | /review src/ |
| Skill | Instructions and supporting knowledge for a task | A review method with a checklist |
| Hook | Code run at a lifecycle event | Check a shell command before it runs |
| Agent file | A complete assistant configuration | A reviewer with selected tools and rules |
Start by generating a command template:
mini-a --command
This prints a template; it does not install a command. Save your edited version under ~/.openaf-mini-a/commands/review.md, then invoke /review in the console. Use /help custom to verify discovery. If a name collides, built-in commands take precedence; skills take precedence over custom slash commands.
For ready-to-use examples, open Toolkit’s commands, skills, or hooks. For large libraries retrieved on demand, see Virtual skills.
Custom Slash Commands, Skills, and Hooks
mini-a supports template-based custom slash commands, skill templates, and local console hooks.
Custom Slash Commands
Create markdown templates under ~/.openaf-mini-a/commands/ and invoke them with /<name> ...args....
~/.openaf-mini-a/commands/my-command.md
Use placeholders inside the template: ,, ,, ``, …
Placeholder reference (works for command and skill templates):
- `` -> raw argument string after the command name (trimmed)
- `` -> parsed arguments as a JSON array
- `` -> parsed argument count
,, … -> positional argument values (1-based)
Example template ~/.openaf-mini-a/commands/my-command.md:
Follow these instructions exactly.
Primary target:
All args (raw):
Parsed args:
Argument count:
Run:
mini-a ➤ /my-command repo-a --fast "include docs"
Rendered prompt:
Follow these instructions exactly.
Primary target: repo-a
All args (raw): repo-a --fast "include docs"
Parsed args: ["repo-a","--fast","include docs"]
Argument count: 3
Load additional command directories with:
mini-a extracommands=/path/to/team-commands,/path/to/project-commands
Skills
With useskills=true, local skill operations are available even when useutils=false. Mini-A ships nine bundled skills: mini-a-files, mini-a-planning, mini-a-memory, mini-a-shell, mini-a-visual-output, mini-a-wiki-retrieval, mini-a-skill-authoring, mini-a-runtime-diagnostics and mini-a-contract-authoring. Tool-usage skills appear only when their required tools/options are enabled. The bundle follows the running installation/checkout, including launches elsewhere; utilsroot does not redirect it.
Root precedence is user/default, extraskills, plugin, then bundled, with first name winning and collision diagnostics. When local and wiki skills are both enabled, automatic selection prefers an eligible bundled Mini-A skill over virtual candidates with the exact same name. Explicit $wiki:path.md still selects that wiki source; unqualified $name stays ambiguous if both match. Bundling preserves useskills=false and adds no selection calls by itself. fileallow, filters and permissions still apply.
Automatic consultation defaults on only with explicit usedecide=true and a configured decision model; explicit skillsautosearch wins. Selection uses bounded local/wiki candidates and eligible Decide → LC → main fallback. Explicit $local:name or $wiki:path.md requests skip selection. Shared budgets, pending sections, revision checks and child continuity are described in Virtual Skills. Loading is recorded separately from verified adherence.
mini-a discovers skills from ~/.openaf-mini-a/skills/ in several formats. When a skill folder contains multiple formats, the first match in this precedence order is loaded:
SKILL.yaml— self-contained YAML skill (recommended for portable/shared skills)SKILL.ymlSKILL.jsonSKILL.md— classic markdown skill (folder layout)skill.md
Single-file skills (~/.openaf-mini-a/skills/<name>.md) are also supported.
YAML Skill Format
The YAML format bundles the prompt body, metadata, and all referenced files into a single portable file — no folder of supporting files required:
schema: mini-a.skill/v1
name: my-skill
summary: Short description shown by /skills
body: |
You are a specialized assistant for .
@context.md
refs:
context.md: |
Add any context or constraints here.
Print a starter template with:
mini-a --skills
# Redirect directly to a new file:
mkdir -p ~/.openaf-mini-a/skills/my-skill
mini-a --skills > ~/.openaf-mini-a/skills/my-skill/SKILL.yaml
The refs map embeds virtual reference files inline — @context.md in the body resolves from embedded refs first, then falls back to the filesystem. A children list models nested sub-folder structure for complex skill packs. See docs/SKILLS-YAML-FORMAT.md for the full schema reference.
Run skills with either /<name> ...args... or $<name> ...args.... Use /skills (or /skills <prefix>) to list discovered skills.
Load additional skill directories with:
mini-a extraskills=/path/to/shared-skills,/path/to/project-skills
Hooks
mini-a can run local hooks from ~/.openaf-mini-a/hooks/*.yaml|*.yml|*.json on events like:
before_goal,after_goalbefore_tool,after_toolbefore_shell,after_shell
Load additional hook directories with:
mini-a extrahooks=/path/to/team-hooks,/path/to/project-hooks
Non-interactive Template Execution
You can execute one command/skill template and exit:
mini-a exec="/my-command repo-a --fast"
References:
Custom Commands, Skills, Hooks
Based on upstream mini-a behavior, customization is file-based and loaded from your home profile. By default, Mini-A reads all configuration from ~/.openaf-mini-a.
Overriding the Config Home (homedir)
Pass homedir=<path> to make Mini-A resolve its .openaf-mini-a folder relative to a different base directory. Every path that would normally expand from ~ uses the provided value instead — commands, skills, hooks, modes, agent profiles, history, and memory files all shift together.
# Use a shared team config directory
mini-a homedir=/opt/shared/mini-a-config goal="..."
# Per-project isolated config (checked into the repo)
mini-a homedir=./my-project-config goal="..."
# Container or CI environment where ~ is not writable
mini-a homedir=/app/mini-a-config goal="summarize the build logs" useshell=true
extracommands, extraskills, and extrahooks still work as additional directories layered on top of whichever base is active:
# Shared base + project-specific extra skills
mini-a homedir=/opt/shared/mini-a-config \
extraskills=./project-skills \
goal="..."
Slash Command Templates
Create markdown templates in ~/.openaf-mini-a/commands/:
~/.openaf-mini-a/commands/<name>.md
Load additional command directories:
mini-a extracommands=/path/to/team-commands,/path/to/project-commands
Run in console:
/<name> arg1 arg2
Run non-interactively:
mini-a exec="/<name> arg1 arg2"
Template placeholders:
- `` -> raw argument string after the command name (trimmed)
- `` -> parsed arguments as a JSON array
- `` -> parsed argument count
,, … -> positional argument values (1-based)
Example:
~/.openaf-mini-a/commands/review.md
Review target:
Flags/raw:
Parsed:
/review src --quick "security only"
Review target: src
Flags/raw: src --quick "security only"
Parsed: ["src","--quick","security only"]
Skills
Supported skill layouts in ~/.openaf-mini-a/skills/. When a folder contains multiple formats, precedence is:
SKILL.yaml(self-contained, recommended for portable skills)SKILL.ymlSKILL.jsonSKILL.mdskill.md
Single-file ~/.openaf-mini-a/skills/<name>.md skills are also supported.
The YAML format bundles body, metadata, and embedded reference files into one portable file:
schema: mini-a.skill/v1
name: my-skill
summary: Short description
body: |
You are a specialized assistant for .
@context.md
refs:
context.md: |
Add context here.
Print a starter template: mini-a --skills
Folders ending in .disabled are ignored during skill discovery, which lets you keep a skill installed without exposing it.
Skills can be invoked as /<name> ...args... or $<name> ...args....
Automatic activation: Mini-A automatically preloads skills whose names or phrases appear in the goal or hook context. If your goal mentions "run review" and a review skill is installed, it is loaded and its context is injected before the first step — no explicit invocation needed.
Load additional skill directories:
mini-a extraskills=/path/to/shared-skills,/path/to/project-skills
Hooks
Hook definitions are loaded from ~/.openaf-mini-a/hooks/*.yaml, *.yml, *.json.
Load additional hook directories:
mini-a extrahooks=/path/to/team-hooks,/path/to/project-hooks
Example:
event: before_shell
command: "echo \"$MINI_A_SHELL_COMMAND\" | grep -E '(rm -rf|mkfs|dd if=)' >/dev/null && exit 1 || exit 0"
timeout: 1500
failBlocks: true
Supported events: before_goal, after_goal, before_tool, after_tool, before_shell, after_shell.
References: