Global Lock File
The global lock file tracks all skills installed to your user directory (~/.agents/). It is located at:
File Structure
Schema Fields
number
required
Schema version for future migrations. Current version is
3.object
required
Map of skill name to skill entry. Each entry contains:
object
Tracks dismissed prompts so they’re not shown again.
string[]
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.
1
Request tree data
The CLI calls GitHub’s Trees API for the repository:
2
Find skill folder
The response contains all files/folders. The CLI finds the tree entry matching the skill folder path.
3
Extract SHA
The tree entry’s
sha field is the skill folder hash. This SHA changes whenever any file in the folder changes.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
number
required
Schema version for future migrations. Current version is
1.object
required
Map of skill name to skill entry. Sorted alphabetically by key when written.
Computed Hash Algorithm
The local lock file uses content-based hashing:1
Collect all files
Recursively read all files in the skill directory (excluding
.git/ and node_modules/)2
Sort by path
Sort files alphabetically by relative path for deterministic hashing
3
Hash contents
Create a SHA-256 hash from:
- Each file’s relative path (to detect renames)
- Each file’s content (binary or text)
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