Skip to main content

First Context Bundle

This tutorial creates a small context bundle from a local repository. Start with a low-risk repository or a narrow folder so you can learn the workflow before using PastePrompt on client code.

Before you start

  • Install PastePrompt on macOS.
  • Choose a repository you are allowed to review.
  • Avoid selecting files that contain credentials or customer-private material for your first test.
  • Read Clipboard and export risks if you are using sensitive code.

Tutorial

1. Select repo

  1. Open PastePrompt.
  2. Choose Select Repository.
  3. Pick a local repository folder.
  4. Wait for the file tree to load.
  5. Confirm the displayed root path is the repository you intended.

2. Search files

Use search to narrow the file tree. Good first searches include:

  • src
  • api
  • a module name, such as auth
  • a file extension, such as .ts, .go, or .rs
  • a test folder, such as test or spec

3. Select files and folders

Select a small set of files first. For example:

  1. One primary source file.
  2. One interface or dependency file.
  3. One test file that documents expected behavior.
  4. One README or spec section if it clarifies intent.

Avoid selecting the whole repository on your first run.

4. Preview a file

  1. Click a selected file.
  2. Review the preview.
  3. Confirm it is text source, not a binary or generated artifact.
  4. Remove files that are irrelevant, very large, or unexpectedly sensitive.

5. Review token counts

Check token estimates for:

  • Each selected file.
  • Selected folders.
  • Prompt instructions.
  • Final generated bundle.
Keep margin

Token counts are estimates. Leave room below the target model limit because external tools may tokenize or wrap prompts differently.

6. Choose XML or Markdown

Choose the output format based on your workflow:

  • XML-like: better when you want clear machine-readable sections.
  • Markdown: better when you want a durable review note or handoff artifact.

7. Add instructions

Write a narrow instruction. For example:

Review the selected vault files for accounting and authorization edge cases.
Separate confirmed code facts from hypotheses.
Do not claim a vulnerability unless the selected code supports it.

8. Run copy or export

  1. Choose copy or Markdown export.
  2. Review secret scanner warnings.
  3. Redact, exclude, or cancel if a warning is relevant.
  4. Review the generated bundle.
  5. Copy to clipboard or export .md.

9. Paste into ChatGPT, Claude, Codex, or another tool

Paste or attach the bundle into your LLM workflow. Ask one focused question first instead of starting with a broad audit prompt.

External tools are separate

Once you paste or attach a bundle into another service, that service's data handling applies. PastePrompt cannot control content after you share it.

Example output structure

XML-like bundles use explicit sections:

<file_map>
src/auth/session.ts
src/auth/types.ts
tests/session.test.ts
</file_map>

<file_contents>
<file path="src/auth/session.ts">
...
</file>
<file path="src/auth/types.ts">
...
</file>
<file path="tests/session.test.ts">
...
</file>
</file_contents>

<user_instructions>
Review the selected session files for authorization and state-handling edge cases.
</user_instructions>

Markdown bundles are intended to be readable as review notes:

# PastePrompt Context Bundle

## File Map

- src/auth/session.ts
- src/auth/types.ts
- tests/session.test.ts

## File Contents

### src/auth/session.ts

...

## User Instructions

Review the selected session files for authorization and state-handling edge cases.

Best practices for small repos

  • Start with the whole feature folder only if token counts are reasonable.
  • Include tests that show intended behavior.
  • Keep instructions short and specific.
  • Export Markdown if you want a durable review artifact.

Best practices for large repos

  • Build one bundle per review question.
  • Use search and folder totals to avoid low-value files.
  • Add related files only for the selected source files that need dependency context.
  • Use Git diff mode for PRs and sponsor fixes.
  • Split context across multiple prompts instead of exceeding a model limit.