Skip to main content

title: agentskills-fs description: Read Agent Skills from a local directory with bounded, byte-preserving file access.

PyPI Python 3.12 | 3.13 License: MIT

Local filesystem skill provider for the Agent Skills SDK.

Serves Agent Skills from a local directory tree. Each subdirectory containing a SKILL.md file is a skill.

Installation

pip install agentskills-fs

Requires Python 3.12 or newer. Installs agentskills-core and pyyaml as dependencies.

Expected Directory Layout

skills/
├── incident-response/
│   ├── SKILL.md              # YAML frontmatter + markdown body
│   ├── references/           # supplementary docs (optional)
│   ├── scripts/              # script files, never executed by the SDK (optional)
│   └── assets/               # diagrams, data files (optional)
└── another-skill/
    └── SKILL.md

Usage

Create skills/incident-response/SKILL.md before running the example:

---
name: incident-response
description: Triage production incidents.
---

# Incident response

Check service health and identify the affected deployment.
import asyncio
from pathlib import Path

from agentskills_core import SkillRegistry
from agentskills_fs import LocalFileSystemSkillProvider


async def main() -> None:
    provider = LocalFileSystemSkillProvider(Path("./skills"))
    registry = SkillRegistry()
    await registry.register_all(provider)

    skill = registry.get_skill("incident-response")
    print(await skill.get_metadata())
    print(await skill.get_body())


asyncio.run(main())

Use await registry.register("incident-response", provider) to register just one named skill. The provider has no network client to close. The remaining await snippets belong inside an async function with a provider created as above. Request scripts, assets, and references only when those files exist in the skill directory.

Blocking file I/O runs in a worker thread, so a slow or networked filesystem does not stall other coroutines.

SKILL.md content is cached per provider instance after the first read: a single skill is otherwise re-read up to five times in one agent session. Call invalidate() when skills change on disk.

provider.invalidate("incident-response")  # forget one skill
provider.invalidate()                      # forget everything

Lossless File Access

The file-access capability preserves original bytes and lists the complete skill tree, including hidden files and arbitrary nested directories:

paths = await provider.list_files("incident-response")
original = await provider.read_file("incident-response", "SKILL.md")
data = await provider.read_file("incident-response", "data/nested.bin")

Listing does not read file contents. Reads bypass the parsed SKILL.md cache and enforce max_file_bytes. Negative limits are rejected. Zero permits empty files only. Links, junctions, special files, absolute paths, and traversal are rejected instead of silently producing an incomplete listing.

Publish only directories intended for sharing. Hidden files are not automatically excluded, so remove credentials and private files before exposing a skill. The provider does not freeze the tree or prevent concurrent filesystem changes. Use a trusted, immutable publication directory when constructing verified manifests.

Security

  • Path-traversal protection: Skill IDs and resource names are validated to stay within the root directory. Attempts to escape (e.g. ../../etc/passwd) raise SkillNotFoundError or ResourceNotFoundError.
  • File size limits: Files exceeding 10 MB (default) are rejected before reading into memory. Configure via the max_file_bytes parameter.
  • Error-message sanitization: Error messages reference the skill_id rather than full filesystem paths, preventing internal path leakage.

For the full security policy, see SECURITY.md.

API

LocalFileSystemSkillProvider(root, *, max_file_bytes=10_485_760)

Parameter Type Default Description
root Path - Path to the directory containing skill subdirectories
max_file_bytes int 10_485_760 (10 MB) Maximum allowed file size in bytes
Method Returns Description
get_metadata(skill_id) dict[str, Any] Parsed YAML frontmatter from SKILL.md
get_body(skill_id) str Markdown body after the frontmatter
get_script(skill_id, name) bytes Raw content of a script file
get_asset(skill_id, name) bytes Raw content of an asset file
get_reference(skill_id, name) bytes Raw content of a reference file
list_resources(skill_id) dict[str, list[str]] Resource filenames grouped by kind
list_files(skill_id) list[str] Complete sorted tree, including SKILL.md and nested files
read_file(skill_id, path) bytes Original bytes from a skill-relative path
invalidate(skill_id=None) None Drop cached SKILL.md content for one skill, or all skills

Resource Discovery

This provider sets supports_resource_listing = True and can enumerate a skill's bundled files:

listing = await provider.list_resources("incident-response")
# {"references": ["severity-levels.md"], "scripts": ["page-oncall.sh"], "assets": []}

All three keys are always present; unused categories are empty lists. Only regular files directly inside references/, scripts/ and assets/ are reported. Dotfiles, subdirectories, and symlinks resolving outside the skill root are skipped rather than raising, so one stray entry cannot make a whole skill unlistable, and listing can never offer a name that a subsequent read would reject.

License

MIT

Metadata

Release files for agentskills-fs 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentskills-fs 0.8.0
File Size Uploaded Provenance Actions
agentskills_fs-0.8.0.tar.gz 7.6 kB With provenance Details for agentskills_fs-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentskills-fs 0.8.0
File Interpreter ABI Platform Actions
agentskills_fs-0.8.0-py3-none-any.whl Python 3 none any Details for agentskills_fs-0.8.0-py3-none-any.whl

Total release size: 16.8 kB

Release files / agentskills_fs-0.8.0.tar.gz

Download URL agentskills_fs-0.8.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f00670f5413a5249119643c9442520d619257548ccf9b0a3c8262f68edba612a
BLAKE2b-256 checksum
How to use checksums
ddc7697156908bc86a8424dc184b6498c15d18ce339c3639196db383a08e954a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 30, 2026.

Transparency log

Release files / agentskills_fs-0.8.0-py3-none-any.whl

Download URL agentskills_fs-0.8.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad8205a1d0f7625b660d142d6be9135c190f1c5200bbfc402323c941e6dcaeee
BLAKE2b-256 checksum
How to use checksums
77c77745f59afc0ea16b824097822d98685ba7ac4a156d664eaa9bad829568fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 30, 2026.

Transparency log

Security for agentskills-fs 0.8.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentskills_fs-0.8.0.tar.gz

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 Oct 30, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page