Skip to content

Commit b0d48e8

Browse files
Copilotalexec
andauthored
Document Skills feature and correct documentation omissions (#183)
* Initial plan * Add comprehensive Skills feature documentation Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> * Add write rules mode clarification and MCP overview Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> * Update docs index to include Skills feature Co-authored-by: alexec <1142830+alexec@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
1 parent 214ce57 commit b0d48e8

File tree

7 files changed

+696
-2
lines changed

7 files changed

+696
-2
lines changed

README.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This tool collects context from predefined rule files and a task-specific prompt
1212
- **Dynamic Context Assembly**: Merges context from various source files.
1313
- **Task-Specific Prompts**: Use different prompts for different tasks (e.g., `feature`, `bugfix`).
1414
- **Rule-Based Context**: Define reusable context snippets (rules) that can be included or excluded.
15+
- **Skills System**: Progressive disclosure of specialized capabilities via skill directories.
1516
- **Frontmatter Filtering**: Select rules based on metadata using frontmatter selectors (matches top-level YAML fields only).
1617
- **Bootstrap Scripts**: Run scripts to fetch or generate context dynamically.
1718
- **Parameter Substitution**: Inject values into your task prompts.
@@ -211,6 +212,9 @@ The tool looks for task and rule files in the following locations, in order of p
211212
- `./.cursor/commands/*.md`
212213
- `./.opencode/command/*.md`
213214

215+
**Skills** (specialized capabilities with progressive disclosure):
216+
- `./.agents/skills/*/SKILL.md` (each subdirectory in `.agents/skills/` can contain a `SKILL.md` file)
217+
214218
**Rules:**
215219
The tool searches for a variety of files and directories, including:
216220
- `CLAUDE.local.md`
@@ -505,6 +509,24 @@ languages:
505509

506510
If you need to filter on nested data, flatten your frontmatter structure to use top-level fields only.
507511

512+
**MCP Server Configuration**
513+
514+
Rules can optionally specify MCP (Model Context Protocol) server configurations for integration with AI coding agents. This is useful for defining server processes that AI agents can interact with.
515+
516+
```yaml
517+
---
518+
languages:
519+
- python
520+
mcp_server:
521+
command: python
522+
args: ["-m", "server"]
523+
env:
524+
PYTHON_PATH: /usr/bin/python3
525+
---
526+
```
527+
528+
For detailed information on MCP server configuration, see the [File Formats Reference](https://kitproj.github.io/coding-context-cli/reference/file-formats#mcp_server-rule-metadata).
529+
508530
### Targeting a Specific Agent
509531

510532
The `-a` flag specifies which AI coding agent you're using. This information is currently used for:
@@ -614,6 +636,73 @@ Commands can also receive inline parameters:
614636
/deploy env="production" version="1.2.3"
615637
```
616638

639+
### Skill Files
640+
641+
Skill files provide specialized capabilities with progressive disclosure. Skills are discovered in `.agents/skills/` directories and each skill is a subdirectory containing a `SKILL.md` file with metadata.
642+
643+
**Skills enable:**
644+
- **Progressive Disclosure**: Only skill metadata (name, description) is included in the initial context
645+
- **On-Demand Loading**: AI agents can load full skill content when needed
646+
- **Modular Capabilities**: Organize domain-specific knowledge separately from general rules
647+
- **Selector Filtering**: Skills can be filtered using selectors just like rules
648+
649+
**Example skill structure:**
650+
```
651+
.agents/skills/
652+
├── data-analysis/
653+
│ └── SKILL.md
654+
└── pdf-processing/
655+
└── SKILL.md
656+
```
657+
658+
**Example skill file (`.agents/skills/data-analysis/SKILL.md`):**
659+
```markdown
660+
---
661+
name: data-analysis
662+
description: Analyze datasets, generate charts, and create summary reports. Use when the user needs to work with CSV, Excel, or other tabular data formats.
663+
license: MIT
664+
metadata:
665+
author: team-name
666+
version: "1.0"
667+
---
668+
669+
# Data Analysis
670+
671+
## When to use this skill
672+
Use this skill when the user needs to:
673+
- Analyze CSV or Excel files
674+
- Generate charts and visualizations
675+
- Calculate statistics and summaries
676+
677+
## How to analyze data
678+
1. Use pandas for data analysis:
679+
```python
680+
import pandas as pd
681+
df = pd.read_csv('data.csv')
682+
```
683+
```
684+
685+
**Skill Frontmatter Fields:**
686+
- `name` (required): Skill identifier, 1-64 characters
687+
- `description` (required): What the skill does and when to use it, 1-1024 characters
688+
- `license` (optional): License applied to the skill
689+
- `compatibility` (optional): Environment requirements, max 500 characters
690+
- `metadata` (optional): Arbitrary key-value pairs
691+
692+
**XML Output:**
693+
Skills are output as XML for easy parsing by AI agents:
694+
```xml
695+
<available_skills>
696+
<skill>
697+
<name>data-analysis</name>
698+
<description>Analyze datasets, generate charts...</description>
699+
<location>/path/to/.agents/skills/data-analysis/SKILL.md</location>
700+
</skill>
701+
</available_skills>
702+
```
703+
704+
The AI agent can then read the full skill content from the provided location when needed.
705+
617706
### Task Frontmatter
618707

619708
Task frontmatter is **always** automatically included at the beginning of the output when a task file has frontmatter. This allows the AI agent or downstream tool to access metadata about the task being executed. There is no flag needed to enable this - it happens automatically.

0 commit comments

Comments
 (0)