Guide · Open source
How to use context-engineering-intro with Claude Code: step by step
Updated · written with AI from the project's own documentation and checked against our catalogue data
context-engineering-intro is an MIT-licensed Python template repository for a practice called context engineering: giving an AI coding assistant the rules, examples and feature requests it needs to build a feature end to end. This guide walks you through cloning the template, filling in its files, and running its two Claude Code slash commands. By the end you will know how to hand a feature to Claude Code as a structured Product Requirements Prompt (PRP).
Quick start
- 1Clone the template. Run git clone on the Context-Engineering-Intro repository and cd into the folder.
- 2Review CLAUDE.md. Keep the provided global rules or edit CLAUDE.md to match your project's conventions.
- 3Add examples. Place relevant code patterns in the examples/ folder and describe them in examples/README.md.
- 4Write INITIAL.md. Fill in the FEATURE, EXAMPLES, DOCUMENTATION and OTHER CONSIDERATIONS sections with specific detail.
- 5Generate the PRP. In Claude Code, run /generate-prp INITIAL.md to produce PRPs/your-feature-name.md.
- 6Execute the PRP. In Claude Code, run /execute-prp on the generated PRP file to implement the feature.
What you need before you start
The template is set up around Claude Code. The README's slash commands only work inside Claude Code, so you need it installed and working before the workflow will run.
You also need Git to clone the repository. The README says the strategy can be applied to other AI coding assistants, but the provided commands are Claude Code specific.
- Git
- Claude Code (required for the /generate-prp and /execute-prp slash commands)
Get the template onto your machine
Clone the repository and move into the project folder. The README gives these two commands as the first step of its quick start.
git clone https://github.com/coleam00/Context-Engineering-Intro.git
cd Context-Engineering-IntroSet your project rules in CLAUDE.md
CLAUDE.md holds project-wide rules that the AI assistant follows in every conversation. The template covers project awareness, code structure such as file size limits, testing requirements, style conventions and documentation standards. Setting it up is optional because a template is provided, but you can edit it to add your project-specific guidelines.
Add code examples to the examples/ folder as well. The README calls this highly recommended and says AI assistants perform much better when they can see patterns to follow.
- Keep the template as-is or customise it for your project.
- Put examples of module structure, testing patterns, integration patterns and CLI patterns in examples/.
- Include a README.md inside examples/ that explains what each example demonstrates.
Write your feature request in INITIAL.md
INITIAL.md describes what you want built. It has four sections: FEATURE, EXAMPLES, DOCUMENTATION and OTHER CONSIDERATIONS. The README says to be specific, and gives a before-and-after: 'Build a web scraper' is too vague, while a detailed description of functionality, libraries and storage is what works.
The repository includes INITIAL_EXAMPLE.md as a complete example you can compare against.
- FEATURE: be specific and comprehensive about functionality and requirements.
- EXAMPLES: list files in examples/ and explain how they should be used.
- DOCUMENTATION: link API docs, library guides, MCP server resources or database schemas.
- OTHER CONSIDERATIONS: note authentication, rate limits, common pitfalls and performance requirements.
## 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]Generate the PRP with /generate-prp
In Claude Code, run the generate command with your feature request file. A PRP is a Product Requirements Prompt: an implementation blueprint with context, implementation steps with validation, error handling patterns and test requirements. The README says it is similar to a PRD but written to instruct an AI assistant.
The command reads your request, researches the codebase for patterns, searches for relevant documentation and writes a PRP to PRPs/your-feature-name.md. The README notes the command scores confidence on a 1-10 scale. The slash command definitions live in .claude/commands/generate-prp.md if you want to see exactly how it works.
- Reads your feature request.
- Researches the codebase for patterns.
- Searches for relevant documentation.
- Creates the PRP in PRPs/your-feature-name.md.
/generate-prp INITIAL.mdExecute the PRP with /execute-prp
Once the PRP exists, pass it to the execute command. The assistant reads the whole PRP, makes a task plan with TodoWrite, implements each component, runs tests and linting, and fixes what fails.
The command definition is in .claude/commands/execute-prp.md. The README's example output for a finished PRP is PRPs/EXAMPLE_multi_agent_prp.md.
- Load context from the PRP.
- Plan the work as a task list.
- Implement each component and validate it.
- Iterate until the success criteria are met.
/execute-prp PRPs/your-feature-name.mdWhat people use it for
- Handing a multi-step feature to Claude Code with a written spec, such as a CLI tool with agent modules and tests.
- Keeping AI-generated code consistent across a team by sharing one CLAUDE.md rules file.
- Writing detailed feature specs in INITIAL.md before letting the assistant write any code.
- Reusing the examples/ folder to show the assistant how your project organises modules, tests and error handling.
Frequently asked questions
Is context-engineering-intro free to use?
The repository is licensed under MIT. The README does not mention pricing, but Claude Code is a separate tool that the slash-command workflow depends on.
What do I need to install to use context-engineering-intro?
You need Git to clone the repository and Claude Code to run the /generate-prp and /execute-prp slash commands. The README says the workflow depends on those commands.
Can I use context engineering with other AI coding assistants?
The README says the strategy can be applied with any AI coding assistant. The provided slash commands, however, are Claude Code specific, so you would need to adapt the workflow yourself.
What is a PRP?
PRP stands for Product Requirements Prompt. The README describes it as a comprehensive implementation blueprint that includes context, implementation steps with validation, error handling patterns and test requirements.
Does this template cover RAG or tool integration?
No. The README explicitly says the template does not focus on RAG and tools with context engineering, and that the author plans to cover those later.
Why does my PRP come out weak?
The README stresses specificity. Vague requests like 'Build a web scraper' are weak, so add detail to FEATURE, provide examples in examples/, and list documentation links in INITIAL.md.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this template if you already work in Claude Code and want a structured way to hand off feature work with shared project rules. Skip it if you want a finished app or library, if you have no AI coding assistant set up, or if you need guidance on RAG or tool integration, which the README leaves out.
Install options & downloads