skill-exposure-manifest
A Python library that binds skill names and aliases to the exact SKILL.md bytes the runtime resolved.
한국어 · Python 3.9+
Install · Quick start · Why · Reference
A library that pins each skill name to the exact SKILL.md it means. Agents such as Claude Code and Codex read a skill's SKILL.md by its name, like atlas-flow. When a folder is renamed or the file is swapped for a link, the agent reads the wrong file or calls a skill that is gone, and it still looks like success.
- Build the list: from the skills folder and a policy file, record "this name (and its aliases) is this file, with this content hash".
- Check on use: take the exact name, re-read the file, and refuse with the reason when the hash changed, a name collides, or the path became a link.
- Keep it complete: find skill folders that are neither registered nor excluded (
unlisted_skills), so a new skill cannot silently drop out.
Building a 64-entry manifest takes 97 ms minimum and 119 ms median, saved in docs/bench/derive.json. JSON in, JSON out, standard library only.
Install
pip install skill-exposure-manifest
Python 3.9+. No dependencies. Verified on macOS arm64 with Python 3.12.
Quick start
from skill_exposure_manifest import canonical_policy_manifest, resolve_canonical_skill
manifest, bound = canonical_policy_manifest("skills", "skills/policy.json")
print(len(manifest["entries"])) # 64
print(manifest["entries"][0])
# {'canonical_name': 'amaranth', 'aliases': [], 'source': {'path': 'amaranth/SKILL.md', 'sha256': '...'}, 'runtime_policy': {'tier': 1, 'model_visible': True}}
print(resolve_canonical_skill("feno-source", project_root="skills", policy_path="skills/policy.json"))
# {'name': 'atlas-browser', 'query': 'feno-source', 'source_path': '.../atlas-browser/SKILL.md', 'omitted': False}
An alias resolves to its canonical entry. A name that differs in case, a substring, or a near spelling does not:
resolve_canonical_skill("ATLAS-FLOW", project_root="skills", policy_path="skills/policy.json")
# ExposureManifestError: unknown skill or alias: 'ATLAS-FLOW'
Why
A prompt that lists skills by directory name has two quiet failure modes. A renamed folder makes the model call a skill that no longer exists. A symlink or a stale path makes it resolve a file the maintainer did not mean. Both look like success.
This library makes the binding explicit and checkable. The manifest records the bytes that were current when it was derived, and the resolver refuses when those bytes have since changed. A runtime that starts from the manifest cannot serve a skill whose source moved.
Three properties are deliberate:
- Exact names only. Resolution compares strings, never case-folds, strips, or matches substrings. An ambiguous request fails instead of picking.
- No write path. Derivation and resolution read files. There is no writer function and no import-time side effect, so a failed check cannot damage the tree it read.
- Layout is a caller input. A project declares each
source_path; family prefixes (celebrity_,mentor_) and a generated-persona directory are arguments, not constants.
How it differs. Claude Code and Codex discover skills by listing their folders; they do not bind a name to the file's bytes. Skill marketplaces and plugin installers author and distribute skills; once installed, nothing checks which bytes a name resolves to. A November 2026 survey found no tool doing this job. This library is that layer: an alias and exposure policy, with a content check, over an installed skill set.
Reference
derive_manifest(root, registrations=None)
Reads every regular SKILL.md under root, sorts them, and returns {"schema": "cch-skill-exposure-manifest/1", "entries": [...]}. An unregistered source gets {"tier": 1, "model_visible": True}.
resolve_skill(query, manifest, *, source_root)
Validates the manifest, re-reads each bound source, and returns a deep copy of the one entry whose canonical name or alias equals query.
canonical_policy_manifest(project_root, policy_path, *, families=..., generated_root=...)
Derives a manifest directly from canonical project sources plus a policy file, without needing a runtime home or projection. Returns (manifest, {name: Path}).
resolve_canonical_skill(query, *, project_root, policy_path, families=..., generated_root=...)
Resolves one name or alias to its canonical source file and reports whether the policy hides it:
{"name": ..., "query": ..., "source_path": ..., "source": {"path": ...}, "omitted": bool}
Policy file
{
"schema": "cch-skill-exposure-manifest/1",
"registrations": [
{
"canonical_name": "atlas-browser",
"aliases": ["feno-source"],
"source_path": "atlas-browser/SKILL.md",
"runtime_policy": {"tier": 1, "model_visible": true}
}
]
}
source_path is optional. When present and valid it wins, so a project declares its own layout. Without it, a generated persona resolves under <generated_root>/<category>/<slug>/SKILL.md, and everything else under <name>/SKILL.md.
Errors
Every failure raises ExposureManifestError (a ValueError): duplicate name or alias, escaped or symlinked path, non-SKILL.md source, stale digest, malformed registration, unknown name.
Numbers
Measured on 2026-11-19 on macOS arm64 (M5 Pro), Python 3.12.8, from docs/bench/derive.json (nine runs, warm page cache; min and median both saved because the host is shared).
| What | Min | Median |
|---|---|---|
canonical_policy_manifest, 64 registrations |
97 ms | 119 ms |
resolve_canonical_skill, one exact name |
82 ms | 119 ms |
Same, 'ATLAS-FLOW' |
refused, unknown skill or alias |
Both calls read and hash all 64 canonical sources, which is why one resolution costs a full derive. A runtime that resolves many names per start should derive once and call resolve_skill against the returned manifest.
Limits
- POSIX path rules only. Backslashes are refused on every platform so a manifest cannot change meaning between hosts.
- The schema string is
cch-skill-exposure-manifest/1; this release reads that one. - No cache. Every resolve re-reads the bound bytes by design. If that is too slow for your loop, derive once per start.
- Linux and Windows have not been exercised.
FAQ
Why refuse a stale digest instead of updating it? A changed source is a decision, not a detail. Silently re-hashing would hide that the skill the runtime offers is not the skill the policy named.
Can a tier-2 skill be hidden? Yes, with "model_visible": false. A tier-1 entry may not be hidden; that combination is an error.
Contributing
Bug reports and patches are welcome. See CONTRIBUTING.md for the check that must pass and the fixture each behaviour change needs.
Licence
MIT, in LICENSE.
Metadata
Release files for skill-exposure-manifest 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| skill_exposure_manifest-0.2.0.tar.gz | 18.3 kB | Without provenance | Details for skill_exposure_manifest-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| skill_exposure_manifest-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for skill_exposure_manifest-0.2.0-py3-none-any.whl |
Total release size: 31.5 kB
Release files / skill_exposure_manifest-0.2.0.tar.gz
| Download URL | skill_exposure_manifest-0.2.0.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09bd12b0fe26665b776a8f2f0f6bb81fe92d0ecb695176e14fa9c80449d258e0
|
|
BLAKE2b-256 checksum How to use checksums |
9580308b2a7b67ec01aed3616e7a8d53297f2bc61ff579e65c493ee06106eb50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Release files / skill_exposure_manifest-0.2.0-py3-none-any.whl
| Download URL | skill_exposure_manifest-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d7b6945853319fa39bf250582cccfcfe1b85c12180f4842c8cc841f0a9c4121
|
|
BLAKE2b-256 checksum How to use checksums |
27719382fa1248796d0053f5e6fecc796e9d09141bd305c68be1acc6a79af8ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Security for skill-exposure-manifest 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.