fabricatio_skill.rust

Classes

Skill

A loaded skill: metadata + markdown content.

SkillMeta

Lightweight skill metadata (no content body).

SkillRegistry

Process-wide registry that owns all loaded Skill objects.

Functions

get_skill(→ Optional[Skill])

Get a skill by exact name.

scan_skills(→ list[Skill])

Scan a directory for .md skill files and return parsed Skill objects.

search_skills(→ list[Skill])

Search skills by keyword matching against name, description, tags, and content.

Package Contents

class fabricatio_skill.rust.Skill

A loaded skill: metadata + markdown content.

property name: str

Skill identifier (from frontmatter name, or filename stem).

property description: str

Human-readable description.

property tags: list[str]

Tags for search/filtering.

property content: str

Markdown body (everything after the frontmatter).

property path: str

Source file path (relative to scan root).

meta() SkillMeta

Lightweight representation: name + description + tags (no content).

class fabricatio_skill.rust.SkillMeta

Lightweight skill metadata (no content body).

property name: str
property description: str
property tags: list[str]
property path: str
class fabricatio_skill.rust.SkillRegistry

Process-wide registry that owns all loaded Skill objects.

Python roles store skill names (plain str) and resolve real Skill objects through this registry at runtime.

register(skills: Sequence[Skill]) int

Register skills. Returns count of newly added entries.

unregister(names: Sequence[str]) int

Remove skills by name. Returns count removed.

clear() None

Remove all registered skills.

get(name: str) Skill | None

Return a skill by exact name, or None.

get_many(names: Sequence[str]) list[Skill]

Return skills for the given names, silently skipping missing.

all() list[Skill]

Return every registered skill.

names() list[str]

Return every registered skill name.

__contains__(name: str) bool
__len__() int
fabricatio_skill.rust.get_skill(name: str, skills: Sequence[Skill]) Skill | None

Get a skill by exact name.

Parameters:
  • name – Exact skill name to look up.

  • skills – List of skills to search.

Returns:

The matching Skill, or None if not found.

fabricatio_skill.rust.scan_skills(path: str) list[Skill]

Scan a directory for .md skill files and return parsed Skill objects.

Walks the directory recursively, reads every .md file, parses YAML frontmatter for metadata, and collects the markdown body as content.

Parameters:

path – Root directory to scan.

Returns:

List of Skill objects discovered from the directory.

fabricatio_skill.rust.search_skills(query: str, skills: Sequence[Skill], in_content: bool = False) list[Skill]

Search skills by keyword matching against name, description, tags, and content.

Parameters:
  • query – Search term (case-insensitive).

  • skills – List of skills to search through.

  • in_content – Whether to also search within the skill content body.

Returns:

Skills matching the query, ordered by relevance (name/tag match first).