What do you want to do?
3 use cases
-
Turn a whole repo into one prompt for an LLM
Point Code2prompt at a folder to get a formatted prompt with the source tree and files, copied or saved.
View prompt
Install mufeedvh/code2prompt and generate a prompt for <project folder> saved to prompt.txt. Tell me the token estimate, and if it is over <limit> tokens, rerun it excluding <folders> with glob filters.
-
Help your coding agent find the right files faster
Install the Code2prompt agent skill so your agent maps functions and classes before reading code.
View prompt
Install the mufeedvh/code2prompt CLI and its agent skill for <agent>, then use it to build a map of <repo> and gather only the files and tests needed to <task>. Show me the context you gathered before editing anything.
-
Build a review prompt from your git changes
Use Code2prompt's git integration and templates to package diffs or branch comparisons for an LLM review.
- REPO
mufeedvh/code2prompt - Software and DevOps
- Intermediate
View prompt
Using mufeedvh/code2prompt, create a prompt for reviewing the changes on my branch <branch> against <base>, using a Handlebars template that asks for bugs, missing tests and security issues. Save it to review.txt and give me the command you used.
- REPO
Quick start with Code2prompt
- Check you have what it needs: Cargo, Homebrew, or pip for the Python SDK; binaries are also on the releases page; Git, Rust and Cargo only if you build from source; Optional: the wayland feature flag for clipboard support on Wayland systems.
- Open mufeedvh/code2prompt on GitHub and read the README and license.
- Install with
cargo install code2promptorbrew install code2prompt - Run
code2prompt .in your project; output goes to stdout, add -c to copy it to the clipboard - Save it instead with
code2prompt path/to/project --output-file prompt.txt - Check the token estimate before pasting so you stay inside your model's context window
These steps come from our top use case, Turn a whole repo into one prompt for an LLM, which also has a copy-paste agent prompt.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for mufeedvh/code2prompt
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forDevelopers who paste code into ChatGPT or Claude, or build agents and RAG pipelines that need codebase context.
- Why it is hot7.7k stars, talked about in 2 AI sources we track
- LanguageRust
- Sourcegithub.com/mufeedvh/code2prompt ยท Back to Hot repos
Requirements
- Cargo, Homebrew, or pip for the Python SDK; binaries are also on the releases page
- Git, Rust and Cargo only if you build from source
- Optional: the wayland feature flag for clipboard support on Wayland systems
Add this badge to your README
Maintain Code2prompt? Show readers where to find these use cases.
Markdown
[](https://dedupedai.com/use-cases/mufeedvh-code2prompt/?utm_source=github&utm_medium=badge&utm_campaign=mufeedvh-code2prompt)
HTML
<a href="https://dedupedai.com/use-cases/mufeedvh-code2prompt/?utm_source=github&utm_medium=badge&utm_campaign=mufeedvh-code2prompt"><img src="https://dedupedai.com/badge/mufeedvh/code2prompt.svg" alt="Use cases on Deduped" height="20"></a>
A static image, no tracking script. About the badge
Questions about Code2prompt
What is Code2prompt?
Code2Prompt is a Rust context engineering tool that turns a codebase into one well-structured prompt for large language models. It respects .gitignore, filters files with glob patterns, applies Handlebars templates, estimates token counts, can include git diffs, logs and branch comparisons, and offers a CLI with an interactive TUI, a Python SDK, an MCP server and an agent skill. It is an open-source project on GitHub: https://github.com/mufeedvh/code2prompt.
How do I use Code2prompt?
Install with cargo install code2prompt or brew install code2prompt; then run code2prompt . in your project; output goes to stdout, add -c to copy it to the clipboard; save it instead with code2prompt path/to/project --output-file prompt.txt. The use cases on this page give the full steps and a copy-paste agent prompt for each job.
Who is Code2prompt for?
Developers who paste code into ChatGPT or Claude, or build agents and RAG pipelines that need codebase context.
What can I do with Code2prompt?
3 use cases so far, for example: Turn a whole repo into one prompt for an LLM; Help your coding agent find the right files faster; Build a review prompt from your git changes. Each has steps and a copy-paste agent prompt.
What do I need to run Code2prompt?
Cargo, Homebrew, or pip for the Python SDK; binaries are also on the releases page; Git, Rust and Cargo only if you build from source; Optional: the wayland feature flag for clipboard support on Wayland systems.
What are alternatives to Code2prompt?
Other hot AI repos in Software and DevOps: Skills, Claude Mem, Freellmapi, Andrej Karpathy Skills, Agent Desktop.
Is Code2prompt safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.