Claude Code · Open Source

One command to
install them all.

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.

Three tools. One coordinated install.

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.

🧠

Longhand

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 Layer
🔲

Context-Mode

Sandboxes 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 Layer
🔒

Hardgate

Blocks 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 Layer

How the layers interact

Each tool hooks into a different Claude Code event. They operate independently at runtime — a misconfigured layer doesn't break the others.

🔒 Hardgate 🔲 Context-Mode 🧠 Longhand ⚙️ Claude Code Core PreToolUse hook — exit 2 blocks forbidden tools before they run PreToolUse hook — sandboxes output; feeds Claude a clean summary SessionEnd hook + UserPromptSubmit hook — saves and recalls sessions Runs tools, manages context window, dispatches hooks in order request flow
Your Prompt to Claude Hardgate PreToolUse ⛔ Blocked Context-Mode sandbox + summarise Tool Runs Bash, Read, … Longhand saves session allowed blocked

Figure: request flow through the three hook layers. Layers are independent — each hooks a different Claude Code event.

Two ways to install

Requires Python 3.10+, Node.js 18+, and the Claude Code CLI. Pick the path that fits your workflow.

Option A — Standalone
No Claude Code session needed
Run bash install.sh or double-click install.bat on Windows. Best for first-time setup.
Option B — Claude Code Skill
From inside an active session
Run /stack in Claude Code. Best for users already in a session.
1

Clone the repo

Both paths require the full repo — do not copy just the skill file.

$ git clone https://github.com/scottconverse/stack
$ cd stack
2

Run the installer

Option A — Standalone (recommended for first install):

# macOS / Linux
$ bash install.sh

# Windows — double-click install.bat, or from any terminal:
$ python install.py

Option B — Claude Code skill:

$ claude
> /stack
3

Complete the Hardgate step

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.

4

Verify and restart

After install, confirm runtime health and restart Claude Code.

$ longhand doctor
$ claude mcp list

Under the hood

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
Known limitation: The post-install verifier checks that config entries are present — not that MCP servers are live. After install, always run longhand doctor and claude mcp list to verify runtime health.

Everything you need