A standalone installer and a Claude Code skill that set up Longhand, Context-Mode, and Hardgate as a coordinated stack — with timestamped config backup, per-tool idempotency, and a hardened post-install verification checklist.
Each tool solves a different problem with Claude Code. Together they give you persistent memory, a clean context window, and hard enforcement — all wired together correctly from the start.
Stores every session verbatim in SQLite + ChromaDB. Semantic recall in ~126ms. Claude remembers past conversations, decisions, and code changes — zero API cost.
By Wynelson94 · github.com/Wynelson94/longhand
Memory LayerSandboxes tool output. Raw command results are processed outside the context window. Sessions run longer. Claude stops forgetting earlier parts of the conversation.
By scottconverse · github.com/scottconverse/context-mode
Context LayerBlocks forbidden tool calls via exit 2 hooks. Claude cannot push to GitHub, delete files, or run migrations without your explicit approval.
By scottconverse · github.com/scottconverse/hardgate
Enforcement LayerEach tool hooks into a different Claude Code event. They operate independently at runtime — a misconfigured layer doesn't break the others.
Figure: request flow through the three hook layers. Layers are independent — each hooks a different Claude Code event.
Requires Python 3.10+, Node.js 18+, and the Claude Code CLI. Pick the path that fits your workflow.
bash install.sh or double-click install.bat on Windows. Best for first-time setup./stack in Claude Code. Best for users already in a session.Both paths require the full repo — do not copy just the skill file.
Option A — Standalone (recommended for first install):
Option B — Claude Code skill:
Both paths pause here. Open Claude Code, run /hard-gate, and follow the prompts to choose which tools to enforce. Then return to the installer and press Enter.
After install, confirm runtime health and restart Claude Code.
Tested against these specific versions. Pin if you need reproducibility.
| Tool | Tested version | Install method | Runtime hook |
|---|---|---|---|
| Longhand | 0.5.5 | pip install longhand==0.5.5 |
SessionEnd, UserPromptSubmit |
| Context-Mode | 1.6.0 | node install.js from local clone |
PreToolUse (Bash, Read, WebFetch + 6 more) |
| Hardgate | — | /hard-gate skill (interactive) |
PreToolUse (exit 2), SessionStart |
| Python | 3.14.3 (pre-release; 3.10+ supported) | Prerequisite | Powers Longhand + verify.py |
| Node.js | 18+ | Prerequisite | Powers Context-Mode install |
longhand doctor and claude mcp list to verify runtime health.
Source code, issues, and pull requests.
Plain-language guide to what each tool does and what to do when things go wrong.
Deep-dive reference with architecture diagrams, design decisions, and full verifier docs.
Dev setup, running tests, architecture notes, and commit style.
What changed in each release.