# Agent Skills and shell context

> Use portable SKILL.md Agent Skills and inject live shell/git context into clai prompts.

Canonical URL: https://www.clai.chat/docs/v0.1/guides/skills-and-shell-context/ · Version: 0.1 · Updated: 2026-10-21

Full site index: https://www.clai.chat/llms.txt

`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 from:

- `<clai-config-dir>/skills/<skill-name>/SKILL.md` (user-global skills)
- `.agents/skills/<skill-name>/SKILL.md` (repository-scoped skills)

List available skills or run a skill directly with `clai skills` (shorthand `sk`):

```sh
clai skills list
clai skills commit-helper q "Draft release notes for HEAD"
```

## Shell contexts (-sc)

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 prompt context when you pass `-sc <name>`:

```sh
clai setup 4
clai -sc default q "Give me a one-liner to clean untracked build artifacts"
```
