How to Use Relace Search in Claude
Relace Search finds the code needed to investigate bugs or plan changes. It follows multiple search paths and returns relevant code sections for a coding agent to use.
Prompts to try with Relace Search in Claude
Copy an example into Claude, or ask in your own words.
Use Relace Search to investigate the login failure described above using the code excerpts pasted in this chat. Identify the relevant branches, quote the supporting lines, and list what remains unclear.
Use Relace Search to trace the request flow through the code excerpts in this conversation. Explain where validation ends and processing begins, citing the relevant sections.
Use Relace Search to locate the handling of missing values in the code pasted above. Separate behavior shown in the code from assumptions that need checking.
Use Relace Search to identify which of the supplied code excerpts matter to the proposed pagination change. Explain each selection and leave unrelated sections out.
Use Relace Search to investigate the retry behavior in the code pasted above. Identify the stopping condition and the sections a developer should inspect before changing it.
How to set up Relace Search in Claude
Pick the way that suits you. Each takes about two minutes.
Use the Claude connector
- Add Spiral to Claude
Click Add Spiral in Claude above. Claude opens Add custom connector with Spiral and its URL filled in; check them and click Continue. Without the link: in Claude open Customize › Connectors › Add › Add custom connector and paste this URL:
https://api.spiral.ai/mcp
- Keep the detected sign-in and click Add
Claude finds Spiral's sign-in by itself: leave Sign in now and Use Claude's published identity selected.
- Click Connect
The connector page opens. Connect takes you to Spiral in your browser.
Use the Spiral skill
- Send Claude this message
Your agent reads Spiral's skill and sets itself up.
set up https://spiral.ai/SKILL.md
- Sign in or paste a key
Approve Spiral in the browser, or give the agent a key from the console.
Use the Spiral CLI
- Install and sign in
Installs the Spiral CLI, signs you in and adds its skill to your coding agents.
npx -y spiral-cli@latest init
Call the Spiral API
- Create an API key
In the console, under API keys.
- Run Relace Search
One request; the result comes back by polling or a webhook.
curl https://api.spiral.ai/v1/runs \ -H "Authorization: Bearer $SPIRAL_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "provider": "openrouter", "model": "relace/relace-search", "input": { "messages": [ { "role": "system" } ] } }'
Then paste one of the prompts above: Claude finds Relace Search on Spiral, shows the price and runs it.
Relace Search providers and prices
Spiral runs Relace Search through OpenRouter. Open a card for today's price, with every fee included.
Up to $0.01602 per run at the default inputs. $1.30 per 1M input tokens, $3.90 per 1M output tokens.
Settings you can ask for
Ask Claude for any of these in your prompt.
| Setting | Allowed values | Default | Description |
|---|---|---|---|
| Seed | a whole number | ||
| Top p | 0 to 1 | ||
| Max tokens | 1 to 128000 | The most output tokens to generate. | |
| Temperature | 0 to 2 |
Every API field of Relace: Relace Search is on its tool page: open its card above.
What can you do with Relace Search in Claude?
Turn supplied code context into a focused explanation of a reported behavior. Ask Relace Search to identify relevant sections and distinguish supported findings from questions that need more evidence.
Find a bug's likely entry points
Use Relace Search to locate the code associated with a reported symptom and collect the sections worth investigating first.
Trace authentication behavior
Ask Relace Search to follow authentication checks and identify the code that accepts or rejects a request.
Scope a feature change
Use Relace Search to identify existing behavior and the code a developer should understand before adding a feature.
Investigate an edge case
Ask Relace Search to trace empty inputs, missing values, or boundary conditions and report the relevant branches.
Prepare a refactor
Use Relace Search to follow related code paths and collect the context needed to assess a proposed refactor.
Build an implementation handoff
Ask Relace Search for a focused collection of relevant code sections, with reasons for including each one, before assigning implementation.
More on Relace Search and Claude
Overview
Relace Search in other agents
Questions about Relace Search in Claude
Can Claude use Relace Search?
Yes. Add Spiral to Claude as an MCP server, and Claude can find and run Relace Search like any built-in tool.
How much does Relace Search cost in Claude?
Up to $0.01602 per run at the default inputs. $1.30 per 1M input tokens, $3.90 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Claude plan is separate.
Do I need an OpenRouter account to use Relace Search in Claude?
No. Spiral runs Relace Search on its own OpenRouter account. You sign in to Spiral once and never paste a key.
How long does it take to set up Relace Search in Claude?
About two minutes: add Spiral to Claude, then keep the detected sign-in and click Add, then click Connect.
Does Claude wait while Relace Search runs?
Relace Search runs in the background. Claude starts the run, checks on it and gives you the text, json when it's ready.
What is Relace Search best for?
Finding the code relevant to a bug report, behavior question, or proposed change. It gathers context that a coding agent can use for implementation.
Does Relace Search fix the code it finds?
Its documented role is to investigate and report relevant code. Treat the report as the starting point for implementation and testing.
What does a search result contain?
The documented report identifies relevant files and line ranges. Ask for an explanation of why each section matters to your question.
How much context can Relace Search handle?
The context window is 256,000 tokens, with up to 128,000 completion tokens. For an investigation, ask for the relevant sections and a short explanation.
How should I phrase a code investigation?
Describe the behavior you want to understand, including expected results and edge cases. Ask the model to trace the control flow and explain the evidence behind its findings.
Start using Relace Search in Claude
One Spiral account for every tool your agent needs. No subscription; you pay per run.
Paste this into Claude:
set up https://spiral.ai/SKILL.md


