🔎 Skill Discovery (find-skills)¶
SkillDiscoverySkill is the catalog's introspection capability. It queries the in-process descriptor registry (see ADR-0004) to enumerate every skill mirai-shared-skills ships, and loads per-skill reference files on demand from the descriptor's references allowlist (see ADR-0008). It is the first skill an autonomous agent should consult when its prompt is "what tools do I have available?".
When to use it¶
- The agent needs a runtime view of registered skills (e.g., before deciding which capabilities to call into).
- The agent's reasoning hits a known recovery pattern that another skill's references document, and it needs to load that guidance lazily.
- You're building a meta-tool (a "what can I do?" assistant) that needs to enumerate the catalog.
- Local debugging —
await SkillDiscoverySkill().get_tools()[0]("rag")quickly answers "is the agentic-rag descriptor registered?".
Tools¶
| Tool | Purpose |
|---|---|
list_skills |
Returns every registered descriptor as JSON. |
search_skills |
Substring search over name + description. |
load_skill_instructions |
Loads a reference file from the descriptor's references allowlist (rejects path traversal). |
Configuration¶
No configuration. The skill reads from the module-level registry that mirai_shared_skills.__init__.bootstrap() populates at import time.
Example¶
from mirai_shared_skills.discovery import SkillDiscoverySkill
skill = SkillDiscoverySkill()
agent_engine.attach(skill)
# Agent now sees `list_skills`, `search_skills`, `load_skill_instructions` tools.
Security considerations¶
standard — read-only metadata access. Safe to attach directly per ADR-0001. load_skill_instructions is path-safe by construction (allowlist enforced at the skill boundary).