A comprehensive template for getting started with Context Engineering - the discipline of engineering context for AI coding assistants so they have the information necessary to get the job done end to end.
Context Engineering is 10x better than prompt engineering and 100x better than vibe coding.
# 1. Clone this template
git clone https://github.com/coleam00/Context-Engineering-Intro.git
cd Context-Engineering-Intro
# 2. Set up your project rules (optional - template provided)
# Edit CLAUDE.md to add your project-specific guidelines
# 3. Add examples (highly recommended)
# Place relevant code examples in the examples/ folder
# 4. Create your initial feature request
# Edit INITIAL.md with your feature requirements
# 5. Generate a comprehensive PRP (Product Requirements Prompt)
# In Claude Code, run:
/generate-prp INITIAL.md
# 6. Execute the PRP to implement your feature
# In Claude Code, run:
/execute-prp PRPs/your-feature-name.md
Context Engineering represents a paradigm shift from traditional prompt engineering:
Prompt Engineering: - Focuses on clever wording and specific phrasing - Limited to how you phrase a task - Like giving someone a sticky note
Context Engineering: - A complete system for providing comprehensive context - Includes documentation, examples, rules, patterns, and validation - Like writing a full screenplay with all the details
context-engineering-intro/
├── .claude/
│ ├── commands/
│ │ ├── generate-prp.md # Generates comprehensive PRPs
│ │ └── execute-prp.md # Executes PRPs to implement features
│ └── settings.local.json # Claude Code permissions
├── PRPs/
│ ├── templates/
│ │ └── prp_base.md # Base template for PRPs
│ └── EXAMPLE_multi_agent_prp.md # Example of a complete PRP
├── examples/ # Your code examples (critical!)
├── CLAUDE.md # Global rules for AI assistant
├── INITIAL.md # Template for feature requests
├── INITIAL_EXAMPLE.md # Example feature request
└── README.md # This file
This template doesn't focus on RAG and tools with context engineering because I have a LOT more in store for that soon. ;)
The CLAUDE.md file contains project-wide rules that the AI assistant will follow in every conversation. The template includes:
You can use the provided template as-is or customize it for your project.
Edit INITIAL.md to describe what you want to build:
## FEATURE:
[Describe what you want to build - be specific about functionality and requirements]
## EXAMPLES:
[List any example files in the examples/ folder and explain how they should be used]
## DOCUMENTATION:
[Include links to relevant documentation, APIs, or MCP server resources]
## OTHER CONSIDERATIONS:
[Mention any gotchas, specific requirements, or things AI assistants commonly miss]
See INITIAL_EXAMPLE.md for a complete example.
PRPs (Product Requirements Prompts) are comprehensive implementation blueprints that include:
They are similar to PRDs (Product Requirements Documents) but are crafted more specifically to instruct an AI coding assistant.
Run in Claude Code:
/generate-prp INITIAL.md
Note: The slash commands are custom commands defined in .claude/commands/. You can view their implementation:
- .claude/commands/generate-prp.md - See how it researches and creates PRPs
- .claude/commands/execute-prp.md - See how it implements features from PRPs
The $ARGUMENTS variable in these commands receives whatever you pass after the command name (e.g., INITIAL.md or PRPs/your-feature.md).
This command will:
1. Read your feature request
2. Research the codebase for patterns
3. Search for relevant documentation
4. Create a comprehensive PRP in PRPs/your-feature-name.md
Once generated, execute the PRP to implement your feature:
/execute-prp PRPs/your-feature-name.md
The AI coding assistant will: 1. Read all context from the PRP 2. Create a detailed implementation plan 3. Execute each step with validation 4. Run tests and fix any issues 5. Ensure all success criteria are met
FEATURE: Be specific and comprehensive - ❌ "Build a web scraper" - ✅ "Build an async web scraper using BeautifulSoup that extracts product data from e-commerce sites, handles rate limiting, and stores results in PostgreSQL"
EXAMPLES: Leverage the examples/ folder
- Place relevant code patterns in examples/
- Reference specific files and patterns to follow
- Explain what aspects should be mimicked
DOCUMENTATION: Include all relevant resources - API documentation URLs - Library guides - MCP server documentation - Database schemas
OTHER CONSIDERATIONS: Capture important details - Authentication requirements - Rate limits or quotas - Common pitfalls - Performance requirements
The command follows this process:
Identifies conventions to follow
Documentation Gathering
Adds gotchas and quirks
Blueprint Creation
Adds test requirements
Quality Check
See PRPs/EXAMPLE_multi_agent_prp.md for a complete example of what gets generated.
The examples/ folder is critical for success. AI coding assistants perform much better when they can see patterns to follow.
Class/function patterns
Testing Patterns
Assertion styles
Integration Patterns
Authentication flows
CLI Patterns
examples/
├── README.md # Explains what each example demonstrates
├── cli.py # CLI implementation pattern
├── agent/ # Agent architecture patterns
│ ├── agent.py # Agent creation pattern
│ ├── tools.py # Tool implementation pattern
│ └── providers.py # Multi-provider pattern
└── tests/ # Testing patterns
├── test_agent.py # Unit test patterns
└── conftest.py # Pytest configuration
$ claude mcp add context-engineering-intro \
-- python -m otcore.mcp_server <graph>