Skip to content

lark-cli update incremental skills sync does not detect installed skills from grouped skills ls output #1186

@MrZhang123

Description

@MrZhang123

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain/coreCLI framework and core libraries

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions