skill.backends¶
Backend protocols and local filesystem backend.
Classes
|
SkillSource backed by an arbitrary local directory of skills. |
|
Read-only source of skills (e.g., GitHub, local directory). |
- class skill.backends.LocalDirSource(root)[source]¶
Bases:
objectSkillSource backed by an arbitrary local directory of skills.
Useful for testing and for local skill packages (e.g. a git checkout). The directory should contain
owner/name/SKILL.mdstructure.>>> import tempfile >>> from skill.base import Skill, SkillMeta >>> d = Path(tempfile.mkdtemp()) >>> (d / 'alice' / 'greet').mkdir(parents=True) >>> Skill(meta=SkillMeta(name='greet', description='Say hi'), body='Hi!').write_to(d / 'alice' / 'greet') >>> src = LocalDirSource(d) >>> src.name 'local' >>> 'alice/greet' in src True >>> src['alice/greet'].meta.name 'greet'- search(query, *, max_results=10)[source]¶
Keyword search over skill names and descriptions.
>>> import tempfile >>> from skill.base import Skill, SkillMeta >>> d = Path(tempfile.mkdtemp()) >>> (d / 'bob' / 'python-lint').mkdir(parents=True) >>> Skill(meta=SkillMeta(name='python-lint', description='Lint Python code'), body='...').write_to(d / 'bob' / 'python-lint') >>> src = LocalDirSource(d) >>> results = src.search('python') >>> len(results) > 0 True >>> results[0].name 'python-lint'
- class skill.backends.SkillSource(*args, **kwargs)[source]¶
Bases:
ProtocolRead-only source of skills (e.g., GitHub, local directory).
__iter__and__len__are deliberately omitted — remote sources may not support enumeration.
Modules
Awesome-claude-skills curated list backend for skill discovery. |
|
Composio backend for skill discovery and fetching. |
|
GitHub backend for skill discovery and fetching. |
|
SkillsDirectory backend for skill discovery and fetching. |
|
Smithery backend for skill discovery and fetching. |