What is anchor?
anchor is a Claude Code mod by pourya7 that pin a session to its git worktree: every Bash call runs from the anchor, and the primary checkout is guarded against stray edits and git writes. It is listed under Security and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | pourya7 |
| Repository | pourya7/claude-code-mods |
| Popularity | no public popularity data yet |
| Category | Security |
| Security | Low risk (88/100) |
| Rank | #4,302 of 5,272 Claude Code mods; #448 in Security |
| License | MIT |
| Last commit | 2026-10-04 |
| Hooks | 5 events |
| Sees | every tool call, subagent spawns |
| Draws on | CommandOutput |
Is anchor safe to install?
anchor scores 88/100 on the MCPMods security check: Low risk. Things to review: starts processes outside the sandbox. It passed 7 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| No network access | Pass |
| Starts processes outside the sandbox | Review |
| Writes no files or config | Pass |
| Doesn't read environment variables | Pass |
| Only sees the events it hooks | Pass |
| Doesn't drive Claude | Pass |
| Passes claude plugin validate | Pass |
| Has an open-source license | Pass |
API calls in its code
| Call | What it means |
|---|---|
$.command.register | |
$.fs.stat | reads files |
$.process.run | runs processes |
$.session.cwd | |
$.state.get | |
$.state.set | |
$.ui.resolve | draws interface |
$.ui.status | draws interface |
$.ui.toast | draws interface |
How do I install anchor?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/pourya7/claude-code-mods claude plugin validate ./claude-code-mods/anchor
- Install it. Run this in your terminal, then /reload-plugins in an open session.
claude plugin marketplace add pourya7/claude-code-mods && claude plugin install anchor@claude-code-mods
Or ask Claude to set it up
Paste this into Claude Code and it installs anchor for you:
Install the "anchor" Claude Code mod from https://github.com/pourya7/claude-code-mods/tree/main/anchor. Run claude plugin validate on it first and show me what it can access before you enable it.
More from pourya7/claude-code-mods
This repository has at least 9 Claude Code mods on MCPMods.
- anti-cheat: No claims without evidence: flags "tests pass", "CI green" and "verified" claims that nothing in the turn backs up. (Low risk)
- co-op: A second player reviews before the PR: gh pr create waits for a second-model review of the branch diff, and a failing re (Review before installing)
- dock: Container stacks per worktree: a pixel-art pane of every compose stack with its memory and worktree, orphans whose workt (Low risk)
- honest-exit: Make silent shell failures loud: a glob that matched nothing, a command missing from the agent's shell, or a pipe that h (Low risk)
- mender: Fix the arguments, not the model: repairs malformed MCP tool arguments ("true" for true, numbers as strings, unknown key (Low risk)
- party: A raid frame for every live session on the machine: who is working, who is waiting on you and for how long, per-PR locks (Low risk)
- prove-it: The fix must make a test fail first: reverts your source changes, runs the changed tests and requires a failure, restore (Review before installing)
- quicksave: A save point before compaction: the task's goal, step, branch, links, decisions, rules and next step are saved before /c (Low risk)