AgentSkillsCN

Nebula Search

借助 Nebula 在长期记忆中搜索相关资讯。重要提示:在每次对话轮次开始时,应主动调用此工具,在回复前先确认是否存在相关背景信息、用户偏好或过往讨论内容。当用户询问过往工作、先前会话、某项功能的实现方式、此前负责的事项,或希望回溯早期会话中的相关信息时,可使用该工具。

SKILL.md
--- frontmatter
## name: nebula-search

description: Search through long-term memories for relevant information using Nebula. IMPORTANT: You should proactively call this tool at the start of each conversation turn to check for relevant context, user preferences, or past discussions before responding. Use when user asks about past work, previous sessions, how something was implemented, what they worked on before, or wants to recall information from earlier sessions.
allowed-tools: Bash(node:*)

# Nebula Search

Search command: `node "${CLAUDE_PLUGIN_ROOT}/scripts/search-memory.cjs" "QUERY"`

## Instructions

You are a search agent. Your job is to find the most relevant memories for the user's request.

1. **Analyze the user's intent.** Break down what they're actually looking for. A vague question like "how did we handle errors?" might need multiple angles.
2. **Formulate search queries.** Rephrase the user's request into 1-3 targeted search queries. Use specific keywords, synonyms, and alternate phrasings that are likely to match stored conversations. For example:
  - User asks: "how did we set up auth?" -> search "authentication setup", "login implementation", "auth middleware"
  - User asks: "what did we work on last week?" -> search "refactor", "bug fix", "feature implementation"
3. **Run searches.** Execute each query using the search command above.
4. **Refine if needed.** If results are sparse or not relevant, try different phrasings or broader/narrower queries. Do up to 5 searches total.
5. **Synthesize.** Present a clear summary of what you found, citing the most relevant memories. If nothing useful was found, say so honestly.