AbstractSkill
AbstractSkill is the shared Python library for Agent Skills (SKILL.md) in the
AbstractFramework ecosystem.
It provides a small, dependency-light foundation for:
- parsing and validating
SKILL.mdfrontmatter and instructions - discovering skills on disk (progressive disclosure: metadata first)
- computing stable content hashes for skill evolution and replay safety
- formatting compact
<available_skills>prompt blocks for hosts and agents - composing a skill's tool declarations with an operator grant (never widening)
- classifying skill trust: validated skills, do-not-use advisories, and a fail-closed verdict (trust model)
Flows run; skills are activated. AbstractSkill owns the portable skill contract so abstractruntime,
abstractgateway, and thin clients can share identical semantics without duplicating parsers.
Install
pip install abstractskill
Note: pip install delivers the LIBRARY only. The curated skills themselves
(the shelf below) live in this repository under registry/ and are consumed
from a checkout — they are deliberately not packaged into the wheel today
(a shelf you install should be a shelf you can byte-verify against the
repository's validation records).
Where the skills live — and how an agent uses them
The curated shelf is in this repository:
registry/skills/ # 14 curated skills (one folder per SKILL.md)
registry/validations.yaml # trust records: byte pins per skill tree
registry/advisories.yaml # do-not-use advisories (empty at v1, by design)
registry/guidance.yaml # class-level curation guidance
registry/catalog.yaml # the vendoring catalog (pinned upstream commits)
docs/skills-catalog.md # human-readable index: descriptions + links
To point an abstractcode agent at this shelf (trust gate included), set three environment variables to the checkout's absolute paths:
export ABSTRACTCODE_SKILLS_ROOTS=/path/to/abstractskill/registry/skills
export ABSTRACTCODE_SKILLS_VALIDATIONS=/path/to/abstractskill/registry/validations.yaml
export ABSTRACTCODE_SKILLS_ADVISORIES=/path/to/abstractskill/registry/advisories.yaml
then activate per session with /skills use <name> (discovery alone lists;
activation composes). The trust gate is location-independent — records bind
to content hashes, never paths — so the shelf works from any checkout
location. Any other host consumes the same shelf through
select_skills_for_context (see Quick start below).
Quick start
from pathlib import Path
from abstractskill import FilesystemSkillLoader, format_available_skills_xml, parse_skill_md
# Parse a SKILL.md file
doc = parse_skill_md(Path("my-skill/SKILL.md").read_text(encoding="utf-8"))
print(doc.metadata.name, doc.metadata.description)
# Discover skills under one or more roots (later roots override earlier ones).
# NOTE: discovery is for LISTING only — it applies no trust gate. Do not pipe
# discover() straight into activation.
loader = FilesystemSkillLoader([Path.home() / ".abstract" / "skills", Path(".abstract/skills")])
skills = loader.discover()
print(format_available_skills_xml(skills))
# Load full instructions when a skill is activated
loaded = loader.load("my-skill")
print(loaded.document.content_hash)
To ACTIVATE skills into a context, gate them through trust in one call so the order (load → hash → evaluate_trust → compose) cannot be skipped:
from abstractskill import TrustRegistry, select_skills_for_context, format_available_skills_xml
registry = TrustRegistry.load(
validations_path="registry/validations.yaml",
advisories_path="registry/advisories.yaml",
)
selection = select_skills_for_context(
registry, shelf_root="registry/skills",
names=["coredoc", "backlog"], # names-only is enough: sources derive from the registry
enabled=[], # names the operator explicitly review-enabled for this context
)
# Only trust-gated skills reach the prompt; blocked skills never appear.
block = format_available_skills_xml(
list(selection.active), descriptions=selection.activation_descriptions
)
Package scope
parse_skill_md— YAML frontmatter + markdown body (LF/CRLF/CR; spec-validated name/description/compatibility)FilesystemSkillLoader— list metadata and load full documents;discover()andload()resolve identically (a broken copy never shadows a valid one) and degrade loudly (#FALLBACKwarnings via logging and optionalon_warning)content_hash— SHA-256 digest of one document for evolution trackinghash_skill_tree/inspect_skill_dir/read_skill_resource— whole-tree tamper hash (injective manifest), structural inventory (has_scriptsis a structural fact), bounded in-tree resource readseffective_tools/effective_tools_for_skill— grant ∩ allowed-tools composition (skills can narrow below the grant, never widen beyond it; absence ofallowed-toolsimplies nothing)format_available_skills_xml— deterministic discovery prompt blockevaluate_trust+TrustRegistry/ValidationRecord/AdvisoryEntry/GuidanceEntry— validated-skill attestations bound to tree hashes, a do-not-use advisory registry (four mandated fields, graded severity), and a fail-closedTrustVerdict(blocked / requires_review / attachable). The curated shelf (first-party + catalog-vendored skills) lives underregistry/. See the trust model.select_skills_for_context+SkillSelection— the one trust-gated activation pipeline (load → hash → evaluate → gate); hash-pinned enables; declared MCP/tool dependencies surfaced for host-side refusal.load_catalog/CatalogEntry/SkillCatalog— curated vendoring catalog (pinned upstream commits, expected tree hashes).derive_demand+DemandReport— derived demand tier from declared tool/MCP requirements joined against a host inventory (informational; hosts enforce grants).
Hashing contract: hash = bytes, parse = meaning
content_hash and hash_skill_tree are byte-exact deliberately — tamper detection
must never call two byte-different trees "the same". A CRLF-authored skill and its
LF twin parse identically but hash differently: vendor skills from archives or
byte-copies, never through EOL-rewriting checkouts (e.g. git autocrlf), or hash
verification will honestly report the rewrite as a mismatch.
Out of scope for this release: gateway registry APIs, zip .skill packaging, and runtime activation handlers.
Those layers live in abstractgateway and abstractruntime and consume this library.
Documentation
Full documentation is in docs/ and on
GitHub Pages: getting started,
architecture (with diagrams), the API reference, the trust model, and the
trust-network position. See also SECURITY.md for the trust
guarantees this library does and does not make.
Development
python -m pip install -e ".[test]"
python -m pytest -q
python -m build
python -m pip install "mkdocs>=1.6.0" "mkdocs-material>=9.0.0"
bash .github/scripts/prepare_mkdocs.sh
mkdocs build -q
License
MIT — see LICENSE.
Release files for abstractskill 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| abstractskill-0.2.1.tar.gz | 80.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| abstractskill-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 134.1 kB
Release files / abstractskill-0.2.1.tar.gz
| Download URL | abstractskill-0.2.1.tar.gz |
|---|---|
| Size | 80.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
171cf979e47312f9c23cd1b053bd71ed652b4feba69c47e256c433876f0ff3ef
|
|
BLAKE2b-256 checksum How to use checksums |
5fc003b3376d876d80bea03acdf760ce31122178787dad5b8fbe4541367d6849
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency logRelease files / abstractskill-0.2.1-py3-none-any.whl
| Download URL | abstractskill-0.2.1-py3-none-any.whl |
|---|---|
| Size | 53.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d478c595650902ffb20300afb50e161cc8058199e273d7a062e93e100571f701
|
|
BLAKE2b-256 checksum How to use checksums |
3f68c6382fe8f9c617b87b3146eeca0d76ce4b41f182d36a182c64a292a923a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency log