Problem
lark-cli update uses npx -y skills ls -g to detect locally installed skills during incremental skills sync.
With the current skills CLI text output format, global skills are grouped and indented by category. For example:
Global Skills
General
lark-apps ~/.agents/skills/lark-apps
lark-base ~/.agents/skills/lark-base
...
The parser in internal/skillscheck/sync.go skips indented lines, so installed lark-* skills may not be detected from this human-readable output.
Environment
lark-cli version 1.0.44
skills version 1.5.1-byted.6
- macOS
Reproduction
I only keep 12 Lark skills installed locally. Structured output can detect them correctly:
npx -y skills ls -g --json | jq -r '.[] | select(.name | startswith("lark-")) | .name'
Output:
lark-apps
lark-base
lark-contact
lark-doc
lark-event
lark-im
lark-openapi-explorer
lark-shared
lark-sheets
lark-skill-maker
lark-whiteboard
lark-wiki
However, when simulating a normal skills sync with an older skills-state.json, lark-cli update reports:
{
"skills_summary": {
"official": 26,
"updated": 0,
"added": 0,
"skipped_deleted": 26
}
}
Expected behavior
lark-cli update should correctly detect locally installed official skills even when npx skills ls -g uses grouped/indented human-readable output.
For the setup above, the expected result should be closer to:
{
"skills_summary": {
"official": 26,
"updated": 12,
"added": 0,
"skipped_deleted": 14
}
}
Suggested fix
Prefer structured output for local skills detection:
npx -y skills ls -g --json
Then parse JSON instead of human-readable text.
Alternatively, update ParseSkillsList to handle grouped/indented output from current skills CLI versions.
Related
Related to but more specific than:
Problem
lark-cli updateusesnpx -y skills ls -gto detect locally installed skills during incremental skills sync.With the current
skillsCLI text output format, global skills are grouped and indented by category. For example:The parser in
internal/skillscheck/sync.goskips indented lines, so installedlark-*skills may not be detected from this human-readable output.Environment
lark-cli version 1.0.44skills version 1.5.1-byted.6Reproduction
I only keep 12 Lark skills installed locally. Structured output can detect them correctly:
Output:
However, when simulating a normal skills sync with an older
skills-state.json,lark-cli updatereports:{ "skills_summary": { "official": 26, "updated": 0, "added": 0, "skipped_deleted": 26 } }Expected behavior
lark-cli updateshould correctly detect locally installed official skills even whennpx skills ls -guses grouped/indented human-readable output.For the setup above, the expected result should be closer to:
{ "skills_summary": { "official": 26, "updated": 12, "added": 0, "skipped_deleted": 14 } }Suggested fix
Prefer structured output for local skills detection:
Then parse JSON instead of human-readable text.
Alternatively, update
ParseSkillsListto handle grouped/indented output from currentskillsCLI versions.Related
Related to but more specific than:
lark-cli update自定义更新模式:仅更新 CLI 本体,或同时更新 CLI 与 skills #1145