Skip to content

Commit 924083c

Browse files
Cut v0.3.0: docs refresh + CHANGELOG stamp (#89)
* Refresh docs site for v0.2.1 (eight platforms, init instructions, skill versioning) Bring the VitePress site up to date with the v0.2.0 / v0.2.1 surface that has landed since the last docs refresh: - Eight platform adapters wherever 3 were listed (index, guide, concepts diagram, reference flag enums, platforms index/comparison) and a dedicated page for each new adapter (cursor, gemini-cli, github-copilot, windsurf, continue). - `skern init --instructions` / `--tool-forming-loop` / `--target` / `--print-instructions` documented in the quick-start, agent-setup, and command reference. Agent-setup now leads with `init --instructions` instead of the manual `echo … >> AGENTS.md` recipe. - Reference reorganized: registry vs. platform command groups, full pages for `skill import`, `skill version`, `skill diff`, capacity reporting on install/uninstall, `--enforce-budget`, `--with-platforms`, batch install/uninstall. - Validation page split into errors / warnings / hints with the trigger-prefix and recommended-section hints. - Skill format page corrected to the nested `metadata.author` / `metadata.version` / `metadata.modified-by` schema and includes the import workflow. - Installation page covers macOS, Linux, and Windows (PowerShell) one-liners plus version pinning, custom install dir, source build, manual install, uninstall. - Contributing/development reflects the declarative platform spec, updated Make targets, and the `cli/instructions/` package. - Sidebar adds the new platform pages and a Writing Skills entry under Guide. Build verified with `npm run docs:build` (clean). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Cut v0.3.0: stamp CHANGELOG, bump version refs Move the [Unreleased] block to v0.3.0 dated 2026-05-07, with a focused "Breaking changes" section calling out the --from-template directory requirement (#84). Cross-link the four PRs that landed since v0.2.1 (#81, #84, #86, #87) and add a Changed entry covering the docs-site refresh that ships in this branch. Bump the corresponding version refs in AGENTS.md (current release + milestone snapshot now covers M0–M7), INSTALL.md (SKERN_VERSION pin example), docs/guide/installation.md (matching pin example), and docs/guide/index.md (current-release callout). Docs build verified. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3a2b09b commit 924083c

25 files changed

Lines changed: 826 additions & 307 deletions

AGENTS.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Skern is a minimal, agent-first CLI tool for managing Agent Skills across agentic development platforms (Claude Code, Codex CLI, OpenCode, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Continue, and more). It follows the Agent Skills open standard (agentskills.io) and uses `SKILL.md` files with YAML frontmatter as the canonical format.
66

7-
The project is written in **Go 1.25+** and the current release is **v0.2.0**.
7+
The project is written in **Go 1.25+** and the current release is **v0.3.0**.
88

99
## Repository Layout
1010

@@ -267,7 +267,10 @@ The full list is generated from `internal/platform/spec.go` — append a row the
267267

268268
## Current Status
269269

270-
Milestones M0–M6 are complete (v0.2.0). M6 shipped dynamic skill loading per #52 — batch install/uninstall, capacity reporting in install/uninstall output, `--enforce-budget` opt-in, `--with-platforms` flag on `skill list`, removal of `--platform all`. The v0.1.x → v0.2.0 transition introduced a **breaking change** to the JSON shape of install/uninstall results (`skills[]` + top-level `platform`/`capacity` instead of `platforms[]`).
270+
Milestones M0–M7 are complete (v0.3.0).
271+
272+
- **M6** (v0.2.0) — dynamic skill loading per #52: batch install/uninstall, capacity reporting in install/uninstall output, `--enforce-budget` opt-in, `--with-platforms` flag on `skill list`, removal of `--platform all`. The v0.1.x → v0.2.0 transition introduced a breaking change to the JSON shape of install/uninstall results (`skills[]` + top-level `platform`/`capacity` instead of `platforms[]`).
273+
- **M7** (v0.3.0) — declarative platform registry: per-platform Go files collapsed into a single `Spec` table (`internal/platform/spec.go`) plus a generic `Adapter`. Five new adapters (`cursor`, `gemini-cli`, `github-copilot`, `windsurf`, `continue`) shipped alongside the rewrite. Also in v0.3.0: `skern init --instructions` writes the skern usage snippet into agent instruction files, `--from-template` requires a skill directory (small breaking change), and Windows joins the CI matrix.
271274

272275
### Future Roadmap
273276

CHANGELOG.md

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [v0.3.0] — 2026-05-07
11+
12+
Platform registry rewrite, five new adapters, agent-instruction snippet
13+
writer, and a focused breaking change to `--from-template`.
14+
15+
### Breaking changes
16+
17+
- **`skill create --from-template <path>` now requires a skill directory.**
18+
A skill is a folder, so `--from-template` accepts only a directory containing
19+
a `SKILL.md`. Passing a bare file (a `SKILL.md` or a body-only markdown file)
20+
is rejected with a clear error pointing at the parent directory. The
21+
previous behavior of treating a non-frontmatter markdown file as a raw body
22+
is removed — wrap such bodies in a directory with a `SKILL.md` instead. ([#84])
23+
1024
### Added
1125

1226
- **`skern init` can now write a skern usage snippet into agent instruction
@@ -19,19 +33,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1933
`--target <path>` overrides auto-discovery for explicit files, and
2034
`--print-instructions` emits the snippet to stdout without writing files.
2135
The `InitResult` JSON envelope grows an `instructions` field reporting
22-
what was written.
36+
what was written. ([#87])
2337
- **Five new platform adapters: `cursor`, `gemini-cli`, `github-copilot`,
2438
`windsurf`, `continue`.** All five accept the same `--platform` flag, route
2539
installs to the platform's expected skill directory, and participate in
2640
`skern platform list`/`status` matrices. Path conventions follow
2741
[vercel-labs/skills](https://github.com/vercel-labs/skills#supported-agents).
28-
([#80])
42+
([#81])
2943
- **Declarative platform registry.** Adapters are now defined as one row in
3044
`internal/platform/spec.go` — a `Spec` carrying name, user dir, project dir,
3145
and home-relative detection paths. A single generic `Adapter` struct
3246
implements the `Platform` interface from any spec row, replacing the
3347
per-platform Go files (`claude.go`, `codex.go`, `opencode.go`). Adding a
34-
platform is a one-line PR. ([#80])
48+
platform is a one-line PR. ([#81])
49+
- **Windows added to the CI matrix** — every PR now runs the test suite on
50+
Windows in addition to macOS and Linux. ([#86])
51+
- **`--from-template` preserves template frontmatter and copies sibling
52+
assets.** The template's `description`, `tags`, `metadata.author`, and
53+
`metadata.version` are preserved on the new skill (#82) and every sibling
54+
file or subdirectory (`references/`, `templates/`, `VENDORED.md`, …) is
55+
copied alongside the new `SKILL.md` (#83). The CLI `<name>` argument always
56+
wins over the template's name; other flags override template values when
57+
explicitly set, otherwise template values are preserved.
3558

3659
### Changed
3760

@@ -43,20 +66,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4366
- **CLI flag help and error messages enumerate the registered platforms
4467
dynamically** — adding a platform updates `--platform` help and the
4568
"unknown platform" error text without touching the CLI.
46-
- **`skill create --from-template <path>` now requires a skill directory.**
47-
A skill is a folder, so `--from-template` accepts only a directory containing
48-
a `SKILL.md`. Passing a bare file (a `SKILL.md` or a body-only markdown file)
49-
is rejected with a clear error that points at the parent directory. The
50-
template's frontmatter (`description`, `tags`, `metadata.author`,
51-
`metadata.version`) is preserved on the new skill (#82) and every sibling
52-
file or subdirectory (e.g., `references/`, `templates/`, `VENDORED.md`) is
53-
copied alongside the new `SKILL.md` (#83). The CLI `<name>` argument always
54-
wins over the template's `name`; other flags override template values when
55-
explicitly set, otherwise template values are preserved. **Breaking:** the
56-
previous behavior of treating a non-frontmatter markdown file as a raw body
57-
is removed — wrap such bodies in a directory with a `SKILL.md` instead.
58-
59-
[#80]: https://github.com/devrimcavusoglu/skern/issues/80
69+
- **Documentation site comprehensively refreshed** — eight platform pages,
70+
reference covers `skill import` / `skill version` / `skill diff`, validation
71+
page split into errors/warnings/hints, installation page covers all three
72+
OSes, agent-setup leads with `init --instructions`.
73+
74+
[v0.3.0]: https://github.com/devrimcavusoglu/skern/compare/v0.2.1...v0.3.0
75+
[#81]: https://github.com/devrimcavusoglu/skern/pull/81
76+
[#84]: https://github.com/devrimcavusoglu/skern/pull/84
77+
[#86]: https://github.com/devrimcavusoglu/skern/pull/86
78+
[#87]: https://github.com/devrimcavusoglu/skern/pull/87
6079

6180
## [v0.2.1] — 2026-05-03
6281

INSTALL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ Override with the `SKERN_INSTALL_DIR` environment variable.
4646
## Pin a specific version
4747

4848
```sh
49-
SKERN_VERSION=v0.2.1 curl -fsSL https://raw.githubusercontent.com/devrimcavusoglu/skern/main/scripts/install.sh | bash
49+
SKERN_VERSION=v0.3.0 curl -fsSL https://raw.githubusercontent.com/devrimcavusoglu/skern/main/scripts/install.sh | bash
5050
```
5151

5252
```powershell
53-
$env:SKERN_VERSION = 'v0.2.1'; irm https://raw.githubusercontent.com/devrimcavusoglu/skern/main/scripts/install.ps1 | iex
53+
$env:SKERN_VERSION = 'v0.3.0'; irm https://raw.githubusercontent.com/devrimcavusoglu/skern/main/scripts/install.ps1 | iex
5454
```
5555

5656
## Build from source

docs/.vitepress/config.mts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default defineConfig({
4040
{ text: 'Installation', link: '/guide/installation' },
4141
{ text: 'Quick Start', link: '/guide/quick-start' },
4242
{ text: 'Agent Setup', link: '/guide/agent-setup' },
43+
{ text: 'Writing Skills', link: '/writing-skills' },
4344
],
4445
},
4546
],
@@ -73,6 +74,11 @@ export default defineConfig({
7374
{ text: 'Claude Code', link: '/platforms/claude-code' },
7475
{ text: 'Codex CLI', link: '/platforms/codex-cli' },
7576
{ text: 'OpenCode', link: '/platforms/opencode' },
77+
{ text: 'Cursor', link: '/platforms/cursor' },
78+
{ text: 'Gemini CLI', link: '/platforms/gemini-cli' },
79+
{ text: 'GitHub Copilot', link: '/platforms/github-copilot' },
80+
{ text: 'Windsurf', link: '/platforms/windsurf' },
81+
{ text: 'Continue', link: '/platforms/continue' },
7682
],
7783
},
7884
],

docs/concepts/index.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ Skern separates concerns into four layers:
55
```
66
Skill Author --> skern --> Registry --> Agent Runtime
77
|
8-
+-------+-------+
9-
| | |
10-
Claude Codex OpenCode
11-
Code CLI
8+
+---------+---------+---------+---------+
9+
| | | | | | |
10+
Claude Codex Open Cursor Gemini Copilot Continue / Windsurf / ...
11+
Code CLI Code CLI
1212
```
1313

1414
## Layers
1515

1616
### Skill Definition
1717

18-
Metadata and behavior live in a single `SKILL.md` file. The file uses YAML frontmatter for structured fields (name, description, author, version, allowed-tools) and markdown body for the skill's instructions.
18+
Metadata and behavior live in a single `SKILL.md` file. The file uses YAML frontmatter for structured fields (name, description, author, version, tags, allowed-tools) and markdown body for the skill's instructions.
1919

2020
See [Skill Format](/concepts/skill-format) for the full specification.
2121

@@ -30,12 +30,20 @@ See [Registry](/concepts/registry) for details.
3030

3131
### Validation
3232

33-
Before a skill enters the registry, skern validates it against the [Agent Skills](https://agentskills.io) specification. This includes name format checks, description requirements, and overlap detection against existing skills.
33+
Before a skill enters the registry, skern validates it against the [Agent Skills](https://agentskills.io) specification. This includes name format checks, description requirements, folder integrity (referenced files exist), and overlap detection against existing skills. Validation also surfaces stylistic **hints** (short body, vague description, missing trigger prefix) that don't affect validity.
3434

3535
See [Validation](/reference/validation) and [Overlap Detection](/reference/overlap-detection) for rules and thresholds.
3636

3737
### Platform Adapters
3838

39-
Each supported platform has an adapter that knows where to install skills. Adapters copy the `SKILL.md` to the platform-specific directory, making the skill immediately available to the agent runtime.
39+
Each supported platform has an adapter that knows where to install skills. Adapters copy the skill directory (`SKILL.md` plus any sibling files and subdirectories) to the platform-specific location, making the skill immediately available to the agent runtime.
4040

41-
See [Platform Adapters](/concepts/platform-adapters) for how adapters work.
41+
Adapters are **declarative**: every supported platform is one row in `Specs` in [`internal/platform/spec.go`](https://github.com/devrimcavusoglu/skern/blob/main/internal/platform/spec.go). A single generic `Adapter` struct implements every platform's interface from the spec — no per-platform Go file is required.
42+
43+
See [Platform Adapters](/concepts/platform-adapters) for how adapters work and the full path reference.
44+
45+
## Dynamic Skill Loading
46+
47+
Skern is not just a one-shot installer. The `install` and `uninstall` commands return a `capacity` block (installed count, per-scope threshold, headroom, over-budget flag) so agents can size their working set to a context budget. Pass `--enforce-budget` to refuse installs that would exceed the threshold.
48+
49+
See the [Quick Start](/guide/quick-start#3-install-to-a-platform) for the workflow.

docs/concepts/skill-format.md

Lines changed: 70 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,131 @@
11
# Skill Format
22

3-
Skills follow the [Agent Skills](https://agentskills.io) open standard. Each skill is a single `SKILL.md` file with YAML frontmatter and a markdown body.
3+
Skills follow the [Agent Skills](https://agentskills.io) open standard. Each skill is a directory containing a `SKILL.md` file with YAML frontmatter and a markdown body, plus any optional companion files.
44

55
## Structure
66

77
```markdown
88
---
99
name: code-review
10-
description: Review PRs for style and correctness
10+
description: |
11+
Use when reviewing pull requests for style and correctness.
1112
tags:
1213
- review
1314
- quality
14-
version: 1.0.0
15-
author:
16-
name: Jane Doe
17-
type: human
1815
allowed-tools:
1916
- Read
2017
- Grep
2118
- Glob
19+
metadata:
20+
author:
21+
name: Jane Doe
22+
type: human # human | agent
23+
platform: claude-code # only when type=agent
24+
version: "1.0.0"
25+
modified-by: # append-only provenance
26+
- name: codex-cli
27+
type: agent
28+
platform: codex-cli
29+
date: "2026-04-12T10:30:00Z"
2230
---
2331

24-
## Instructions
32+
## Overview
2533

26-
Review pull requests for:
27-
- Code style consistency
28-
- Correctness of logic
29-
- Test coverage
34+
1-2 sentence core principle of the skill.
35+
36+
## When to Use
37+
38+
- Triggering conditions and symptoms
39+
40+
## Core Pattern
41+
42+
The main technique or pattern (before/after for techniques).
3043
```
3144

3245
## Frontmatter Fields
3346

3447
| Field | Required | Description |
3548
|-------|----------|-------------|
36-
| `name` | Yes | Skill name matching `[a-z0-9]+(-[a-z0-9]+)*`, 1-64 chars |
37-
| `description` | Yes | What the skill does, max 1024 chars |
38-
| `version` | No | Semantic version (e.g., `1.0.0`) |
39-
| `author.name` | No | Author name |
40-
| `author.type` | No | `human` or `agent` |
41-
| `author.platform` | No | Platform name (e.g., `claude-code`) |
49+
| `name` | Yes | Skill name matching `[a-z0-9]+(-[a-z0-9]+)*`, 1-64 chars. Must equal the directory name. |
50+
| `description` | Yes | What the skill does — start with "Use when…". Max 1024 chars. |
4251
| `tags` | No | List of classification tags |
43-
| `allowed-tools` | No | List of tools the skill may use |
44-
| `modified-by` | No | Modification history entries |
52+
| `allowed-tools` | No | Tools the skill may use. No empty entries. |
53+
| `metadata.author.name` | No | Author name |
54+
| `metadata.author.type` | No | `human` or `agent` |
55+
| `metadata.author.platform` | No | Platform name (e.g. `claude-code`) — used when `type: agent` |
56+
| `metadata.version` | No | Semantic version (e.g. `1.0.0`); defaults to `0.0.1` on `skill create` |
57+
| `metadata.modified-by` | No | Append-only modification history (set via `skern skill edit --modified-by`) |
58+
59+
`name` and `description` are the only hard requirements. The rest help discovery, validation, and provenance.
4560

4661
## Body
4762

4863
The markdown body contains the skill's instructions. This is what the agent reads when the skill is activated. It must be non-empty.
4964

65+
The recommended body structure (also what `skern skill create` scaffolds) is:
66+
67+
1. **Overview** — 1-2 sentence core principle
68+
2. **When to Use** — triggering conditions
69+
3. **Core Pattern** — the main technique
70+
4. **Quick Reference** — scannable summary
71+
5. **Common Mistakes** — frequent errors and fixes
72+
73+
See [Writing Skills](/writing-skills) for details on what makes a discoverable, well-structured skill.
74+
5075
## Author Provenance
5176

52-
Skills track author metadata and an optional `modified-by` history. `skern skill show` displays the full provenance chain when present, including editor name, type (human/agent), platform, and date.
77+
Skills track an author and an append-only `modified-by` history. `skern skill show` prints the full provenance chain when present, including editor name, type (human/agent), platform, and date. `skern skill edit --modified-by <name>` adds a new entry without overwriting earlier ones.
5378

5479
## Folder Structure
5580

56-
Skills can include additional files alongside `SKILL.md` — helper scripts, templates, configuration files, and other assets. When a skill is installed to a platform, the entire directory is copied.
81+
A skill is a directory. `SKILL.md` is the manifest; sibling files travel with it.
5782

5883
```
5984
my-skill/
6085
├── SKILL.md
86+
├── references/
87+
│ └── notes.md
6188
├── scripts/
6289
│ ├── convert.py
6390
│ └── setup.sh
6491
└── assets/
6592
└── template.json
6693
```
6794

68-
The `scripts/` directory is language-agnostic — skills can include Python, shell, JavaScript, or any other scripts. The agent decides which language is appropriate for the skill.
95+
When a skill is installed to a platform, the **entire directory** is copied. The `scripts/` directory is language-agnostic — skills can include Python, shell, JavaScript, or any other scripts. The agent decides which language is appropriate.
6996

70-
Use `skern skill show <name>` to see which files are bundled with a skill, and `skern skill validate <name>` to check that files referenced in the skill body actually exist.
97+
`skern skill validate <name>` checks that files referenced in the body (via backticks or markdown links) actually exist in the skill directory. Missing references produce **warnings**, not errors. `skern skill show <name>` lists every file bundled with the skill.
7198

7299
## Creating Skills
73100

74101
Use `skern skill create` to scaffold a new skill:
75102

76103
```sh
77104
skern skill create code-review \
78-
--description "Review PRs for style and correctness" \
105+
--description "Use when reviewing PRs for style and correctness" \
79106
--author "Jane Doe" \
80-
--author-type human
107+
--author-type human \
108+
--version 1.0.0 \
109+
--tags review,quality
81110
```
82111

83-
Or seed from another skill. `--from-template <dir>` requires a **skill directory**
84-
— a directory containing `SKILL.md` and any optional companion files
85-
(`references/`, `templates/`, `VENDORED.md`, …). Skern parses the template's
86-
frontmatter and copies every sibling into the new skill:
112+
Or seed from another skill. `--from-template <dir>` requires a **skill directory** — a directory containing `SKILL.md` and any optional companion files (`references/`, `templates/`, `VENDORED.md`, …). Skern parses the template's frontmatter and copies every sibling into the new skill:
113+
114+
```sh
115+
skern skill create code-review \
116+
--from-template ~/.skern/skills/source-template
117+
```
118+
119+
A bare file path (a `SKILL.md` or a body-only markdown file) is rejected with an error pointing at the parent directory. The CLI `<name>` argument always wins over the template's name; other flags (`--description`, `--tags`, `--author*`, `--version`) override template values when explicitly set, otherwise the template's values are preserved.
120+
121+
## Importing Skills
122+
123+
`skern skill import <url>` pulls an existing skill into the registry from a GitHub repository directory or gist:
87124

88125
```sh
89-
# Seeds the new skill from an existing skill directory. SKILL.md frontmatter
90-
# (description, tags, metadata.author, metadata.version) is preserved; all
91-
# sibling files and subdirectories are copied alongside the new SKILL.md.
92-
skern skill create code-review --from-template ~/.skern/skills/source-template
126+
skern skill import https://github.com/owner/repo/tree/main/skills/code-review
127+
skern skill import https://gist.github.com/<id>
128+
skern skill import <url> --name local-name --scope project
93129
```
94130

95-
A bare file path (e.g., a `SKILL.md` or a markdown body file) is rejected with
96-
an error pointing you at the parent directory. The CLI `<name>` argument
97-
always wins over the template's `name`; other flags
98-
(`--description`, `--tags`, `--author*`, `--version`) override template values
99-
when explicitly set, otherwise the template's values are preserved.
131+
Overlap detection runs on import too — pass `--force` to override a near-duplicate block.

0 commit comments

Comments
 (0)