Global Lock File
The global lock file tracks all skills installed to your user directory (~/.agents/). It is located at:
File Structure
Schema Fields
Schema version for future migrations. Current version is
3.Map of skill name to skill entry. Each entry contains:
Tracks dismissed prompts so they’re not shown again.
Array of agent IDs last selected for installation
Version History
Version 3 (Current)
Version 3 (Current)
Added
skillFolderHash field for folder-based update detection.Breaking change: Lock files from v2 and earlier are automatically wiped when read. Users must reinstall skills to populate the new format.Version 2 (Deprecated)
Version 2 (Deprecated)
Used content hashing for update detection.
Version 1 (Deprecated)
Version 1 (Deprecated)
Initial version.
Skill Folder Hash Calculation
TheskillFolderHash is a GitHub tree SHA computed by the GitHub API. It represents the state of the entire skill folder.
Find skill folder
The response contains all files/folders. The CLI finds the tree entry matching the skill folder path.
For root-level skills (no subpath), the root tree SHA is used.
GitHub Token Resolution
To avoid rate limits, the CLI attempts to use a GitHub token in this order:GITHUB_TOKENenvironment variableGH_TOKENenvironment variableghCLI auth token (viagh auth token)
Local Lock File
The local lock file tracks skills installed to a project directory. It is located at:File Structure
Design Philosophy
The local lock file is intentionally minimal to:- Minimize merge conflicts - Skills are sorted alphabetically, and no timestamps are stored
- Deterministic output - Same skills = same JSON every time
- Git-friendly - Two branches adding different skills produce non-overlapping keys that auto-merge cleanly
Schema Fields
Schema version for future migrations. Current version is
1.Map of skill name to skill entry. Sorted alphabetically by key when written.
Computed Hash Algorithm
The local lock file uses content-based hashing:Collect all files
Recursively read all files in the skill directory (excluding
.git/ and node_modules/)Working with Lock Files
Reading Lock Files
Adding Skills
Removing Skills
Related Documentation
Update System
Learn how the update checking system uses lock files
Plugin Manifests
Discover how plugin manifests integrate with lock files