Skip to content

Fix installed skills not loading or showing up - #88

Merged
killpanda merged 2 commits into
mainfrom
claude/project-thread-ksib6j
Nov 2, 2026
Merged

killpanda merged 2 commits into
mainfrom
claude/project-thread-ksib6j

Conversation

@killpanda

Copy link
Copy Markdown
Owner

Requested by jack mini · project thread

Problem

Installed skills (in ~/.agents/skills and ~/.limbo/daily/skills) could not be invoked from the Rust version.

Causes and fixes

  • No re-scan while running. The Python TUI re-scanned skills each time the / 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.
  • Frontmatter parsing. description: > (a folded block scalar, used by ste, lark-whiteboard) came out as the literal >. Quoted values kept their quotes. A nested metadata:\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.
  • Long descriptions dropped. Skills with a description over 1024 chars (e.g. herdr-gpui-browser) were silently skipped. They are now listed with the description cut.
  • ~/.agents/skills only 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), since npx skills add -g installs there.

Testing

  • New unit tests cover the YAML forms (folded, literal, quoted, single-quoted, continuation, CRLF, nested name) and long-description truncation.
  • I ran the parser on the 43 real SKILL.md files from the reporter's machine. All load, with correct names and descriptions.
  • cargo fmt --check, cargo clippy --all-targets (clean), cargo test (104 passed).

Generated by Claude Code

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
@killpanda killpanda self-assigned this Nov 2, 2026
@killpanda
killpanda merged commit 66e113c into main Nov 2, 2026
2 checks passed

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

View in Graphify

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).

Comment thread src/skills.rs
@@ -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> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Health regression — discover_skills()

6 callers depend on it (afferent coupling).

Grounded coupling-delta finding (deterministic), not an LLM guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants