shareful-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseShareful Search
Shareful 搜索
This skill helps discover and apply existing coding solutions from shareful.ai.
该技能可帮助你从shareful.ai发现并应用已有的编码解决方案。
When to Use This Skill
何时使用该技能
Use this skill when the user:
- Asks "has anyone solved this" or "is there a known fix for X"
- Wants to search for existing solutions before deep debugging
- Has an error message and wants likely fixes quickly
- Needs a workaround for a framework/library gotcha
- Wants proven patterns from real examples
当用户:
- 询问“有没有人解决过这个问题”或“有没有针对X的已知修复方案”
- 希望在深入调试前搜索已有的解决方案
- 遇到错误信息,希望快速找到可能的修复方法
- 需要针对框架/库的疑难问题寻找替代解决方法
- 希望从真实案例中获取经过验证的解决方案模式
What is Shareful CLI Search?
什么是Shareful CLI搜索?
npx shareful-ai searchKey commands:
- - Search by keywords
npx shareful-ai search [query] - - Filter by solution type
npx shareful-ai search [query] --type fix - - Filter by tags
npx shareful-ai search [query] --tags "tag1,tag2" - - Return more results
npx shareful-ai search [query] --limit 10 - - Report a share worked
npx shareful-ai confirm <owner/repo/slug> - - Report it didn't work
npx shareful-ai confirm <owner/repo/slug> --failed
Browse shares at: https://shareful.ai/
npx shareful-ai search核心命令:
- - 按关键词搜索
npx shareful-ai search [查询关键词] - - 按解决方案类型过滤
npx shareful-ai search [查询关键词] --type fix - - 按标签过滤
npx shareful-ai search [查询关键词] --tags "tag1,tag2" - - 返回更多结果
npx shareful-ai search [查询关键词] --limit 10 - - 报告该共享方案有效
npx shareful-ai confirm <owner/repo/slug> - - 报告该共享方案无效
npx shareful-ai confirm <owner/repo/slug> --failed
浏览共享方案: https://shareful.ai/
How to Help Users Find Shares
如何帮助用户找到共享方案
Step 1: Understand What They Need
步骤1:明确用户需求
When a user asks for help, identify:
- The technology stack (framework, language, key libraries)
- The specific issue (error string, symptom, or behavior)
- The likely share type (,
fix,workaround,pattern,reference)config
当用户寻求帮助时,需明确以下几点:
- 技术栈(框架、编程语言、核心库)
- 具体问题(错误字符串、症状或异常行为)
- 可能的共享方案类型(修复方案、
fix替代方法、workaround解决方案模式、pattern参考示例、reference配置示例)config
Step 2: Search for Shares
步骤2:搜索共享方案
Run search with a focused query:
bash
npx shareful-ai search [query]Examples:
- User asks "how do I fix hydration mismatch?" ->
npx shareful-ai search nextjs hydration mismatch - User asks "known Prisma N+1 fix?" ->
npx shareful-ai search prisma n-plus-one --type fix - User asks "React stale closure issue" ->
npx shareful-ai search react stale closure --tags "react,hooks"
使用精准的查询语句执行搜索:
bash
npx shareful-ai search [query]示例:
- 用户询问“如何修复hydration不匹配问题?” →
npx shareful-ai search nextjs hydration mismatch - 用户询问“有没有已知的Prisma N+1问题修复方案?” →
npx shareful-ai search prisma n-plus-one --type fix - 用户询问“React闭包过时问题” →
npx shareful-ai search react stale closure --tags "react,hooks"
Step 3: Present Options to the User
步骤3:向用户展示候选方案
When you find relevant shares, present:
- Share title and solution type
- Why it matches the user issue
- Link to the share URL
Example response:
text
I found a likely match: "Fix Next.js hydration error with dynamic imports" [fix, verified].
It matches your symptom (server/client mismatch around browser-only APIs).
Share: https://shareful.ai/s/owner/repo/fix-nextjs-hydration-dynamic-imports找到相关共享方案后,需向用户展示以下内容:
- 共享方案标题及方案类型
- 该方案与用户问题的匹配原因
- 共享方案的链接地址
回复示例:
text
我找到了一个匹配度较高的方案:“使用动态导入修复Next.js hydration错误” [fix, 已验证]。
该方案与你的问题症状匹配(仅浏览器端API导致的服务端/客户端不匹配问题)。
共享方案链接:https://shareful.ai/s/owner/repo/fix-nextjs-hydration-dynamic-importsStep 4: Apply and Confirm
步骤4:应用方案并反馈结果
If the user wants to proceed:
- Apply the fix in their codebase
- Verify the original issue is resolved
- If fixed, confirm the share worked:
bash
npx shareful-ai confirm owner/repo/slug - If it didn't work, report failure and try the next result:
bash
npx shareful-ai confirm owner/repo/slug --failed
如果用户决定使用该方案:
- 在代码库中应用该修复方案
- 验证原问题是否已解决
- 若问题解决,反馈该方案有效:
bash
npx shareful-ai confirm owner/repo/slug - 若方案无效,反馈失败并尝试下一个结果:
bash
npx shareful-ai confirm owner/repo/slug --failed
Common Search Categories
常见搜索分类
| Category | Example Queries |
|---|---|
| React/Next.js | hydration, server-components, suspense, ssr |
| Data/DB | prisma, postgres, query, migration, n-plus-one |
| TypeScript | generics, module-augmentation, satisfies, inference |
| Build/Deploy | docker, cache, ci, github-actions, vercel |
| Configuration | eslint, tsconfig, env-vars, runtime |
| 分类 | 示例查询词 |
|---|---|
| React/Next.js | hydration、server-components、suspense、ssr |
| 数据/数据库 | prisma、postgres、query、migration、n-plus-one |
| TypeScript | generics、module-augmentation、satisfies、inference |
| 构建/部署 | docker、cache、ci、github-actions、vercel |
| 配置 | eslint、tsconfig、env-vars、runtime |
Tips for Effective Searches
高效搜索技巧
- Use specific keywords: is better than
nextjs hydration mismatchnextjs error - Include error fragments: Copy a unique part of the error text
- Try alternate terms: ,
n+1,n-plus-onerelation loading - Use filters: Narrow with and
--typewhen result sets are broad--tags
- 使用精准关键词:比
nextjs hydration mismatch的搜索效果更好nextjs error - 包含错误片段:复制错误信息中独特的部分作为查询词
- 尝试替代术语:比如、
n+1、n-plus-onerelation loading - 使用筛选器:当结果范围过宽时,使用和
--type参数缩小范围--tags
When No Shares Are Found
未找到匹配的共享方案时
If no relevant shares exist:
- Acknowledge no match was found
- Continue with direct debugging
- Suggest creating a new share via
shareful-create
Example response:
text
I searched for matching shares but didn’t find a reliable result.
I can debug this directly and still get you unstuck.
If we solve it, we can capture it with the `shareful-create` workflow so future searches find it.若未找到相关共享方案:
- 告知用户未找到匹配方案
- 继续直接调试问题
- 建议通过命令创建新的共享方案
shareful-create
回复示例:
text
我搜索了匹配的共享方案,但未找到可靠结果。
我可以直接帮你调试问题,帮你解决困境。
如果我们解决了这个问题,可以通过`shareful-create`流程将方案保存为共享内容,方便后续搜索时能被找到。Related Skills
相关技能
- for drafting a new SHARE.md after solving a new issue
shareful-create
- :解决新问题后,用于起草新的SHARE.md文档
shareful-create