@ssheleg/make-skill 0.7.1 → 0.8.0

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.
@@ -0,0 +1,141 @@
1
+ # Trust, evaluation, governance — skills other people install
2
+
3
+ **Load this when:** installing or reviewing a skill you did not write, publishing
4
+ one that others will run, or running a fleet of skills across a team or org
5
+ (recall limits, approval gates, lifecycle, rollback).
6
+
7
+ Source: Anthropic's
8
+ [Skills for enterprise](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/enterprise)
9
+ plus the security section of the
10
+ [overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview).
11
+ *Read from both on 2026-08-03.*
12
+
13
+ ## Contents
14
+
15
+ - Why this is a security boundary at all
16
+ - Risk tiers — what to look for
17
+ - Review checklist before installing anything
18
+ - Approval gates — the five evaluation dimensions
19
+ - Lifecycle
20
+ - Registry — what to record per skill
21
+ - Recall limits and consolidation
22
+ - Versioning, rollback, integrity
23
+
24
+ ## Why this is a security boundary at all
25
+
26
+ A skill is text an agent executes, plus code the agent runs without reading it
27
+ into context. Installing one is installing software: it can direct the agent to
28
+ invoke tools, read files, and send data anywhere the agent can reach. Use skills
29
+ you wrote or that come from a source you trust; audit anything else **before**
30
+ install, not after the first odd result.
31
+
32
+ This cuts both ways. A skill you publish is asking strangers for that trust, so
33
+ ship the things that make an audit cheap: a real `SECURITY.md`, no network calls
34
+ the README doesn't mention, no credentials anywhere, and scripts small enough to
35
+ read.
36
+
37
+ ## Risk tiers — what to look for
38
+
39
+ | Indicator | What to look for | Concern |
40
+ |---|---|---|
41
+ | Code execution | `*.py`, `*.sh`, `*.js` in the skill dir | **High** — runs with the agent's full environment access |
42
+ | Instruction manipulation | "ignore previous rules", hiding actions from the user, behavior that changes on a trigger word | **High** — bypasses controls |
43
+ | MCP server references | `ServerName:tool_name` / `mcp__server__tool` instructions | **High** — extends reach beyond the skill |
44
+ | Network patterns | URLs, `fetch`, `curl`, `requests`, `urllib` | **High** — exfiltration vector |
45
+ | Hardcoded credentials | keys, tokens, passwords in files or scripts | **High** — leaks into git history and context |
46
+ | Filesystem scope | paths outside the skill dir, broad globs, `../` | Medium |
47
+ | Tool invocations | instructions to use bash / file ops | Medium — read what they do |
48
+
49
+ Combined risk is the real one: file-read **plus** network in the same skill is a
50
+ different question from either alone.
51
+
52
+ ## Review checklist before installing anything
53
+
54
+ 1. **Read every file** — `SKILL.md`, each referenced markdown file, every script,
55
+ and anything bundled that isn't obviously inert.
56
+ 2. **Run scripts in a sandbox** and confirm the behavior matches the stated
57
+ purpose.
58
+ 3. **Look for adversarial instructions** — telling the agent to ignore safety
59
+ rules, hide steps from the user, encode data into its own replies, or behave
60
+ differently on a specific input.
61
+ 4. **Grep for network access** (`http`, `requests.get`, `urllib`, `curl`, `fetch`)
62
+ and confirm each hit is documented.
63
+ 5. **Verify no hardcoded credentials.** Secrets belong in env vars or a credential
64
+ store, never in skill content.
65
+ 6. **List every tool and command** the skill tells the agent to invoke.
66
+ 7. **Confirm redirect destinations** — external URLs must point where the docs say.
67
+ 8. **Look for exfiltration shapes**: read sensitive data → write, send, or encode
68
+ it outward, including through the agent's own conversational output.
69
+
70
+ An external URL fetched at runtime is the sharpest edge: the content can change
71
+ after your review, so a skill that pulls instructions from a URL is only as
72
+ trustworthy as that URL is today.
73
+
74
+ ## Approval gates — the five evaluation dimensions
75
+
76
+ A bad skill degrades the agent even when nothing malicious happens. Gate on all
77
+ five, not just "does it work":
78
+
79
+ | Dimension | Question | Example failure |
80
+ |---|---|---|
81
+ | Triggering accuracy | fires for the right queries, stays quiet otherwise | fires on every mention of a spreadsheet |
82
+ | Isolation | works correctly on its own | references a file that isn't in the directory |
83
+ | **Coexistence** | does adding it degrade the skills already installed | its broad description steals another skill's triggers |
84
+ | Instruction following | does the agent actually follow the steps | skips the validation step, uses the wrong library |
85
+ | Output quality | is the result correct and useful | reports render with missing data |
86
+
87
+ Require 3–5 representative queries per skill covering should-trigger,
88
+ should-NOT-trigger, and ambiguous cases, run on every model in scope (Haiku,
89
+ Sonnet, Opus). Coexistence is the one authors skip and the one that breaks a
90
+ family of skills shipped from one repo — test a new member against the installed
91
+ set, not alone.
92
+
93
+ Reading the results: declining trigger accuracy → fix the description; coexistence
94
+ conflicts → narrow descriptions or merge the skills; persistently low output
95
+ quality → rewrite or add validation; persistent failure across updates → deprecate.
96
+
97
+ ## Lifecycle
98
+
99
+ 1. **Plan** — pick workflows that are repetitive, error-prone, or need specialist
100
+ knowledge. Map them to roles.
101
+ 2. **Create and review** — author follows the craft rules; a security review and an
102
+ eval suite are required. **Separation of duties: an author does not review their
103
+ own skill.**
104
+ 3. **Test** — in isolation and alongside the existing set.
105
+ 4. **Deploy** — one channel per agent (`references/distribution.md`), or the Skills
106
+ API for workspace-wide (`references/surfaces.md`). Record it in the registry.
107
+ 5. **Monitor** — usage analytics do not exist in the Skills API; log which skills a
108
+ request included at the application level. Re-run evals periodically: models and
109
+ workflows drift under a frozen skill.
110
+ 6. **Iterate or deprecate** — full eval suite passes before a new version is
111
+ promoted; retire skills whose evals keep failing or whose workflow is gone.
112
+
113
+ ## Registry — what to record per skill
114
+
115
+ Purpose · owner (team or person) · deployed version · dependencies (MCP servers,
116
+ packages, external services) · last evaluation date and result. Without an owner
117
+ and a date, "is this still true?" has no answer and the skill rots in place.
118
+
119
+ ## Recall limits and consolidation
120
+
121
+ Every installed skill's name and description sits in the system prompt competing
122
+ for attention. Past some number — measure it, don't guess — the agent starts
123
+ picking the wrong skill or missing the right one. The API caps a request at 8
124
+ skills, which is a useful ceiling to design toward even off-API.
125
+
126
+ Start narrow and workflow-specific (`formatting-sales-reports`,
127
+ `querying-pipeline-data`), consolidate into role bundles (`sales-operations`) only
128
+ when evals show the merged skill matches what it replaced. Group by role so each
129
+ user's active set stays focused.
130
+
131
+ ## Versioning, rollback, integrity
132
+
133
+ - **Production pins an exact version.** "latest" in production means an untested
134
+ skill can arrive between two identical requests.
135
+ - **Every update is a new deployment** — full security review and full eval suite,
136
+ not a diff review.
137
+ - **Keep the previous version installable** and revert immediately on a regression.
138
+ - **Verify integrity**: checksum what you reviewed and check it at deploy time; use
139
+ signed commits in the skill repo so provenance is more than a claim.
140
+ - **Git is the source of truth**, one directory per skill, changes through pull
141
+ requests — which also gives you the rollback and the audit trail for free.
@@ -9,6 +9,16 @@ build against and re-verify method names before locking a contract — MCP versi
9
9
  by date and the negotiated `protocolVersion` string is part of the handshake.
