skills.lock file ensures deterministic, reproducible skill installations. It records exact versions, download URLs, integrity hashes, and resolved permissions for all dependencies.
Schema Definition
The lockfile uses a strict schema with versioning for future compatibility.Root Fields
Lockfile format version.Value:
1 (current version)Purpose:- Enables future format migrations
- Tank CLI validates this version before processing
- Breaking changes to lockfile structure will increment this number
Map of skill names to their locked metadata.Type:
Record<string, LockedSkill>Format:- Keys: scoped skill names (e.g.,
@org/skill-name) - Values: locked skill metadata objects
LockedSkill Schema
Each skill entry in theskills record contains the following fields:
Absolute URL to the skill tarball.Constraints:
- Must be a valid URL
- Typically points to Tank registry storage
- Used to download the exact package version
"https://storage.tankpkg.dev/tarballs/acme/my-skill/1.2.3.tgz"SHA-512 cryptographic hash of the tarball.Constraints:
- Must start with
sha512- - Format:
sha512-<base64-encoded-hash> - Used to verify package integrity during installation
- Prevents tampering and ensures reproducibility
"sha512-Abc123...xyz789=="Resolved runtime permissions for the skill.Type: See Permissions SchemaPurpose:
- Records the exact permissions declared by this version
- Enables permission diff during upgrades
- Enforced at runtime by Tank sandbox
Security audit score for this skill version.Constraints:
- Range: 0-10 (floating point)
nullif not yet audited- Calculated by Tank’s 6-stage security scanner
8-10: Excellent security6-7.9: Good security4-5.9: Moderate risk0-3.9: High risk
8.5 or nullComplete Example
Validation Rules
- Lockfile version: Must be exactly
1(current version) - Integrity format: Must start with
sha512- - Resolved URL: Must be a valid URL
- Audit score: Must be between 0-10 or
null - Permissions: Must conform to Permissions Schema
- Strict mode: No additional properties allowed
Purpose and Usage
Why Lockfiles?
- Reproducibility: Ensures identical installations across environments
- Security: Verifies package integrity with SHA-512 hashes
- Transparency: Shows exact dependency tree and permissions
- Audit trail: Records security scores at install time
When is it Generated?
tank install- Creates or updates lockfiletank add <skill>- Updates lockfile with new dependencytank update- Refreshes lockfile with latest versions
Should I Commit It?
Yes, always commitskills.lock to version control:
- Ensures team members get identical dependencies
- CI/CD builds are reproducible
- Security audits are consistent
Integrity Verification
During installation, Tank:- Downloads tarball from
resolvedURL - Computes SHA-512 hash of downloaded file
- Compares against
integrityfield - Rejects installation if hashes don’t match
- Man-in-the-middle attacks
- Registry compromises
- Supply chain tampering
Related
- Permissions Schema - Permission field details
- skills.json Schema - Manifest format
- CLI: tank install - Generate lockfile
- CLI: tank audit - Check security scores