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

Introducing Roam-Code CLI: A Faster, Deterministic Alternative for Code Exploration
Roam-Code CLI replaces Claude Code's explore phase with a faster, deterministic alternative that indexes codebases for improved efficiency.

Brand-Docs: Open-Source Tool for Claude to Generate DOCX, PPTX, XLSX from Templates
A Reddit user open-sourced Brand-Docs, a solution for Claude to generate Office documents (DOCX, PPTX, XLSX) that faithfully preserve company brand templates — layout, styles, images — without recreation.

Multi-Agent Loop Failures Are Org-Design Failures, Not Prompt Failures
Agent loops bouncing between peers aren't prompt bugs—they're org-chart problems. Treat agent networks as hierarchies with clear stop authority.

VS Code Agent Kanban: Markdown-based task management for AI coding agents
VS Code Agent Kanban is an extension that creates a GitOps-friendly kanban board inside VS Code using markdown files as task records. It addresses context rot in AI coding agents by preserving planning conversations, decisions, and implementation details in version-controlled .md files.