Skip to content

Skills System

LingXiao’s Skill system is the execution-knowledge surface for Agents. A skill is a structured Markdown document (YAML frontmatter + body) that the runtime injects into a worker’s task prompt as a <skill> block, giving the LLM in-context procedures, domain constraints, and quality gates.

Skills are not runtime tools and not plugin manifests. They are declarative knowledge packs, scoped and versioned by source.

Skills are loaded by source priority (higher overrides lower):

PrioritySourceDirectory
1 (highest)Project.lingxiao/skills/
2Plugin contributedPlugin directory
3User~/.lingxiao/skills/
4 (lowest)BundledPackage bundled

The on-disk format is YAML frontmatter + Markdown body:

---
name: my-skill
description: A one-line summary
---
<markdown body procedures, gates, references>
FieldRuleDescription
namekebab-case, validated by validateSkillNameSkill name
descriptionNon-empty, single lineSkill description
FieldDescription
triggersTrigger conditions (reserved extension point)
contentContent reference (reserved extension point)
  • description and body are both required at write time
  • validateSkillName enforces kebab-case; invalid names throw on save and are skipped on read
  • Files missing both description and a non-empty body are silently dropped on read

A skill directory may contain a phases/ subdirectory. Each *.md file becomes a SkillPhase:

interface SkillPhase { name: string; path: string; content: string; }
interface QualityGate { checks: string[]; skipConditions: string[]; }

loadSkillPhases(skillDir) returns an ordered list of phases, each potentially containing quality gate checks and skip conditions.

Injection PointScenarioBudget
Worker task promptBaseAgentRuntime.buildTaskPromptTotal 18,000 chars, per-skill 7,500 chars
TUI messagesSessionManagerRuntimeOn-demand injection

Three sources are merged and de-duplicated for injection:

SourceOriginWhen It Applies
skillNamesRole capability (RoleCapabilityModel)Role-based, always when this agent runs
explicitSkills$skill mentions in task description and system promptUser/role opted in via syntax
officeSkillOFFICE_MODE_ACTIVE session state + OFFICE_SUITE_SKILL_NAME availabilitySession-level office mode

Reference skills in task descriptions or system prompts using $skill-name:

$debug-frontend-backend-contract
$office_suite
$explore_implement_verify

Regex match: / \$([a-zA-Z0-9_][a-zA-Z0-9_-]*) /g, deduplicated after matching.

LimitValueEffect When Exceeded
maxTotalChars18,000Subsequent skills dropped in arrival order
maxPerSkillChars7,500Each skill body clipped to this length
Visibilitytruncated: trueCaller reads descriptor.path for full content

LingXiao includes 14 built-in skill packs:

SkillDescription
code-qualityCode quality checks
commit-messageGit commit message conventions
doc-coauthoringDocument collaboration
docxWord document generation
frontend-designFrontend design
office-suiteOffice suite
pdfPDF generation
pptxPPT generation
skill-creatorSkill creator
slidevSlidev presentations
theme-factoryTheme factory
web-artifacts-builderWeb artifacts builder
xlsxExcel generation
design-marketDesign asset marketplace

Use the skill-creator skill pack to auto-create custom skills.

Write in project or user-level directories:

Terminal window
# Project level
mkdir -p .lingxiao/skills/my-skill
cat > .lingxiao/skills/my-skill/SKILL.md << 'EOF'
---
name: my-skill
description: My custom skill
---
# My Skill
## Procedure
1. Step one
2. Step two
## Quality Gates
- Check one
- Check two
EOF

Manage skills via /api/v1/skills routes:

EndpointMethodDescription
/api/v1/skillsGETList skills
/api/v1/skillsPOSTCreate skill
/api/v1/skills/:namePUTUpdate skill
/api/v1/skills/:nameDELETEDelete skill

SkillSelectionPolicy.digestGuidance defines 5 selection rules that appear in the Leader’s digest prompt, guiding automatic skill selection and disabling.