ai-docs/docs/ai/skills.md
Matt Bruce 8f0f0df7d6 refactor: unified setup.sh replaces sync-skills.sh
- Single script handles skills, agents, and instructions
- Works locally (cloned repo) and remotely (curl, no clone)
- Auto-generated manifests (agents.list, instructions.list)
- update-lists command regenerates manifests from directory contents
- Removed sync-skills.sh (folded into setup.sh)
- Rewrote assets README to be concise and actionable
- Updated all references in Agents.md and skills.md
2026-02-11 11:59:12 -06:00

189 lines
6.0 KiB
Markdown

# Skills Library
You are here: [AI Docs Home](index.md) > Skills Library
## Contents
- Skills vs Agents vs Instructions
- Skills Governance And Sync
- Skills CLI (Single Path)
- How To Connect Skills
- Central Assets Repo
- Next Steps
## Skills vs Agents vs Instructions
- Skills are reusable workflows you load for specific tasks.
- Agents are full modes/personas that control behavior end-to-end.
- Instructions are always-on repo rules that auto-apply by file pattern.
## What Skills Are
Skills are reusable instructions and workflows that guide the assistant through specialized tasks.
## When To Use A Skill
- The task has a repeatable workflow.
- You want consistent structure and outputs.
- The task spans multiple files or steps.
## Skills Directory
Store skills in the team-approved skills directory for your environment. If you do not know the location, ask your team lead or check your internal setup docs.
### Example Question To Ask
Example prompt:
```text
Where is the approved skills directory for our team, and how do I add a new skill?
```
## Skills Governance And Sync
To keep skills consistent across teams, use a central skills registry plus a per-project manifest. Avoid copying skills into every repo unless the skill is tightly coupled to the project.
### Recommended Pattern
- Central skills registry repo (single source of truth)
- Project-level manifest that pins required skills and versions
- Sync script that installs the approved set to each developer's laptop
- Agents.md points to the manifest and sync command
### Curated Assets Structure (Current)
Keep the approved list in a single repo and organize by platform. This repo already includes the /assets folder as the staging area for a future migration.
```text
/assets/
setup.sh ← single installer script
agents.list ← auto-generated manifest
instructions.list ← auto-generated manifest
ios-skills.yaml
android-skills.yaml
shared-skills.yaml
agents/
instructions/
README.md
```
### Project Manifest Example
Use a small manifest to declare the approved skills and versions for the project:
```yaml
version: 1
skills:
- name: swiftui-expert-skill
install: "https://github.com/avdlee/swiftui-agent-skill --skill swiftui-expert-skill"
- name: onboarding-cro
install: "vercel-labs/agent-skills"
```
### Sync Workflow
1. Update the curated list in assets (shared, iOS, or Android).
2. Run `./assets/setup.sh skills ios` (or `android`, `shared`).
3. The script installs each skill using the `npx skills` CLI.
4. Restart your editor if required.
### Example Sync Commands
```bash
# Install iOS skills
./assets/setup.sh skills ios
# Install everything (skills + agents + instructions)
./assets/setup.sh all ios
# Remote — no clone required
export ASSETS_BASE_URL="https://gitlab.com/<org>/mobile-ai-docs/-/raw/develop/assets"
bash <(curl -fsSL "$ASSETS_BASE_URL/setup.sh") all ios
```
## Skills CLI (Single Path)
We use a single, approved path: update the curated list under assets/ and run the sync script. The sync script calls `npx skills add` for each entry.
### Where To Find Skills
- Homepage: https://skills.sh/
- Docs: https://skills.sh/docs
- CLI reference: https://skills.sh/docs/cli
### How It Works (High-Level)
1. You update assets/shared-skills.yaml (or a platform list) with approved install entries.
2. Run `./assets/setup.sh skills` (or `skills ios`, `skills android`).
3. The script uses `npx skills` to install each skill.
### Install The CLI (No Global Install Required)
The CLI runs via `npx`, so you do not need a global install.
### Example Install Entry
```yaml
skills:
- name: swiftui-expert-skill
install: "https://github.com/avdlee/swiftui-agent-skill --skill swiftui-expert-skill"
```
### Notes
- The leaderboard uses anonymous telemetry from the CLI. You can opt out by setting `DISABLE_TELEMETRY=1`.
- Review skills before installing. The ecosystem is audited, but quality varies.
## skills CLI Commands
Common commands shown in the CLI help output:
```text
npx skills add <package> Install a skill
npx skills list List installed skills
npx skills find [query] Search for skills
npx skills check Check for updates
npx skills update Update all skills
npx skills remove Remove installed skills
npx skills init [name] Create a new skill
```
![Skills Find](images/skills-find.png)
## How to Download Existing Skills
Run the setup script:
```bash
./assets/setup.sh skills ios
```
Or remotely without cloning:
```bash
bash <(curl -fsSL "$ASSETS_BASE_URL/setup.sh") skills ios
```
## How to Download Agents
Run the setup script:
```bash
./assets/setup.sh agents
```
Or remotely without cloning:
```bash
bash <(curl -fsSL "$ASSETS_BASE_URL/setup.sh") agents
```
Agents are installed to `~/.copilot/agents/` by default. Override with the `AGENTS_DIR` environment variable.
## How to Enable or Configure Skills
- Follow the instructions provided in each skill's README or SKILL file.
- Some skills require additional setup, such as environment variables or tools.
## How To Connect Skills
1. State the primary skill you want to use.
2. Provide the inputs that skill expects.
3. If needed, add a secondary skill and explain the handoff.
### Example Skill Request
Example prompt:
```text
Use swiftui-expert-skill to review this view for best practices. Then use webapp-testing to validate the web flow.
```
## Central Assets Repo (Recommended)
Do not list every skill in this guide. Instead, point readers to a single repo that contains the approved agents, skills, and instructions they can download.
### What To Include In The Assets Repo
- Agents (agent prompt files)
- Skills (SKILL files and any required setup)
- Instructions (repo-level and editor-level guidance)
- A short README with install and update steps
- Curated skill lists (for example, ios-skills.yaml, android-skills.yaml)
### Link To The Assets Repo
- Repo: (link)
## Next Steps
- For day-to-day workflows, read [Cross-Platform AI Usage](cross-platform.md).
- For setup issues, follow [Troubleshooting and FAQ](troubleshooting.md).