10
10
  *Read from the spec on 2026-07-28.*
11
11
 
12
+ ## Contents
13
+
14
+ - Skill vs MCP server — pick the right one
15
+ - Architecture, lifecycle
16
+ - Server primitives and methods
17
+ - Client primitives (sampling, elicitation, roots)
18
+ - Transports
19
+ - Security — the parts a skill must respect
20
+ - Gotchas when writing an MCP-adjacent skill
21
+
12
22
  ## Skill vs MCP server — pick the right one
13
23
 
14
24
  | Need | Build |
@@ -108,10 +118,13 @@ The spec is explicit that MCP grants arbitrary data access and execution:
108
118
 
109
119
  ## Gotchas when writing an MCP-adjacent skill
110
120
 
111
- - **Name tools, don't guess them.** Tool names are server-namespaced and hosts
112
- often prefix them (`mcp__<server>__<tool>`). Hardcoding a bare name in a skill
113
- breaks on half the hosts — tell the agent to list tools and match, and give the
114
- exact name only as a hint.
121
+ - **Name tools, don't guess them — and never bare.** A bare `create_issue` is the
122
+ documented cause of "tool not found" once two servers are connected. Qualify it:
123
+ Anthropic's authoring guidance writes `ServerName:tool_name` (`GitHub:create_issue`),
124
+ while Claude Code's own runtime names are `mcp__<server>__<tool>` and a
125
+ plugin's own server is `mcp__plugin_<plugin>_<server>__<tool>`. Since the form
126
+ differs per host, tell the agent to **list tools and match**, and give the exact
127
+ string only as a hint.
115
128
  - **The tool list is dynamic.** Never assert a tool exists; instruct a fallback
