larksuite / larksuite/cli

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

Open
#1,908 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug domain/core
Dominant language
Go
Stars
17.3k
Forks
1.4k
Avg merge
2d 4h
Merged PRs (30d)
105

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing lark-cli’s internal update/sync path and how it writes ~/.lark-cli/skills-state.json, then compare it with the README’s npx skills add larksuite/cli -g -y workflow. Check how version information is available in ~/.agents/skills/lark-shared or another synced skill. Done means both supported sync paths leave version reporting consistent with the installed skill content.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, node.js
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.