ContextLock
An open-source CLI that scans coding agent configuration and catches unreviewed changes in pull requests

ContextLock gives teams a way to review what a repository asks its coding agents to read and run. It inventories Git-tracked instructions, skills, hooks, settings, and Model Context Protocol (MCP) server definitions for Claude Code, Cursor, VS Code, GitHub Copilot, and Codex. Its Python CLI is called agentbom.
The problem
A change to an instruction file can alter how an agent handles a task. A change to an MCP configuration can alter which command the agent launches. Those changes can be spread across dotfiles and editor-specific folders, where reviewers have to know what each agent loads to understand the effect of a diff.
How it works
- Scan the repository.
agentbom scaninventories the files and flags issues such as unpinned MCP dependencies, broad permissions, and hard-coded secrets. The scan reads files locally without executing them or making network requests. - Record a baseline.
agentbom lockwritesagentbom.lockfor the team to review and commit. The lockfile records structured definitions for readable diffs and file digests to catch changes that leave those definitions intact. It records environment variable and header names while omitting their values. - Check pull requests.
agentbom checkcompares the current inventory with the lockfile and reports additions, removals, and edits. The GitHub Action publishes a job summary and fails when it detects drift. It can also update a pull request comment and upload a SARIF report to GitHub code scanning.
Policy and review
Teams can set a severity threshold in agentbom.policy.yml. A hash-pinned approval applies to the exact MCP server or skill the team reviewed. A rule exception for a file path requires a reason and an expiry date. Lockfile drift always fails the check, so an intentional change requires a lockfile update.