66| ---------| -------------|
77| ` kode run [flags] <task> ` | Execute a task with the agent loop (single-shot by default) |
88| ` kode run --session [flags] <task> ` | Execute and save conversation as a multi-turn session |
9+ | ` kode run --learn [flags] <task> ` | Execute with skill learning (detects patterns, suggests skills) |
910| ` kode continue [--id <id>] <task> ` | Continue the most recent session (or by ` --id ` ) |
1011| ` kode repl [--id <id>] ` | Interactive REPL mode (persistent multi-turn session) |
1112| ` kode session list ` | List sessions |
1213| ` kode session show [id] ` | Show session details (default: latest) |
1314| ` kode session delete <id> ` | Delete a session |
1415| ` kode session trim <id> <n> ` | Keep only the ` n ` most recent messages |
1516| ` kode session cleanup <days> ` | Delete sessions older than N days |
17+ | ` kode skill list ` | List all available skills |
18+ | ` kode skill view <name> ` | View a skill's full content |
19+ | ` kode skill delete <name> ` | Delete a skill |
20+ | ` kode skill import <uri> [flags] ` | Import a skill from file:// or https:// |
21+ | ` kode skill curate ` | Analyze skills for quality, staleness, trigger overlap |
1622| ` kode init [--global] [--force] ` | Create a config file template |
1723| ` kode version ` | Print version and exit |
1824
2834| ` --no-color ` | bool | false | Disable colored terminal output |
2935| ` --no-agents ` | bool | false | Skip loading AGENTS.md |
3036| ` --session ` | bool | false | Save conversation as a multi-turn session |
37+ | ` --learn ` | bool | false | Enable skill learning mode (detects patterns, saves skills) |
3138| ` --system <prompt> ` | string | built-in | Override system prompt |
3239
3340## Shell tool schema
@@ -52,8 +59,8 @@ When running without `--sandbox`, kode classifies every shell command by risk an
5259| 🟠 system_write | ** prompt** | ` sudo ` , ` apt install ` , writes to ` /etc/ ` |
5360| 🔴 destructive | ** deny** | ` rm -rf / ` , ` dd if=/dev/zero ` , ` mkfs ` |
5461| 🔴 network_egress | ** prompt** | ` curl ` , ` git push ` , ` ssh ` , ` scp ` |
55- | 🔴 code_execution | ** prompt** | ` curl url \| bash ` , ` eval ` , ` node -e ` |
56- | 🟠 install | ** prompt** | ` npm install ` , ` pip install ` , ` go install <remote > ` |
62+ | 🔴 code_execution | ** prompt** | ` curl url \| bash ` , ` eval ` , ` node -e ` , ` go run ` |
63+ | 🟠 install | ** prompt** | ` npm install ` , ` pip install ` , ` go install <path > ` |
5764| ⬛ blocked | ** deny** | Fork bombs, ` dd ` to block devices |
5865
5966The approval prompt accepts:
@@ -82,6 +89,87 @@ Configurable via `dangerous` section in `~/kode/config.json` or `./kode.json`:
8289
8390See [ docs/SECURITY.md] ( docs/SECURITY.md ) for details.
8491
92+ ## Skills
93+
94+ The ** skills system** provides just-in-time domain knowledge to the agent. Skills are SKILL.md files
95+ with YAML frontmatter that define trigger keywords, quality metadata, and markdown body content.
96+
97+ ### How skills work
98+
99+ 1 . Skills are stored in ` ~/.kode/skills/<name>/SKILL.md ` (user-global) or ` ./.kode/skills/<name>/SKILL.md ` (project)
100+ 2 . Skills with ` auto_load: true ` are injected into the system prompt on start
101+ 3 . Lazy skills are loaded on demand when the user's input matches their trigger keywords (topic × action)
102+ 4 . The ` --learn ` flag detects reusable patterns during a run and prompts to save as a draft skill
103+
104+ ### Skill commands
105+
106+ ``` bash
107+ # List all skills
108+ kode skill list
109+
110+ # View a skill's full content
111+ kode skill view docker-build
112+
113+ # Delete a skill
114+ kode skill delete docker-build
115+
116+ # Import a skill from a file or URL
117+ kode skill import ./skills/my-skill.md
118+ kode skill import https://example.com/skills/deploy.md
119+
120+ # Import with flags
121+ kode skill import https://example.com/skills/deploy.md --basic # skip LLM risk assessment
122+ kode skill import https://example.com/skills/deploy.md --yes # auto-approve (scripting)
123+
124+ # Run curation (quality, staleness, overlap checks)
125+ kode skill curate
126+ ```
127+
128+ ### Skill file format
129+
130+ ``` yaml
131+ ---
132+ name : docker-build
133+ description : Build and optimize Docker images
134+ version : 1.0.0
135+ author : kode
136+ kode :
137+ trigger :
138+ topic : docker container image
139+ action : build optimize
140+ auto_load : false
141+ quality : verified
142+ ---
143+ # # Overview
144+
145+ Procedure for building optimized Docker images.
146+
147+ # # Step-by-Step
148+
149+ 1. Write a `.dockerignore` file
150+ 2. Use multi-stage builds
151+ 3. Run `docker build -t <name> .`
152+
153+ # # Common Pitfalls
154+
155+ - Forgetting `.dockerignore` leads to large build contexts
156+ - Not pinning base image versions causes build drift
157+
158+ # # Verification
159+
160+ - ` docker build` exits with code 0
161+ - ` docker images` shows the new image
162+ ` ` `
163+
164+ ### Curation
165+
166+ The ` kode skill curate` command runs four quality passes:
167+
168+ - **Staleness** — flags skills unused for 90+ days (configurable via `skill.curation.staleness_days`)
169+ - **Trigger overlap** — detects skills with 2+ shared topic keywords that may need merging
170+ - **Quality audit** — checks for missing sections, short bodies, long descriptions
171+ - **Body dedup** — detects skills with identical body content by SHA256 hash
172+
85173# # Sandbox flags
86174
87175| Flag | Default | Description |
@@ -144,6 +232,9 @@ kode run --sandbox --sandbox-image node:20-alpine "node --version"
144232
145233# Custom system prompt
146234kode run --system "You are a Go expert. Answer with code only." "Write HTTP server"
235+
236+ # Run with skill learning
237+ kode run --learn "Set up CI with GitHub Actions"
147238` ` `
148239
149240# # Config priority
0 commit comments