Skip to content

~/.lark-cli/skills-state.json version doesn't update when skills are synced via the external skills CLI #1908

Description

@Stevring

Summary

After upgrading lark-cli and re-running the documented skills sync command (npx skills add larksuite/cli -g -y), the skill content under ~/.agents/skills/lark-* is correctly updated to the new version, but ~/.lark-cli/skills-state.json still reports the old version. The state file is only written by lark-cli's own internal update/sync path, not by the external skills (vercel-labs/skills) tool that the README recommends for syncing.

Repro steps

pnpm add -g @larksuite/cli@1.0.52
npx skills add larksuite/cli -g -y     # initial sync
cat ~/.lark-cli/skills-state.json      # "version": "1.0.52"

pnpm add -g @larksuite/cli@latest      # upgrade to 1.0.70
npx skills add larksuite/cli -g -y     # sync again — installs latest skill content successfully
cat ~/.lark-cli/skills-state.json      # still says "version": "1.0.52"

The sync itself works correctly — ~/.agents/skills/lark-* gets overwritten with 1.0.70 content, and a new skill (lark-note) that didn't exist in 1.0.52 shows up. Only the bookkeeping file is stale.

Why this matters

skills-state.json looks like the authoritative record of "what skill version is currently installed," and anything reading it (support scripts, other tooling, or a future lark-cli skills status command) will report the wrong version even though the actual synced content is current. It's misleading rather than broken, but it undermines the one place a user would check to confirm a sync succeeded.

Root cause

skills-state.json is only updated by lark-cli's own embedded update/sync logic. The documented recovery path for manual reinstalls (npm install -g @larksuite/cli@<version> && npx skills add larksuite/cli -y -g) goes entirely through the external skills CLI, which has no knowledge of ~/.lark-cli/skills-state.json and doesn't write to it.

Suggested fix

  • Have lark-cli compute its own version from ~/.agents/skills/lark-shared (or any synced skill's metadata) at runtime instead of relying on a separately-written state file, or
  • Have the embedded skill content include a version marker that lark-cli reads directly to report skill freshness, rather than maintaining a separate state file that only one of the two supported install paths keeps in sync.

Environment

  • lark-cli 1.0.52 → 1.0.70, installed via pnpm add -g
  • Skills synced via npx skills add larksuite/cli -g -y (skills CLI 1.5.17)
  • macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdomain/coreCLI framework and core libraries

    Type

    No type

    Fields

    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