CodePiler Docs
Examples and FAQ
See practical CodePiler use cases and common questions about filtering, prompt scope, the prompt wrapper, and how to build better repository context for AI tools.
Practical use cases
A common use case is isolating only the modules involved in an error, applying the Find and fix bugs task preset, and sending one focused prompt to the model instead of pasting files one by one.
Another pattern is onboarding: gather entrypoints, routing, schema files, and configuration, apply a General system prompt preset, and ask the model for an architecture walkthrough.
For refactoring sessions, pick the relevant feature folder, apply a language-specific system prompt and the Refactor for readability or Apply OOP principles task, and use the token budget to confirm the prompt fits inside your chosen model's context window.
Choosing the right prompt scope
Large prompts are not automatically better. In most sessions, the best result comes from selecting the files closest to the behavior, interface, or subsystem under discussion.
Use the selected files panel at the bottom of the tree to audit exactly what is included and remove anything that adds noise. Use the token budget bar to confirm the selection fits comfortably inside the model's context window before exporting.
Getting the most from the prompt wrapper
System prompt presets are a starting point, not a final answer. After selecting a language preset, customize it to match the specific framework, patterns, or constraints visible in the codebase.
Task presets work best when combined with a focused file selection. A security review prompt sent with 80 files is less effective than one sent with the 8 files that handle authentication and input validation.
If you are using a model with a large context window (Gemini 1M, Claude 200K), you can afford a broader selection. For smaller windows, use the token budget bar to stay under 70% to leave room for the model's response.
Examples
Trace an auth flow
Search for auth-related files, select the route, middleware, and service layer. Apply the Security review task preset with a language-specific system prompt, then export.
Document a feature slice
Select one feature folder, supporting types, and relevant config. Apply the Document the code task preset and export a structured snapshot for documentation drafting.
Onboard a new team member
Use Select All on the src/ folder, trim heavy files with the size manager, apply a General system prompt, and export a full architecture overview prompt.
FAQ
Should I include every dependency file in the prompt?
Usually no. Include the files that define the behavior, contracts, or data flow you want the model to reason about. Too much unrelated code dilutes the result and wastes context.
Can I reuse the same repository export across models?
Yes. Keep the same selection set and change the export format or adjust the system prompt preset based on the tool you plan to use.
How do I quickly switch between different task prompts?
Open the prompt wrapper modal, click the Task presets dropdown, and select a new preset. It overwrites the current task text. You can then edit the result before closing the modal.
Can I save a session that includes my prompt wrapper?
Currently saved sessions store the file selection and repository. The prompt wrapper text is session-level state and resets on page reload. Copy your custom prompts to a text file if you want to reuse them.