using-perplexity-for-context by designnotdrum/brain-jar
npx skills add https://github.com/designnotdrum/brain-jar --skill using-perplexity-for-context重要提示:在使用 perplexity 工具之前,请确保 MCP 服务器已构建并配置好:
# 检查是否已构建
ls ~/.claude/plugins/cache/brain-jar/perplexity-search/*/dist/index.js 2>/dev/null || echo "NOT_BUILT"
如果显示 NOT_BUILT,请运行设置:
node ~/.claude/plugins/cache/brain-jar/perplexity-search/*/run.js &
sleep 10
然后检查 API 密钥配置:
cat ~/.claude/perplexity-search/config.json 2>/dev/null || echo "NOT_CONFIGURED"
如果显示 NOT_CONFIGURED,请创建配置(首先询问用户获取他们的 Perplexity API 密钥):
mkdir -p ~/.claude/perplexity-search
echo '{"apiKey": "USER_API_KEY_HERE", "defaultMaxResults": 5}' > ~/.claude/perplexity-search/config.json
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
设置完成后,用户必须重启 Claude Code 以使 MCP 注册生效。
在以下情况下自动调用 perplexity_search 工具:
当满足任何触发条件时:
perplexity_search 工具除非用户明确要求,否则不要宣布使用情况。
为了获得更好的令牌效率,可以派遣一个 Haiku 子代理来执行搜索:
使用 Task 工具:
按此格式返回结果:
TL;DR: [1-2 句关键发现的摘要]
完整结果: [包含所有引用的完整 Perplexity 响应]
保留完整响应 - 不要过度总结。TL;DR 用于快速浏览,但完整的上下文对于偶然发现很有价值。"
为什么使用子代理:
何时跳过子代理:
示例输出:
**TL;DR:** React Server Components 在服务器上渲染并将 HTML 流式传输到客户端,
减少了包大小并改善了初始加载时间。
**完整结果:**
React Server Components (RSC) 是构建 React 应用程序的新范式...
[包含引用的完整 Perplexity 响应]
用户:"在 React 中处理状态的最佳方式是什么?"
[触发:偏好依赖的选择]
[调用:使用用户档案丰富查询的 perplexity_search]
[档案上下文:"我偏好 TypeScript,正在学习 React,从事 B2B SaaS 应用开发"]
[结果:基于用户上下文的个性化推荐]
[响应:整合了引用的答案]
该工具会自动:
~/.config/brain-jar/user-profile.json 加载用户档案(与 shared-memory 插件共享)注意:该档案现在在所有 brain-jar 插件之间共享。使用 shared-memory 插件的 learning-about-you 技能进行全面的档案管理和新用户引导。
每周安装数
1
代码仓库
GitHub 星标数
2
首次出现
今天
安全审计
安装于
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
IMPORTANT : Before using perplexity tools, ensure the MCP server is built and configured:
# Check if built
ls ~/.claude/plugins/cache/brain-jar/perplexity-search/*/dist/index.js 2>/dev/null || echo "NOT_BUILT"
If NOT_BUILT, run the setup:
node ~/.claude/plugins/cache/brain-jar/perplexity-search/*/run.js &
sleep 10
Then check for API key config:
cat ~/.claude/perplexity-search/config.json 2>/dev/null || echo "NOT_CONFIGURED"
If NOT_CONFIGURED, create the config (ask user for their Perplexity API key first):
mkdir -p ~/.claude/perplexity-search
echo '{"apiKey": "USER_API_KEY_HERE", "defaultMaxResults": 5}' > ~/.claude/perplexity-search/config.json
After setup, user must restart Claude Code for MCP to register.
Automatically invoke the perplexity_search tool in these situations:
When any trigger condition is met:
perplexity_search tool with the queryDo NOT announce usage unless user explicitly asks.
For better token efficiency, dispatch a Haiku subagent to run the search:
Use Task tool:
Return results in this format:
TL;DR: [1-2 sentence summary of the key finding]
Full Results: [Complete Perplexity response with all citations]
Keep the full response - don't over-summarize. The TL;DR is for quick scanning, but the full context is valuable for serendipitous discoveries."
Why use subagent:
When to skip subagent:
Example output:
**TL;DR:** React Server Components render on the server and stream HTML to the client,
reducing bundle size and improving initial load time.
**Full Results:**
React Server Components (RSC) are a new paradigm for building React applications...
[full Perplexity response with citations]
User: "What's the best way to handle state in React?"
[Trigger: Preference-dependent choice]
[Invoke: perplexity_search with query enriched by user profile]
[Profile context: "I prefer TypeScript, I'm learning React, I work on B2B SaaS apps"]
[Results: Personalized recommendations based on user's context]
[Response: Integrated answer with citations]
The tool automatically:
~/.config/brain-jar/user-profile.json (shared with shared-memory plugin)Note : The profile is now shared across all brain-jar plugins. Use the shared-memory plugin's learning-about-you skill for comprehensive profile management and onboarding.
Weekly Installs
1
Repository
GitHub Stars
2
First Seen
Today
Security Audits
Gen Agent Trust HubWarnSocketPassSnykFail
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
111,800 周安装
前端动画设计指南:提升用户体验的微交互与动效策略
38,600 周安装
跨平台设计适配指南:移动端、桌面端、平板、打印及邮件适配策略与实施方法
38,800 周安装
前端打磨(Polish)终极指南:提升产品细节与用户体验的系统化检查清单
39,900 周安装
Web应用测试指南:使用Python Playwright自动化测试本地Web应用
39,500 周安装
Azure Cloud Migrate:AWS Lambda到Azure Functions迁移工具 - 微软官方评估与代码迁移
38,700 周安装
Excel财务建模规范与xlsx文件处理指南:专业格式、零错误公式与数据分析
42,900 周安装