What the AI needs to see
For Next.js, the most useful context usually includes routes, components, server actions, API handlers, config files, and package manifests.
The goal is to give the AI enough structure to understand the application without wasting tokens on files that are generated, duplicated, or irrelevant.
Workflow
Build a task-specific codebase bundle before asking the AI for help.
- Add the local repository or GitHub repo to Riflet.
- Keep the files that define the behavior, route, or feature you want help with.
- Filter dependencies, build output, generated files, and unrelated examples.
- Export one Markdown file and use it with Claude, ChatGPT, Gemini, or a local coding model.
Framework-specific caveat
Skip build output, generated files, large lockfile sections, and screenshots unless the task requires them.
Token budget advice
For debugging, include the smallest failing slice plus the surrounding types and tests. For architecture, include entrypoints, config, and documentation.
Riflet's token count helps you trim the bundle before the model starts guessing from partial context.
Build your AI context file with Riflet
Select the sources that matter, check the token budget, and export one clean file for the AI you already use.
Download Riflet freeFrequently asked questions
Can I use this Next.js codebase bundle in more than one AI tool?
Yes. Riflet exports plain text or Markdown, so the same context file can be used in Claude, ChatGPT, Gemini, Perplexity, or a local model if that tool accepts pasted text or file uploads.
Does Riflet automatically update the AI after my files change?
No. Riflet is deliberately export-based. When your files change, reopen the workspace, let Riflet reapply the saved sources and filters, export a fresh bundle, and upload it where you want to use it.
How do I avoid giving AI too much context?
Start with the decision or task, then include only the files that would help a smart human answer it. Use Riflet's token count to remove stale, duplicated, generated, or background-only files before exporting.
Do my files leave my computer when Riflet builds the bundle?
Riflet processes selected files locally. Your content leaves your machine only if you choose to paste or upload the exported bundle into an AI product.