Claude Code Prompt Engineering Patterns
Description
10 production prompt engineering patterns reverse-engineered from the Claude Code source leak. Python implementation. No proprietary code.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Claude Code Prompt Engineering Patterns
Reverse-engineered from the Claude Code source leak (March 31, 2026). 10 production patterns documented and implemented in Python.
What Happened
On March 31, 2026, Anthropic accidentally leaked the **entire source code** of Claude Code (512,000 lines of TypeScript) through a misconfigured npm package. Before the DMCA takedowns, I analyzed their prompt engineering architecture and extracted **10 production patterns** that any developer can use.
This repo does **NOT** contain any Anthropic code. It documents the **techniques and patterns** with original Python implementations.
The 10 Patterns
SYSTEM PROMPT ARCHITECTURE (how Claude Code builds its prompt)
================================================================
┌──────────────────────────────────────────────────────────────┐
│ Pattern 1: MODULAR PROMPT │
│ ┌────────────────────────────────────────────────────────┐ │
│ │ Identity Section │ │
│ │ "You are an AI coding assistant..." │ │
│ ├────────────────────────────────────────────────────────┤ │
│ │ Pattern 3: SECURITY GUARDRAILS │ │
│ │ One paragraph that controls all cyber boundaries │ │
│ ├────────────────────────────────────────────────────────┤ │
│ │ Pattern 2: CONDITIONAL BEHAVIOR │ │
│ │ if user == "internal":
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11