Repository navigation
Fix installed skills not loading or showing up - #88
Conversation
The Python version re-scanned skill directories on every menu update, so a skill installed while Limbo was running showed up right away. The Rust TUI scanned only at startup. Re-scan when the input becomes '/' and before reporting an unknown /command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BrrmVCasRq2Y2mi8ARRYP
- Parse frontmatter as YAML-ish: only top-level keys, quoted values, indented continuation lines and block scalars (> and |). A folded 'description: >' used to come out as the literal '>', and a nested 'metadata: name:' could override the skill name. - List skills whose description runs past 1024 characters (cut) instead of silently dropping them. - Also scan ~/.agents/skills, the cross-agent global dir that 'npx skills add -g' installs into, so those skills work from any workdir, not only when Limbo runs in the home directory. - Rebuild the system prompt's <available_skills> catalog before a turn when the skill set changed, so a skill installed mid-session reaches the model too (the TUI menu already re-scans). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014BrrmVCasRq2Y2mi8ARRYP
There was a problem hiding this comment.
Graphify reviewed this change.
No issues found by static checks — no coupling regressions or blocking issues in the code graph. That is not the same as safe to merge: see what was not checked.
Not checked: tests were not run; no formal proof of the changed code.
Graphify review — findings
Adds a global ~/.agents/skills discovery root, shared with other agents and where npx skills add -g installs, ranked below the user and project dirs but above the bundled daily pack. Rewrites the SKILL.md frontmatter parser so frontmatter_fields reads only top-level keys, and handles quoted values, indented continuations, BOMs and >/| block scalars. It also truncates over-long descriptions instead of dropping the skill, but any plain value that starts with > or | is routed down the block-scalar path. Adds Agent::sync_skills, which run_task calls before each turn to rebuild the system prompt only when the skills catalog changed, so mid-session installs show up on the next turn and the prompt cache stays intact otherwise.
No blocking issues surfaced. 5 lower-confidence candidates did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 233 functions depend on the 209 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
discover_skills()— 6 callers, 5 callees - worse:
run_task()— 5 callers, 4 callees
Verification — 233 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 232 function(s) in the blast radius were not formally verified this run
· 1 grounded finding(s) anchored inline below; 1 more finding(s) on lines outside this diff (see the check run).
| @@ -159,7 +299,9 @@ fn load_from(dir: &Path) -> Vec<Skill> { | |||
|
|
|||
| /// All skills visible to a session, sorted by name. | |||
| pub fn discover_skills(workdir: &Path, daily: bool) -> Vec<Skill> { | |||
There was a problem hiding this comment.
discover_skills()
6 callers depend on it (afferent coupling).
Grounded coupling-delta finding (deterministic), not an LLM guess.
Requested by jack mini · project thread
Problem
Installed skills (in
~/.agents/skillsand~/.limbo/daily/skills) could not be invoked from the Rust version.Causes and fixes
/menu opened. The Rust TUI scanned only at startup, so a skill installed during a session gave "未知命令". The menu now re-scans when it opens and before reporting an unknown/command. Before each turn, the agent also rebuilds the<available_skills>catalog in the system prompt if the skill set changed, so the model sees new skills too. This is a no-op, with the prompt cache kept, when nothing changed.description: >(a folded block scalar, used byste,lark-whiteboard) came out as the literal>. Quoted values kept their quotes. A nestedmetadata:\n name:could override the skill name. The parser now reads only top-level keys and handles quotes, indented continuation lines and>/|block scalars. It also handles CRLF and a BOM.herdr-gpui-browser) were silently skipped. They are now listed with the description cut.~/.agents/skillsonly worked from$HOME. It was picked up only as the "project" dir when the workdir was home. It is now scanned as a global source (lowest priority among non-bundled sources), sincenpx skills add -ginstalls there.Testing
name) and long-description truncation.cargo fmt --check,cargo clippy --all-targets(clean),cargo test(104 passed).Generated by Claude Code