Skills are specialized instruction sets that SF loads when the task matches. They provide domain-specific guidance for the LLM — coding patterns, framework idioms, testing strategies, and tool usage.
Skills follow the open [Agent Skills standard](https://agentskills.io/) and are **not SF-specific** — they work with Claude Code, OpenAI Codex, Cursor, GitHub Copilot, Windsurf, and 40+ other agents.
> **Migration from `~/.gsd/agent/skills/`:** On first launch after upgrading, SF automatically copies skills from the legacy `~/.gsd/agent/skills/` directory to `~/.agents/skills/`. The old directory is preserved for backward compatibility.
During `gsd init`, SF detects the project's tech stack and recommends relevant skill packs. For brownfield projects, detection is automatic; for greenfield projects, the user picks a tech stack.
The curated catalog is maintained in `src/resources/extensions/gsd/skill-catalog.ts`. Each entry maps a tech stack to a skills.sh repo and specific skill names.
#### Available Skill Packs
**Swift (any Swift project — `Package.swift` or `.xcodeproj` detected):**
The skill catalog lives in [`src/resources/extensions/gsd/skill-catalog.ts`](../src/resources/extensions/gsd/skill-catalog.ts). To add or update a pack:
1. Add a `SkillPack` entry to the `SKILL_CATALOG` array with `repo`, `skills`, and matching criteria
2. For language-detection matching, use `matchLanguages` (values from `detection.ts``LANGUAGE_MAP`)
3. For Xcode platform matching, use `matchXcodePlatforms` (e.g., `["iphoneos"]` — parsed from `SDKROOT` in `project.pbxproj`)
4. For file-presence matching, use `matchFiles` (checked against `PROJECT_FILES` in `detection.ts`)
5. If the pack should appear in greenfield choices, add it to `GREENFIELD_STACKS`
6. Packs sharing the same `repo` are batched into a single `npx skills add` invocation
Every auto-mode unit records which skills were available and actively loaded. This data is stored in `metrics.json` alongside existing token and cost tracking.
### Skill Health Dashboard
View skill performance with `/gsd skill-health`:
```
/gsd skill-health # overview table: name, uses, success%, tokens, trend, last used
/gsd skill-health rust-core # detailed view for one skill
/gsd skill-health --stale 30 # skills unused for 30+ days
/gsd skill-health --declining # skills with falling success rates
```
The dashboard flags skills that may need attention:
- **Success rate below 70%** over the last 10 uses
- **Token usage rising 20%+** compared to the previous window
- **Stale skills** unused beyond the configured threshold
### Staleness Detection
Skills unused for a configurable number of days are flagged as stale and can be automatically deprioritized:
```yaml
---
skill_staleness_days: 60 # default: 60, set to 0 to disable
---
```
Stale skills are excluded from automatic matching but remain invokable explicitly via `read`.
When configured as a post-unit hook, SF can analyze whether the agent deviated from a skill's instructions during execution. If significant drift is detected (outdated API patterns, incorrect guidance), it writes proposed fixes to `.gsd/skill-review-queue.md` for human review.
Key design principle: skills are **never auto-modified**. Research shows curated skills outperform auto-generated ones significantly, so the human review step is critical.