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

Pretticlaw: A Lighter Alternative to OpenClaw with Faster Setup
Pretticlaw is a lightweight alternative to OpenClaw that requires only 2 commands for setup, has a 30MB footprint, and responds in 2-3 seconds with an inbuilt dashboard on port 6767.

Agent Kernel: Three Markdown Files for Stateful AI Agents
Agent Kernel provides three markdown files that enable stateful behavior in AI coding agents without databases or custom frameworks. It works with OpenCode, Claude Code, Codex, Cursor, Windsurf, and similar tools.

Android CLI and Skills for AI Agent Development Workflows
Google released Android CLI with commands like android create and android sdk install, plus Android Skills GitHub repository with modular instruction sets. Internal benchmarks show 70% reduction in LLM token usage and 3x faster task completion.

Benchmark shows AI browser automation tools vary 2.6x in token costs despite identical accuracy
A benchmark of 4 CLI browser automation tools using Claude Sonnet 4.6 on 6 real-world tasks found all achieved 100% accuracy, but openbrowser-ai used 36,010 tokens while others used 77,123-94,130 tokens. Tool call count was the strongest predictor of token cost.