skillmds 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,27 @@
1
+ # Changelog
2
+
3
+ All notable changes to `skillmds` are documented here. Versions follow [semver](https://semver.org).
4
+
5
+ ## 1.0.3
6
+
7
+ - CLI (`skillmd`) and MCP server (`skillmds`) now report their version from `package.json` instead of a hardcoded string.
8
+ - READMEs rewritten; added this changelog.
9
+
10
+ ## 1.0.2
11
+
12
+ - `skillmd lint`: skip directories that cannot be read (e.g. `EPERM` on protected system folders) instead of aborting the scan.
13
+
14
+ ## 1.0.1
15
+
16
+ - Fix `skillmd_lint` in the MCP server: keep `yaml` external in the bundled engine so it loads at runtime (bundling a CommonJS module into ESM raised `Dynamic require of "process"`).
17
+
18
+ ## 1.0.0
19
+
20
+ - Add the `skillmd` CLI, shipped alongside the MCP server in this package. Commands: `lint`/`check`, `scan`, `rules`, `init`, `search`, `add`, `list`, `remove`, `update`, `publish`/`submit`, `login`, `logout`.
21
+ - Validation engine shared with the SkillMD registry: `SKILL.md` parser, lint rules `SK001`–`SK040`, security scan, quality score, and `text`/`json`/`sarif`/`github` output.
22
+ - Add the `skillmd_lint` MCP tool.
23
+ - MCP server and CLI authenticate with `Authorization: Bearer` tokens.
24
+
25
+ ## 0.1.1
26
+
27
+ - Initial MCP server: `skillmd_search`, `skillmd_get`, `skillmd_install`, `skillmd_trending`, `skillmd_recommend`, `skillmd_list_saved`.
package/README.md CHANGED
@@ -1,127 +1,111 @@
1
1
  <p align="center">
2
- <img src="https://skillmd.com/skillmd-banner.jpg" alt="SkillMD" width="640">
2
+ <img src="https://skillmd.com/skillmd-banner.jpg" alt="SkillMD" width="560">
3
3
  </p>
4
4
 
5
5
  # skillmds
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/skillmds.svg)](https://www.npmjs.com/package/skillmds)
8
- [![npm downloads](https://img.shields.io/npm/dm/skillmds.svg)](https://www.npmjs.com/package/skillmds)
9
8
  [![license](https://img.shields.io/npm/l/skillmds.svg)](#license)
10
9
 
11
- > SkillMD for agents — the official **MCP server** *and* the **`skillmd` CLI** for **[SkillMD](https://skillmd.com)**, the open, verified registry of Agent Skills.
10
+ Tools for working with [Agent Skills](https://docs.claude.com/en/docs/agents-and-tools/agent-skills) (`SKILL.md`) from the [SkillMD](https://skillmd.com) registry. One package, two binaries:
12
11
 
13
- This one package ships two tools:
12
+ - **`skillmd`** — a CLI to lint, scan, search, install, and publish skills.
13
+ - **`skillmds`** — an MCP server exposing the registry to MCP clients (Claude Code, Claude Desktop, Cursor, …).
14
14
 
15
- - **`skillmds`** — an MCP server so any MCP-capable agent (Claude Code, Claude Desktop, Cursor, …) can search, fetch, validate, and install `SKILL.md` skills with no copy-paste.
16
- - **`skillmd`** — a CLI that lints and security-scans skills before installing or publishing them. *The registry that lints.*
15
+ Both validate `SKILL.md` with the same engine, so the CLI and the registry apply identical rules.
17
16
 
18
- ---
19
-
20
- ## CLI quick start
17
+ ## Install
21
18
 
22
19
  ```bash
23
- npm i -g skillmds # installs the `skillmd` command (and `skillmds`)
24
-
25
- skillmd lint ./my-skill # validate against the spec + quality score
26
- skillmd lint . --format sarif # SARIF for GitHub Code Scanning
27
- skillmd scan . --deny executes_scripts
28
- skillmd search pdf --verified
29
- skillmd add anthropic/pdf -a claude-code -g # lints before installing
30
- skillmd init my-skill
31
- skillmd login && skillmd publish ./my-skill # refuses to publish on lint errors
20
+ npm i -g skillmds
32
21
  ```
33
22
 
34
- Without a global install, run a one-off with `npx -p skillmds skillmd lint .`.
35
- Commands: `lint`/`check`, `scan`, `rules`, `init`, `search`, `add`, `list`, `remove`, `update`, `publish`, `login`. All support `--json`.
36
-
37
- ---
38
-
39
- ## MCP server
40
-
41
- ## Install
42
-
43
- **Claude Code** (one line):
23
+ This installs both the `skillmd` and `skillmds` commands. To run the CLI without installing:
44
24
 
45
25
  ```bash
46
- claude mcp add skillmds -- npx -y skillmds
26
+ npx -p skillmds skillmd lint .
47
27
  ```
48
28
 
49
- **Claude Desktop / Cursor / any MCP client** — add to your MCP config:
29
+ ## CLI: `skillmd`
50
30
 
51
- ```jsonc
52
- {
53
- "mcpServers": {
54
- "skillmds": {
55
- "command": "npx",
56
- "args": ["-y", "skillmds"]
57
- }
58
- }
59
- }
60
- ```
31
+ | Command | Description |
32
+ |---|---|
33
+ | `skillmd lint [path]` (`check`) | Validate `SKILL.md` files; print diagnostics and a quality score. |
34
+ | `skillmd scan [path]` | Report scripts, network calls, and secret access. |
35
+ | `skillmd rules [id]` | List lint rules, or show one. |
36
+ | `skillmd init [name]` | Create a `SKILL.md` from a template. |
37
+ | `skillmd search <query>` | Search the registry. |
38
+ | `skillmd add <source>` | Install a skill (registry slug, GitHub repo, or local path). Lints before writing. |
39
+ | `skillmd list` (`ls`) | List installed skills. |
40
+ | `skillmd remove <names...>` (`rm`) | Remove installed skills. |
41
+ | `skillmd update [names...]` | Update installed skills from the registry. |
42
+ | `skillmd publish [path]` (`submit`) | Publish to the registry. Exits non-zero on lint errors. |
43
+ | `skillmd login` / `logout` | Store or remove a token. |
61
44
 
62
- That's it. Restart your client and the SkillMD tools are available.
45
+ All commands accept `--json`.
63
46
 
64
- ---
47
+ ### lint
65
48
 
66
- ## What you can do
49
+ ```bash
50
+ skillmd lint ./my-skill
51
+ skillmd lint . --format sarif > skillmd.sarif
52
+ skillmd lint . --strict
53
+ skillmd lint . --fix
54
+ ```
67
55
 
68
- Once connected, just ask your agent in plain language:
56
+ Formats: `text` (default), `json`, `sarif` (GitHub Code Scanning), `github` (Actions annotations).
57
+ Exit codes: `0` clean, `1` errors (or warnings with `--strict` / `--fail-on-warning`), `2` usage error.
69
58
 
70
- - *"Find a skill for optimizing Dockerfiles."*
71
- - *"Install the anthropic/pdf skill."*
72
- - *"What are the top-rated data skills right now?"*
59
+ ### add
73
60
 
74
- The agent picks the right tool, fetches the skill from SkillMD, and writes it into your skills directory.
61
+ ```bash
62
+ skillmd add anthropic/pdf # registry slug (verified-only by default)
63
+ skillmd add owner/repo # GitHub repo
64
+ skillmd add ./path # local
65
+ skillmd add anthropic/pdf -a claude-code -g
66
+ skillmd add some/skill --deny executes_scripts
67
+ skillmd add some/skill --skip-lint
68
+ ```
75
69
 
76
- ## Tools
70
+ ### publish
77
71
 
78
- | Tool | Auth | What it does |
79
- | --- | --- | --- |
80
- | `skillmd_search` | – | Search skills by name, description, or task (filter by category, type, rating, verified). |
81
- | `skillmd_get` | – | Fetch one skill by `owner/name`, with its `SKILL.md`, provenance, license, and security flags. |
82
- | `skillmd_install` | – | Write a skill's `SKILL.md` into your agent's skills dir. **Never executes scripts.** |
83
- | `skillmd_trending` | – | Top skills on the leaderboard (`30d` or `all`, optional category). |
84
- | `skillmd_recommend` | – | Skills similar to one you give, or trending if none. |
85
- | `skillmd_list_saved` | token | Your saved skills (requires `SKILLMD_TOKEN`). |
86
- | `skillmd_lint` | – | Validate a SKILL.md against the spec; returns diagnostics, security flags, and a quality score (0-100). Pass `content` or a `slug`. |
72
+ ```bash
73
+ skillmd login # store a token from your skillmd.com account
74
+ skillmd publish ./my-skill # blocked on lint errors
75
+ skillmd publish ./my-skill --dry-run
76
+ skillmd publish ./my-skill --force # publish despite warnings; never bypasses errors
77
+ ```
87
78
 
88
- By default, `skillmd_install` writes to `~/.claude/skills/<name>/SKILL.md`. Pass a `dest` to target another directory.
79
+ ## MCP server: `skillmds`
89
80
 
90
- ## Configuration
81
+ Claude Code:
91
82
 
92
- Both are optional environment variables:
93
-
94
- | Variable | Default | Purpose |
95
- | --- | --- | --- |
96
- | `SKILLMD_API` | `https://skillmd-api.vinoor.workers.dev` | Override the API base URL. |
97
- | `SKILLMD_TOKEN` | – | SkillMD personal access token; enables `skillmd_list_saved` and personalized recommendations. |
83
+ ```bash
84
+ claude mcp add skillmds -- npx -y skillmds
85
+ ```
98
86
 
99
- Example with a token:
87
+ Other MCP clients:
100
88
 
101
89
  ```jsonc
102
90
  {
103
91
  "mcpServers": {
104
- "skillmds": {
105
- "command": "npx",
106
- "args": ["-y", "skillmds"],
107
- "env": { "SKILLMD_TOKEN": "skillmd_pat_…" }
108
- }
92
+ "skillmds": { "command": "npx", "args": ["-y", "skillmds"] }
109
93
  }
110
94
  }
111
95
  ```
112
96
 
113
- ## Safety
114
-
115
- SkillMD shows security flags (executes scripts, network calls, reads secrets, or docs-only) parsed from every skill's files, and **this server never runs a skill's scripts** — `skillmd_install` only writes the `SKILL.md` to disk. Review a skill before relying on it, especially from unverified authors.
97
+ Tools: `skillmd_search`, `skillmd_get`, `skillmd_install`, `skillmd_trending`, `skillmd_recommend`, `skillmd_list_saved`, `skillmd_lint`. `skillmd_install` writes a skill's `SKILL.md` and never executes scripts.
116
98
 
117
- ## Requirements
99
+ ## Configuration
118
100
 
119
- - Node.js **18+**
101
+ Resolution order, highest first:
120
102
 
121
- ## Links
103
+ | Setting | Sources |
104
+ |---|---|
105
+ | Token | `--token` → `SKILLMD_TOKEN` → `~/.skillmd/config.json` |
106
+ | API base | `--api` → `SKILLMD_API` → default registry |
122
107
 
123
- - 🌐 Registry: **[skillmd.com](https://skillmd.com)**
124
- - 🧩 What is an Agent Skill? See the [FAQ](https://skillmd.com/#faq)
108
+ `SKILLMD_TOKEN` enables `skillmd_list_saved`, personalized recommendations, and publishing.
125
109
 
126
110
  ## License
127
111
 
@@ -12,8 +12,17 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
12
12
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
13
13
  import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
14
14
  import { mkdir, writeFile } from "node:fs/promises";
15
+ import { readFileSync } from "node:fs";
15
16
  import { homedir } from "node:os";
16
17
  import { join, resolve } from "node:path";
18
+
19
+ const VERSION = (() => {
20
+ try {
21
+ return JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
22
+ } catch {
23
+ return "0.0.0";
24
+ }
25
+ })();
17
26
  // Shared validation engine, bundled into ./vendor at publish time (npm run build).
18
27
  // Falls back gracefully if the vendor build is absent (e.g. running from source).
19
28
  let lint = null;
@@ -187,7 +196,7 @@ async function handleCall(name, args) {
187
196
  }
188
197
  }
189
198
 
190
- const server = new Server({ name: "skillmd", version: "1.0.1" }, { capabilities: { tools: {} } });
199
+ const server = new Server({ name: "skillmd", version: VERSION }, { capabilities: { tools: {} } });
191
200
  server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
192
201
  server.setRequestHandler(CallToolRequestSchema, async (req) => {
193
202
  try {
package/dist/cli.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // ../cli/src/index.ts
2
2
  import { Command as Command12 } from "commander";
3
+ import { readFileSync as readFileSync4 } from "fs";
3
4
 
4
5
  // ../cli/src/commands/lint.ts
5
6
  import { Command } from "commander";
@@ -275,7 +276,13 @@ import { join, basename, dirname } from "path";
275
276
  var IGNORE_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", ".wrangler"]);
276
277
  function findSkillFiles(dir) {
277
278
  const out = [];
278
- for (const entry of readdirSync(dir, { withFileTypes: true })) {
279
+ let entries;
280
+ try {
281
+ entries = readdirSync(dir, { withFileTypes: true });
282
+ } catch {
283
+ return out;
284
+ }
285
+ for (const entry of entries) {
279
286
  if (entry.isDirectory()) {
280
287
  if (IGNORE_DIRS.has(entry.name)) continue;
281
288
  out.push(...findSkillFiles(join(dir, entry.name)));
@@ -914,7 +921,12 @@ function logoutCommand() {
914
921
  }
915
922
 
916
923
  // ../cli/src/index.ts
917
- var program = new Command12("skillmd").version("1.0.0").description("The registry that lints. Discover, validate, and install verified Agent Skills.").option("--json", "machine-readable output").option("--token <token>", "SkillMD personal access token").option("--api <url>", "override the registry API base URL");
924
+ var version = "0.0.0";
925
+ try {
926
+ version = JSON.parse(readFileSync4(new URL("../package.json", import.meta.url), "utf8")).version;
927
+ } catch {
928
+ }
929
+ var program = new Command12("skillmd").version(version).description("Lint, validate, and install Agent Skills from the SkillMD registry.").option("--json", "machine-readable output").option("--token <token>", "SkillMD personal access token").option("--api <url>", "override the registry API base URL");
918
930
  program.addCommand(lintCommand());
919
931
  program.addCommand(scanCommand());
920
932
  program.addCommand(rulesCommand());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillmds",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "SkillMD for agents: the `skillmds` MCP server + the `skillmd` CLI (lint, scan, search, install, publish Agent Skills) from skillmd.com.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,7 +27,7 @@
27
27
  "bugs": { "url": "https://skillmd.com/contact" },
28
28
  "author": "SkillMD",
29
29
  "license": "MIT",
30
- "files": ["bin", "dist", "vendor", "README.md"],
30
+ "files": ["bin", "dist", "vendor", "README.md", "CHANGELOG.md"],
31
31
  "engines": { "node": ">=18" },
32
32
  "dependencies": {
33
33
  "@clack/prompts": "^0.8.0",