Skip to main content

Filesystem-based skill provider for the Agent Skills format (https://agentskills.io)

Project description

agentskills-fs

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 3.13. Installs agentskills-core and pyyaml as dependencies.

Expected Directory Layout

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

Usage

from pathlib import Path
from agentskills_core import SkillRegistry
from agentskills_fs import LocalFileSystemSkillProvider

provider = LocalFileSystemSkillProvider(Path("./skills"))
registry = SkillRegistry()
await registry.register("incident-response", provider)

skill = registry.get_skill("incident-response")
meta = await skill.get_metadata()
body = await skill.get_body()
script = await skill.get_script("page-oncall.sh")

The provider reads files synchronously (local disk I/O is fast for small skill files) but exposes an async interface to satisfy the SkillProvider contract.

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

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentskills_fs-0.2.3.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentskills_fs-0.2.3-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file agentskills_fs-0.2.3.tar.gz.

File metadata

  • Download URL: agentskills_fs-0.2.3.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.13.9 Windows/11

File hashes

Hashes for agentskills_fs-0.2.3.tar.gz
Algorithm Hash digest
SHA256 c940e6457b6dcdf5ca6926c636842a528935ae9dffe3142fd2ecd0bcf1cd4426
MD5 1ff79ac4e1f76a751f62dc6eab5d5012
BLAKE2b-256 9b739b25232786c8dfec52887aa1a409dfe072ec1ee1290d96aa726988c4a4a5

See more details on using hashes here.

File details

Details for the file agentskills_fs-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: agentskills_fs-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.13.9 Windows/11

File hashes

Hashes for agentskills_fs-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6756f83a7e5c7ac90a58896b57b461cca84845b175c5ec49c3aeef74b46f2cdc
MD5 d5a109b4ca919c77329cb94bd8c9eb0b
BLAKE2b-256 33a8388714e6e9f4128fbc6f839386a980fc107a4713d7a22889f4dccb5f7dd1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page