116
129
  when it is missing (the server may be unauthenticated, disconnected, or gated).
117
130
  - **Remote servers need auth the agent cannot do**: OAuth flows are interactive.
@@ -0,0 +1,139 @@
1
+ # Surfaces — where a skill runs, and what breaks when it moves
2
+
3
+ **Load this when:** the skill must work anywhere except Claude Code — uploading
4
+ through the Skills API, shipping to claude.ai, or writing `scripts/` that assume
5
+ network access or a package install.
6
+
7
+ Source: Anthropic's
8
+ [Agent Skills overview](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview)
9
+ and [Using Agent Skills with the API](https://platform.claude.com/docs/en/build-with-claude/skills-guide).
10
+ *Read from both on 2026-08-03.* The API is beta; re-check the header dates and
11
+ limits before locking a contract.
12
+
13
+ ## Contents
14
+
15
+ - The surface matrix — one table that decides portability
16
+ - Nothing syncs — each surface is a separate deployment
17
+ - Runtime constraints authors get wrong
18
+ - Skills API — upload, version, attach
19
+ - claude.ai
20
+ - Pre-built Anthropic skills
21
+ - Data retention
22
+
23
+ ## The surface matrix — one table that decides portability
24
+
25
+ | | Claude Code | Claude API | claude.ai |
26
+ |---|---|---|---|
27
+ | Install | filesystem: `~/.claude/skills/` (personal), `.claude/skills/` (project), or a plugin | upload via `/v1/skills`, attach per request | zip upload in Settings → Features |
28
+ | Sharing | per machine / per repo; plugins for teams | **workspace-wide** — every member sees it | **per user only**; no org-wide push, no admin management |
29
+ | Network at runtime | full — same as any program on the machine | **none** | varies with user/admin settings |
30
+ | Install packages at runtime | yes, but keep it local to the project | **no** — pre-installed only | npm / PyPI / GitHub allowed |
31
+ | Cap per session/request | none | **8 skills per request** | — |
32
+ | Pre-built doc skills | no | yes (`pptx`/`xlsx`/`docx`/`pdf`) | yes |
33
+
34
+ Claude Platform on AWS and Microsoft Foundry behave as the Claude API (on Foundry,
35
+ Agent Skills need a *Hosted on Anthropic* deployment).
36
+
37
+ **The two claude.ai rows are Anthropic's own docs disagreeing**: the overview
38
+ says network access there is full, partial or none depending on user/admin
39
+ settings, while the authoring guide says claude.ai can install from npm and PyPI
40
+ and pull from GitHub. Both are true per-tenant, which means neither is something
41
+ to build on — treat claude.ai as "network may be off" and the skill still has to
42
+ work.
43
+
44
+ ## Nothing syncs — each surface is a separate deployment
45
+
46
+ A skill uploaded to the API is not on claude.ai and not in Claude Code, in any
47
+ direction. There is no sync mechanism and none is planned in the docs. Keep the
48
+ skill directory in git as the single source of truth and treat every surface as a
49
+ publish target — which is exactly what the distribution matrix in
50
+ `references/distribution.md` automates for the filesystem-based agents.
51
+
52
+ ## Runtime constraints authors get wrong
53
+
54
+ Written once for the surface you happen to use, a skill silently fails elsewhere:
55
+
56
+ - **`pip install` / `npm install` in a workflow step** — impossible on the API.
57
+ Either use only pre-installed packages (check the
58
+ [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool)
59
+ list) or state the dependency in `compatibility` and give a fallback path.
60
+ - **`curl`/`requests`/any fetch inside a script** — no network on the API, maybe
61
+ none on claude.ai. A skill whose only path to data is an HTTP call is a Claude
62
+ Code skill; say so in `compatibility`.
63
+ - **Global installs** (`npm i -g`, `pip install --user`) — discouraged even where
64
+ they work: the skill is a guest on the user's machine.
65
+ - **Absolute machine paths** (`/Users/you/...`) — nothing outside the skill
66
+ directory exists on the API or claude.ai container.
67
+
68
+ Declare what you need in front-matter `compatibility` (≤500 chars) and keep the
69
+ skill useful, or explicitly refuse, when it is absent.
70
+
71
+ ## Skills API — upload, version, attach
72
+
73
+ Beta headers: `skills-2025-10-02` enables Skills; `code-execution-2025-08-25`
74
+ enables the code execution tool the skills run in; add `files-api-2025-04-14` when
75
+ uploading inputs or downloading produced files. The overview calls only the skills
76
+ header required, every example in the API guide sends both — send both.
77
+
78
+ **Attach** — `container.skills[]`, max **8** per request, alongside the code
79
+ execution tool:
80
+
81
+ ```python
82
+ response = client.beta.messages.create(
83
+ model="claude-opus-5",
84
+ max_tokens=4096,
85
+ betas=["code-execution-2025-08-25", "skills-2025-10-02"],
86
+ container={"skills": [
87
+ {"type": "anthropic", "skill_id": "pptx", "version": "latest"},
88
+ {"type": "custom", "skill_id": "skill_01AbCdEf…", "version": "latest"},
89
+ ]},
90
+ messages=[{"role": "user", "content": "…"}],
91
+ tools=[{"type": "code_execution_20250825", "name": "code_execution"}],
92
+ )
93
+ ```
94
+
95
+ Reuse `container={"id": response.container.id, "skills": [...]}` to continue in the
96
+ same container, and re-issue the request while `stop_reason == "pause_turn"` for
97
+ long jobs. Files the skill produces come back as `file_id`s — fetch them with the
98
+ Files API.
99
+
100
+ **Upload** — `client.beta.skills.create(files=…)` (a zip, file tuples, or
101
+ `files_from_dir("my_skill")`), or `POST /v1/skills` multipart. Rules that reject an
102
+ upload:
103
+
104
+ | Rule | Detail |
105
+ |---|---|
106
+ | `SKILL.md` at the top level | of the single common root directory all files share |
107
+ | top-level directory name == `name` | case- and underscore-insensitive match |
108
+ | `name` | ≤64 chars, `[a-z0-9-]`, no XML tags, not containing `anthropic` or `claude` |
109
+ | `description` | non-empty, ≤1024 chars, no XML tags |
110
+ | `display_title` | optional, derived from `name`; if set explicitly it must be unique |
111
+ | total upload | **< 30 MB** |
112
+
113
+ **Version** — custom skills version as epoch timestamps
114
+ (`1759178010641129`), Anthropic's own as dates (`20251013`); `"latest"` resolves
115
+ either. New version = `client.beta.skills.versions.create(skill_id, files=…)`;
116
+ pin an exact version in production. **Deleting a skill requires deleting every
117
+ version first** — `skills.versions.delete(...)` in a loop, then `skills.delete(...)`.
118
+ List with `client.beta.skills.list(source="custom")`.
119
+
120
+ ## claude.ai
121
+
122
+ Upload the skill directory as a **zip** in Settings → Features. Requires a Pro,
123
+ Max, Team, or Enterprise plan with code execution enabled. Custom skills there are
124
+ **individual to each user** — there is no org-wide distribution and no admin
125
+ console for them, so "roll this out to the team" means every member uploads it, or
126
+ you use the API/plugin channels instead.
127
+
128
+ ## Pre-built Anthropic skills
129
+
130
+ `pptx`, `xlsx`, `docx`, `pdf` — document creation/editing, available on the API,
131
+ AWS, Foundry and claude.ai, attached by `skill_id` with `"type": "anthropic"`.
132
+ **They are not available in Claude Code** (which instead bundles the open-source
133
+ Claude API skill). Don't rebuild them; don't promise them on the wrong surface.
134
+
135
+ ## Data retention
136
+
137
+ Agent Skills are **not covered by zero-data-retention arrangements** — skill
138
+ definitions and execution data fall under standard retention. If a team is on ZDR
139
+ for a reason, that reason applies to what you put in a skill.
@@ -5,13 +5,13 @@ is absent; never overwrite existing files.
5
5
 
6
6
  | Template | Seeds | Used by |
7
7
  |---|---|---|
8
- | `SKILL.template.md` | a new `skills/<name>/SKILL.md` — spec-legal front-matter (required + optional fields, limits stated inline) and section stubs incl. References and Gotchas | Create / Promote |
8
+ | `SKILL.template.md` | a new `skills/<name>/SKILL.md` — front-matter legal under BOTH rulebooks (limits stated inline, plain placeholders instead of `<angle brackets>`, which count as XML tags and are rejected on upload) and section stubs incl. References and Gotchas | Create / Promote |
9
9
  | `plugin.template.json` | `plugins/<name>/.claude-plugin/plugin.json` | Create (distributable) / Promote |
10
10
  | `marketplace.template.json` | `.claude-plugin/marketplace.json` at the repo root | Create (distributable) / Promote |
11
11
 
12
12
  The two JSON skeletons carry only fields Claude Code recognizes, so
13
13
  `claude plugin validate <path> --strict` passes on the seeded repo. Replace every
14
- `<placeholder>`, keep the `$schema` lines (editor autocomplete), and keep all
14
+ placeholder, keep the `$schema` lines (editor autocomplete), and keep all
15
15
  four versions in sync. Marketplace level takes `name`, `owner`, `plugins`,
16
16
  `$schema`, `description`, `version`, `metadata`,
17
17
  `allowCrossMarketplaceDependenciesOn`, `renames` and nothing else —
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: <skill-name>
3
- description: Use when <concrete triggering conditions and symptoms>. Add trigger phrases in English AND Russian. Describe WHEN to use, not what the skill does. Max 1024 chars.
2
+ name: skill-name-here
3
+ description: Use when CONCRETE TRIGGERING CONDITIONS AND SYMPTOMS. Add trigger phrases in English AND Russian. Say what the skill does AND when to use it, in third person, max 1024 chars, no angle brackets.
4
4
  # Optional, spec-legal — delete the ones you don't need:
5
5
  # license: MIT
6
- # compatibility: <runtime / system packages / required MCP server / protocol version>
6
+ # compatibility: runtime / system packages / required MCP server / protocol version
7
7
  # metadata:
8
- # author: <you>
8
+ # author: you
9
9
  # version: "0.1.0" # quote it, or YAML makes it a float
10
10
  # allowed-tools: Bash(git:*) Read # space-separated string, experimental
11
11
  #
@@ -16,15 +16,20 @@ description: Use when <concrete triggering conditions and symptoms>. Add trigger
16
16
  # background / hooks / paths / shell
17
17
  ---
18
18
 
19
- # <Skill Name>
19
+ # Skill Name
20
20
 
21
21
  <!--
22
- Spec floor (https://agentskills.io/specification):
23
- name 1-64 chars, a-z0-9 and single internal hyphens, == directory name
24
- description 1-1024 chars
22
+ Spec floor — https://agentskills.io/specification plus Anthropic's platform rules
23
+ (https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview):
24
+ name 1-64 chars, a-z0-9 and single internal hyphens, == directory name,
25
+ no angle brackets, never containing "anthropic" or "claude"
26
+ description 1-1024 chars, third person, no angle brackets, what + when
25
27
  body < 500 lines and < 5000 tokens
26
28
  Heavier material → references/ (docs), scripts/ (code), assets/ (templates,
27
- schemas) inside THIS directory, one level deep, each with a stated load trigger.
29
+ schemas) inside THIS directory, one level deep, each linked from the body with a
30
+ stated load trigger. Reference files over 100 lines start with a "## Contents"
31
+ list. Forward slashes in every path. Nothing time-branching: superseded material
32
+ goes under "## Old patterns".
28
33
  -->
29
34
 
30
35
  ## Overview
@@ -41,6 +46,8 @@ What is this? Core principle in 1–2 sentences.
41
46
 
42
47
  Imperative, procedural steps or a before/after example. Checklists over prose.
43
48
  State non-negotiables as such. Give a default, not a menu of equal options.
49
+ Match prescriptiveness to fragility: an exact command for destructive or
50
+ order-dependent work, direction only where context decides.
44
51
 
45
52
  ## Quick reference
46
53
 
@@ -52,7 +59,7 @@ State non-negotiables as such. Give a default, not a menu of equal options.
52
59
 
53
60
  | Read | When |
54
61
  |---|---|
55
- | `references/<file>.md` | <the exact condition that should send the agent there> |
62
+ | `references/FILE.md` | the exact condition that should send the agent there |
56
63
 
57
64
  ## Common mistakes
58
65
 
@@ -63,3 +70,9 @@ State non-negotiables as such. Give a default, not a menu of equal options.
63
70
  - Environment facts that defy reasonable assumptions. Keep these HERE, not in a
64
71
  reference file — the agent can't know to open a file about a trap it doesn't
65
72
  know exists.
73
+
74
+ <!--
75
+ Before shipping: ≥3 evaluations recorded (with should-NOT-trigger cases), run
76
+ against a no-skill baseline and on every model you claim support for; runtime
77
+ needs (network, packages, MCP servers) declared in `compatibility`.
78
+ -->