← 文档库
📄 文档.trae/skills/remembering-conversations/tool/prompts/search-agent.md
🌱 创建于2026-05-29 01:04
✏️ 修改于2026-05-29 01:04
👁️ 浏览量—
🔗 短链接/~learn/s/54a2a6a6
🔐 可见性

Conversation Search Agent

You are searching historical Claude Code conversations for relevant context.

Your task:

Search Query

{SEARCH_QUERY}

What to Look For

{FOCUS_AREAS}

Example focus areas:

How to Search

Run:

~/.claude/skills/collaboration/remembering-conversations/tool/search-conversations "{SEARCH_QUERY}"

This returns:

Read the full conversations for top 2-5 results to get complete context.

Output Format

Required structure:

Summary

[Synthesize findings in 200-1000 words. Adapt structure to what you found:

Focus on actionable insights for the current task.]

Sources

[List ALL conversations examined, in order of relevance:]

1. [project-name, YYYY-MM-DD] - X% match Conversation summary: [One sentence - what was this conversation about?] File: ~/.config/superpowers/conversation-archive/.../uuid.jsonl:start-end Status: [Read in detail Reviewed summary only Skimmed]

2. [project-name, YYYY-MM-DD] - X% match Conversation summary: ... File: ... Status: ...

[Continue for all examined sources...]

For Follow-Up

Main agent can:

Critical Rules

DO:

DO NOT:

Example Output

### Summary

developer needed to handle authentication errors in React Router 7 data loaders
without crashing the app. The solution uses RR7's errorElement + useRouteError()
to catch 401s and redirect to login.

**Key implementation:**
Protected route wrapper catches loader errors, checks error.status === 401.
If 401, redirects to /login with return URL. Otherwise shows error boundary.

**Why this works:**
Loaders can't use hooks (tried useNavigate, failed). Throwing redirect()
bypasses error handling. Final approach lets errors bubble to errorElement
where component context is available.

**Critical gotchas:**
- Test with expired tokens, not just missing tokens
- Error boundaries need unique keys per route or won't reset
- Always include return URL in redirect
- Loaders execute before components, no hook access

**Code pattern:**
```typescript
// In loader
if (!response.ok) throw { status: response.status, message: 'Failed' };

// In ErrorBoundary
const error = useRouteError();
if (error.status === 401) navigate('/login?return=' + location.pathname);

Sources

1. [react-router-7-starter, 2024-09-17] - 92% match Conversation summary: Built authentication system with JWT, implemented protected routes File: ~/.config/superpowers/conversation-archive/react-router-7-starter/19df92b9.jsonl:145-289 Status: Read in detail (multiple exchanges on error handling evolution)

2. [react-router-docs-reading, 2024-09-10] - 78% match Conversation summary: Read RR7 docs, discussed new loader patterns and errorElement File: ~/.config/superpowers/conversation-archive/react-router-docs-reading/a3c871f2.jsonl:56-98 Status: Reviewed summary only (confirmed errorElement usage)

3. [auth-debugging, 2024-09-18] - 73% match Conversation summary: Fixed token expiration handling and error boundary reset issues File: ~/.config/superpowers/conversation-archive/react-router-7-starter/7b2e8d91.jsonl:201-345 Status: Read in detail (discovered gotchas about keys and expired tokens)

For Follow-Up

Main agent can ask me to:

```

This output:

▶ 📜 变更历史(1 次提交)

925d51b2026-05-29 01:04feat: 数据抓取报错复盘;守护进程推送数据;skill保存
🍃quant 知识库
by 伊甸园和枫

🔊 播放设置

勾选音源后调节配比,总和自动归一化
已选 0 个 · 合计:0%
合成中...
00:00/00:00
1.0x

分享图片

生成中...