Repository navigation
Agent suggestions
Public previewDescription
Describe the bug
internal/skills/lockfile/lockfile.go says the skill lock file is shared with the Vercel skills CLI on purpose:
// lockVersion must match Vercel's CURRENT_LOCK_VERSION for interop.But the two tools do not resolve the same path when XDG_STATE_HOME is set:
| Tool | Lock path when XDG_STATE_HOME is set |
|---|---|
Vercel skills (getSkillLockPath in src/skill-lock.ts) |
$XDG_STATE_HOME/skills/.skill-lock.json |
gh skill (lockfilePath()) |
$HOME/.agents/.skill-lock.json (always) |
So with XDG_STATE_HOME set, each tool writes its own lock file and neither sees the other's installs. The shared format does not help because the files are different.
There is also no way to move the gh lock file out of $HOME/.agents (no env var or flag), which matters for users who keep $HOME clean with XDG directories.
Affected version
gh version 2.102.1 (2026-10-21)
Also checked against trunk: lockfilePath() still joins os.UserHomeDir() with .agents/.skill-lock.json.
Steps to reproduce the behavior
export XDG_STATE_HOME=$HOME/.local/state- Install a skill with the Vercel CLI:
npx skills add obra/superpowers -g. It is recorded in~/.local/state/skills/.skill-lock.json. - Install a skill with gh:
gh skill install cloudflare/skills wrangler --scope user --agent opencode. It is recorded in~/.agents/.skill-lock.json. - Each lock file lists only its own tool's skills.
Expected vs actual behavior
Expected: gh skill resolves the lock path the same way as the Vercel CLI, so both tools share one lock file:
func lockfilePath() (string, error) {
if state := os.Getenv("XDG_STATE_HOME"); state != "" {
return filepath.Join(state, "skills", lockFile), nil
}
home, err := os.UserHomeDir()
if err != nil {
return "", err
}
return filepath.Join(home, agentsDir, lockFile), nil
}This keeps the current default for users without XDG_STATE_HOME.
Actual: gh always writes $HOME/.agents/.skill-lock.json, and the two tools keep separate lock files.
Related: #14118 / #14260 added PI_CODING_AGENT_DIR support for the same kind of hardcoded path. vercel-labs/skills#2144 (open) proposes AGENTS_HOME for the same shared store; if it merges, gh would need to follow it too to keep the interop.
Logs
$ echo $XDG_STATE_HOME
/home/<user>/.local/state
$ ls -l ~/.local/state/skills/.skill-lock.json ~/.agents/.skill-lock.json
-rw-r--r-- 1 <user> <user> 456 Oct 30 18:29 /home/<user>/.agents/.skill-lock.json
-rw-r--r-- 1 <user> <user> 677 Aug 21 10:06 /home/<user>/.local/state/skills/.skill-lock.json
The first file has only the skill installed with gh skill install. The second has only the skill installed with npx skills add.
Activity
cli-triage commentedon Nov 1, 2026
Thanks for the detailed report! I verified this against current
trunk(commit9490d20):lockfilePath()unconditionally returns$HOME/.agents/.skill-lock.jsonand never consultsXDG_STATE_HOME, so it diverges from the VercelskillsCLI's lock path despite the comment stating the format is meant to interoperate. No duplicate issues found. I'm suggestingbuggiven the clear, verified code evidence and reproduction steps, andpriority-3since it only affects the subset of users who setXDG_STATE_HOMEand use both tools together (workaround: manually point both tools at the same path, or symlink). A maintainer should confirm whether honoringXDG_STATE_HOME(as proposed) is the desired fix, consistent with thePI_CODING_AGENT_DIRprecedent mentioned in the issue.github-actions commentedon Nov 2, 2026
Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.