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

Open Source MCP Server Connects Claude to Mailchimp API
A developer built a Mailchimp MCP server using Claude Code, providing 53 tools for campaigns, audiences, reports, automations, and e-commerce with built-in safety modes and read-only configuration.

Claude-Control: Mobile Remote Control for Claude Code Sessions
Claude-control is an open-source tool that lets you manage Claude Code sessions from your phone via HTTPS and WebSocket. It runs Claude Code in a real PTY inside tmux, detects permission prompts, and sends push notifications with Allow/Deny buttons.
WorldClaw: Agentic 3D Open-World Generation at Scale
Tencent's WorldClaw is a new system for agentic 3D open-world generation at scale, aiming to create large, detailed virtual environments.
Claudy: A native macOS wrapper for Claude Code with multi-session, auto account switching, and draft commits
Claudy is a native macOS app built with SwiftUI + SwiftData that wraps Claude Code, adding multi-session management, automatic account switching on rate limits, draft commits for mid-session checkpoints, and a marketplace for Skills, MCPs, and Commands.