Pre-reads

Pre-reads are project files that are automatically included in every conversation. They give the agent context about your project structure, conventions, and important files without you having to mention them each time.

How Pre-reads Work

When you start a new conversation, Swordfish automatically searches for:

  • AGENTS.md
  • CLAUDE.md
  • GEMINI.md
  • Files in .cursor/rules directories (at root or in subdirectories)

These files are read and included in the system prompt, so the agent always has context about your project.

Managing Pre-reads

In the extension, you'll see a "Pre-reads" section that shows:

  • Files that were automatically found
  • Files you've manually selected
  • A search box to find additional files
Try it: Pre-reads Button and Section

We search for: AGENTS.md, CLAUDE.md, GEMINI.md, and files in .cursor/rules directories (at root or in subdirectories)

Selected Files (3)

Use glob patterns: *.md, **/AGENTS.md, or exact paths

Search Results (1)

The button shows a badge with the count of selected files. Click to expand/collapse the section. Selected files appear in a green-bordered box. Use the search to find additional files.

Adding Files

  1. Click the search box in the Pre-reads section
  2. Type a file path or pattern (e.g., FEATURE_INSTRUCTIONS.md or **/*.md)
  3. Click "Search" to find matching files
  4. Select files from the search results
  5. Selected files are automatically included in future conversations

Removing Files

Uncheck files in the Pre-reads list to exclude them from future conversations. They'll still be found in searches if you need them later.

Best Practices

  • Include AGENTS.md or CLAUDE.md - These files contain instructions for AI agents working on your project
  • Include .cursor/rules files - These contain project-specific rules and guidelines
  • Include feature instructions - Files like FEATURE_INSTRUCTIONS.md help the agent understand your project structure
  • Don't overdo it - Too many pre-reads can slow down the agent. Focus on essential context files
💡 Tip

Pre-reads are especially useful for large projects where the agent needs to understand the codebase structure before making changes.

What Gets Included

When files are pre-read, the agent receives:

  • The full file path
  • The complete file contents
  • A formatted list of all pre-read files

This information is included in the system prompt, so it's available from the start of every conversation.

Note

Pre-reads are read from your local file system via the CLI server. Make sure the CLI server is running and pointing to the correct project directory.