Expand description
Skill and project loader for Kernex.
Scans {data_dir}/skills/*/SKILL.md and {data_dir}/projects/*/ROLE.md
for definitions and exposes them to the system prompt so the AI knows
what tools and contexts are available.
Structs§
- Permissions
- Permission categories that a skill can request.
- Project
- A loaded project definition.
- Risk
Detector - High-risk permission patterns that trigger warnings.
- Risk
Warning - A warning about a risky permission.
- Skill
- A loaded skill definition.
- Skill
Context - Output of
build_skill_prompt: the prompt text plus an optional model override.
Enums§
- Risk
Category - Categories of permission risks.
- Trust
Level - Trust level assigned to a skill based on its source.
Constants§
- DEFAULT_
TRUSTED_ ORGS - Trusted organizations whose skills can be auto-approved.
Functions§
- build_
skill_ prompt - Build the skill block appended to the system prompt.
- determine_
trust_ level - Determine trust level based on skill source.
- ensure_
projects_ dir - Create
{data_dir}/projects/if it doesn’t exist. - get_
project_ instructions - Find a project by name and return its instructions.
- get_
toolboxes_ for_ skill - Return the toolboxes declared by a named skill.
- lazy_
skill_ directory - Build a compact listing of available lazy skills for prompt injection.
- load_
projects - Scan
{data_dir}/projects/*/ROLE.mdand return all valid projects. - load_
skills - Scan
{data_dir}/skills/*/SKILL.mdand return all valid skill definitions. - match_
skill_ toolboxes - Match user message against skill triggers and return activated toolboxes.
- match_
skill_ triggers - Match user message against skill triggers and return activated MCP servers.
- migrate_
flat_ skills - Migrate legacy flat skill files (
{data_dir}/skills/*.md) to the directory-per-skill layout ({data_dir}/skills/{name}/SKILL.md). - skill_
search_ toolbox - Return the
Toolboxdefinition for the virtualskill_searchtool.