Agent Skills and shell context
Use portable SKILL.md Agent Skills and inject live shell/git context into clai prompts.
clai supports portable Agent Skills (SKILL.md) and customizable shell context templates so your prompts automatically carry project instructions and environment facts.
Agent Skills (SKILL.md)
clai discovers SKILL.md files using progressive disclosure from:
<clai-config-dir>/skills/<skill-name>/SKILL.md(default skills)~/.agents/skills/<skill-name>/SKILL.md(configured viaskills.jsonglobalSkillDirs)./agents/skills/<skill-name>/SKILL.mdand.claude/skills/<skill-name>/SKILL.md(repository-scopedprojectSkillDirs)
Enable skills for a query with -s '*' (-skills '*'), or set "enabled": true in skills.json or "use_skills": true in a profile. When enabled, clai injects compact skill descriptors into context and the model loads matching skills on demand via load_skill:
clai -s '*' q "Review pending changes in this repository"
clai -s none q "Run this query with skills disabled"
Shell contexts (-asc)
Shell contexts (<clai-config-dir>/shellContexts/<name>.json) evaluate shell variables and commands—such as current working directory, OS, shell, and git status—and inject them into the system prompt when you pass -asc <name> (-add-shell-context <name>):
clai setup 4
clai -asc minimal q "Give me a one-liner to clean untracked build artifacts"