abstractskill
Skill1 starsChanged 6 months agoMITView on GitHub
Parse, inspect, discover and activate Agent Skills with the abstractskill Python API. Use when seeding a host-owned curated shelf, checking skill-tree hashes, evaluating trust or composing allowed tools for an agent context.
- Installs packages
In this repository2 other files it gives its agents.
- llms-full.txtllms.txt
- llms.txtllms.txt
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Use the Python API to work with SKILL.md folders and a curated trust registry.
- Distinctive: line 14
Use Python 3.10 or later; PyYAML is the only runtime dependency.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AbstractSkill
Use the Python API to work with SKILL.md folders and a curated trust registry. The library parses
and classifies; the host executes tools, checks declared MCP dependencies and enforces activation.
It makes no network or model calls. Do not treat discovery as permission to activate.
Use Python 3.10 or later; PyYAML is the only runtime dependency.
Install and verify
python -m pip install abstractskill
python -c 'import abstractskill; print(abstractskill.__version__)'Compare the printed version with metadata.package-version; consult the installed version's docs
when they differ. For a source installation, run python -m pip install . from the repository checkout.
Mental model
SkillMetadatais the discovery view;SkillDocumentadds the body and content hash.FilesystemSkillLoaderdiscovers metadata, then loads one full document when needed. Later valid roots override earlier ones; broken copies warn and never hide a valid earlier copy.inspect_skill_dirsupplies a whole-tree hash and structural script detection. Trust binds to bytes, not merely a skill name, path or a frontmatter claim.TrustRegistrycombines validation records, advisories and guidance. Blocked skills never activate; review-required skills need the operator's context-specific enablement.select_skills_for_contextperforms load, hash and trust gating in order. Use it for activation, then pass its activation-description overrides to the formatter.seed_registrywrites only a host-owned shelf and its seed manifest/lock. It preserves edited and unknown-provenance items, reports removed bundle items and never deletes them.- Catch
SkillErrorfor library failures. Parsing reportsSkillParseErrororSkillValidationError; loading a missing name reportsSkillNotFoundError. Discovery warnings are available throughon_warning; selection also reports held, blocked and missing names.
Capability map
- Parse one document:
parse_skill_md. - Discover/load:
FilesystemSkillLoader.discover/.load. - Inspect/hash a folder:
inspect_skill_dir,hash_skill_tree. - Seed packaged skills:
bundled_registry_dir,bundled_registry_version,seed_registry. - Evaluate or activate:
evaluate_trust,select_skills_for_context. - Compose/render:
effective_tools,effective_tools_for_skill,format_available_skills_xml.
The API executes no skill scripts or tool calls and installs no MCP servers. A host must check
selection.requires against its actual tool inventory; the declaration is information, not an
automatic dependency gate. Tool declarations can narrow the operator grant, never widen it.
Activate from the packaged registry
This complete example uses a disposable shelf; use a host-owned persistent destination in an app.
from pathlib import Path
from tempfile import TemporaryDirectory
from abstractskill import (
SkillError, TrustRegistry, format_available_skills_xml,
seed_registry, select_skills_for_context,
)
try:
with TemporaryDirectory() as temporary:
shelf = Path(temporary) / "shelf"
report = seed_registry(shelf)
registry = TrustRegistry.load(
validations_path=shelf / "validations.yaml",
advisories_path=shelf / "advisories.yaml",
guidance_path=shelf / "guidance.yaml",
)
selection = select_skills_for_context(
registry, shelf_root=shelf / "skills", names=["coredoc"], enabled=[],
)
if not selection.active:
print("No active skills:", selection.held, selection.blocked, selection.missing)
else:
print(report.bundled_version)
print(format_available_skills_xml(
list(selection.active), descriptions=selection.activation_descriptions,
))
except (SkillError, OSError) as error:
raise SystemExit(f"Skill activation failed: {error}")Success prints a nonempty available-skills block. Never convert a held or blocked result to active
by formatting a separately discovered document. Enable a review-required skill only after the
operator grants it; prefer name@<full tree hash> to an unpinned name.
Parse and inspect before admission
from pathlib import Path
from abstractskill import SkillError, inspect_skill_dir, parse_skill_md
folder = Path("my-skill") # replace with the skill folder to inspect
try:
document = parse_skill_md((folder / "SKILL.md").read_text(encoding="utf-8"))
inventory = inspect_skill_dir(folder)
except (SkillError, OSError) as error:
raise SystemExit(f"Skill inspection failed: {error}")
print(document.metadata.name, inventory.tree_hash, inventory.has_scripts)This reports metadata and structural facts; it does not attest trust or authorize execution.
Rules and failure recovery
- Seed only into a directory your host owns. Review
report.keptafter an upgrade; a kept edited skill is preserved deliberately. Do not overwrite it to silence the report. - A skill with scripts remains review-required even if its text claims it is safe.
enabledcannot unblock a blocked skill. Investigate the advisory or hash mismatch first.- Pass
selection.activation_descriptionsto the formatter so curated descriptions survive. - A malformed or missing document must fail or warn with its cause; never silently attach an older body because the desired copy failed inspection.
Go deeper
- Getting started: API workflow and seed semantics.
- API: signatures, result fields and dependency declarations.
- Trust: verdicts, enablement and content binding.
- Troubleshooting: preserved seed items and activation failures.
- Full docs: offline documentation context.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

