Claude Code Prompt Architecture Reverse-Engineered for Local Models

A GitHub repository contains a complete, legally clean reimplementation of Claude Code's prompting architecture, designed for developers building coding agents on local models.
Key Details
The repository documents the full prompting architecture that Claude Code uses, originally sourced from a brief public npm release. The author studied every prompt and used Claude itself to help rewrite the entire collection from scratch. The result is 26 prompts total covering:
- System prompt structure that actually controls behavior (not just "you are a helpful assistant")
- Tool prompts that prevent the model from using shell when a dedicated tool exists
- Safety rules that gate destructive actions without being overly restrictive
- Memory compression for long sessions (critical for smaller context windows)
- Verification patterns that catch when the model is rationalizing instead of testing
The prompts are organized into categories: system, tools, agents, memory, coordination, and utilities. The prompt patterns are model-agnostic and can be adapted for any model that supports tool use.
Legal Status
Every prompt is independently authored with different wording. The author verified no verbatim copying via automated checks. The repository includes a full legal disclaimer covering nominative fair use, non-affiliation with Anthropic, and a DMCA response policy. This is described as a clean-room style reimplementation, not a copy.
The project is MIT licensed and available at https://github.com/swati510/claude-code-prompts.
This architecture is particularly useful for building agentic workflows with Ollama, llama.cpp, or vLLM.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Nanocode: Training Claude-like coding agents with JAX on TPUs
Nanocode is a JAX library for training Claude-like coding agents end-to-end, using Constitutional AI and TPU optimization. The 1.3B parameter model can be trained in ~9 hours for $200 on TPU v6e-8.

WeAreHere Browser Extension and MCP Tools Scan Website Privacy Practices
Two open-source tools—barebrowse and wearehere—scan websites for trackers, fingerprinting, and data broker connections. The wearehere browser extension shows real-time privacy scores (0-100) as you browse, while MCP servers enable AI assistants to assess any site on command.

CostClaw: Free Local Cost Tracking Dashboard for OpenClaw Agents
CostClaw is a free, local plugin that captures every LLM call via OpenClaw's native hooks and provides a dashboard showing model breakdowns, per-session costs, and hourly spend charts. The developer discovered their heartbeat agent was running Claude Sonnet every 3 minutes 24/7, costing $60/month, and switching to Haiku cut their bill by ~65%.

Spectral: Capture App Traffic to Generate MCP Servers for OpenClaw Agents
Spectral is an open-source tool that captures traffic from any application, analyzes it with an LLM, and generates a working MCP server, allowing OpenClaw agents to call the app's real API directly instead of relying on browser automation.