关于 search-company-knowledge
search-company-knowledge 是面向需要查询内部信息的团队成员的搜索技能,可并行检索 Confluence、Jira 和内部文档,再综合内容并标注来源。它支持跨系统查找,也可针对文档或问题进行定向搜索。
主要功能
- 01并行搜索 Confluence 和 Jira
- 02支持按来源定向搜索
- 03获取页面和问题的详细内容
- 04综合结果并注明来源
适用场景
- 01查找公司系统或流程的内部说明
- 02汇总文档与 Jira 问题中的技术信息
- 03核对不同来源对某项行为的描述
- 04为内部知识查询提供可追溯引用
MCP 相关
该技能使用 Confluence 和 Jira 工具搜索并读取内容,再将结果综合为带来源引用的答复。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ atlassian/ atlassian-mcp-server --skill search-company-knowledge安装后在 Claude Code 中输入/search-company-knowledge确认已加载。
详细介绍
搜索公司知识
关键词
查找信息、搜索公司知识、查阅、是什么、解释、公司文档、内部文档、Confluence 搜索、Jira 搜索、我们的文档、内部知识、知识库、搜索、告诉我关于……的信息、获取……的信息、公司系统、术语、查找关于……的一切、关于……我们知道什么、部署、身份验证、基础设施、流程、规程、如何、如何运作、我们的系统、我们的流程、内部系统、公司流程、技术文档、工程文档、架构、配置、搜索我们的文档、搜索内部文档、在我们的文档中查找
概述
跨多个孤立的公司知识系统(Confluence、Jira、内部文档)进行搜索,从而全面解答有关内部概念、系统和术语的问题。此技能会并行搜索多个来源,并综合结果,同时提供恰当的引用。
**在以下情况下使用此技能:**用户询问有关公司内部知识的问题,这些内容可能记录在 Confluence 页面、Jira 工单或内部文档中。
工作流
按照以下 5 个步骤,提供全面且引用充分的答案:
步骤 1:确定搜索查询
从用户的问题中提取核心搜索词。
示例:
- 用户:“查找关于 Stratus minions 的所有信息” → 搜索:“Stratus minions”
- 用户:“关于计费系统,我们知道些什么?” → 搜索:“计费系统”
- 用户:“解释我们的部署流程” → 搜索:“部署流程”
请考虑:
- 主要主题或概念
- 任何特定系统/组件名称
- 技术术语或行话
步骤 2:并行执行搜索
同时搜索所有可用的知识来源,以全面覆盖相关内容。
选项 A:跨系统搜索(推荐优先使用)
使用 search 工具(Rovo Search)同时搜索 Confluence 和 Jira:
search(
cloudId="...",
query="[extracted search terms]"
)
适用情况:
- 大多数查询的默认方法
- 不确定信息位于哪个系统时
- 从多个来源获取结果的最快方式
**
search是语义搜索——传入自然语言,不要使用查询语法。**在query中使用 CQL 或 JQL 会悄无声息地返回较差的结果,而不会报错。需要按标题或类型等条件进行结构化筛选时,请使用searchConfluence(CQL)或searchJiraIssuesUsingJql(JQL)。
示例:
search(
cloudId="...",
query="Stratus minions"
)
此操作会同时返回 Confluence 页面和 Jira 工单的结果。
选项 B:定向搜索 Confluence
专门搜索 Confluence 时,使用 searchConfluence:
searchConfluence(
cloudId="...",
cql="text ~ 'search terms' OR title ~ 'search terms'"
)
适用情况:
- 用户明确提到“在 Confluence 中”或“在我们的文档中”
- 跨系统搜索返回的 Jira 结果过多
- 查找文档而非工单
CQL 模式示例:
text ~ "Stratus minions"
text ~ "authentication" AND type = page
title ~ "deployment guide"
选项 C:定向搜索 Jira
专门搜索 Jira 时,使用 searchJiraIssuesUsingJql:
searchJiraIssuesUsingJql(
cloudId="...",
jql="text ~ 'search terms' OR summary ~ 'search terms'"
)
适用情况:
- 用户提到“工单”“问题”或“漏洞”
- 查找历史问题或实现细节
- 跨系统搜索返回的结果以文档为主
JQL 模式示例:
text ~ "Stratus minions"
summary ~ "authentication" AND type = Bug
text ~ "deployment" AND created >= -90d
搜索策略
对于大多数查询,请按以下顺序操作:
- 从
search(跨系统搜索)开始——始终先尝试此方法 - 如果结果不明确,继续进行定向搜索
- 如果结果提及特定页面/工单,获取这些内容以了解详情
步骤 3:获取详细内容
确定相关来源后,获取完整内容,以便全面作答。
对于 Confluence 页面
搜索结果引用 Confluence 页面时:
getConfluenceContent(
cloudId="...",
content_id="[page ID from search results]",
content_format="markdown",
detail="full"
)
**返回内容:**Markdown 格式的完整页面内容
获取内容的情况:
- 搜索结果摘要过于简短
- 需要完整上下文
- 页面似乎是主要文档来源
关于 Jira 问题
当搜索结果引用 Jira 问题时:
getJiraIssue(
cloudId="...",
issueIdOrKey="PROJ-123"
)
返回: 完整的问题详情,包括描述和状态。
getJiraIssue 不返回评论正文 —— 它只报告问题有多少条评论。当讨论内容很重要时,请单独获取评论。listJiraIssueComments 不是主要工具,因此需通过 execute 运行它,并使用 startAt/maxResults 分页,直到获取到所需的评论:
executeRead( # or execute(...) if your client exposes a single execute tool
name="listJiraIssueComments",
cloudId="...",
inputs={"issueIdOrKey": "PROJ-123", "maxResults": 50}
)
何时获取:
- 需要理解所报告的 bug 或问题
- 搜索结果未显示完整上下文
- 问题包含重要的实现说明
优先级排序
按以下顺序获取:
- 官方文档页面(标题中包含 "guide"、"documentation"、"overview" 的 Confluence 页面)
- 近期/相关问题(相关且近期的 Jira 工单)
- 补充上下文(初始结果中提到的相关页面)
不要获取所有内容 —— 根据与用户问题的相关性有选择地获取。
步骤 4:综合结果
将来自多个来源的信息整合为连贯的答案。
综合指南
组织你的答案:
-
先给出直接答案
- 以清晰、简洁的答案开头
- "Stratus minions 是……"
-
详细解释
- 提供来自所有来源的全面细节
- 按主题组织,而非按来源组织
-
来源归属
- 注明每条信息的来源
- 格式:"根据 [来源],……"
-
突出差异
- 如果来源冲突,明确说明
- 示例:"Confluence 文档称 X,但 Jira 工单 PROJ-123 表明,由于 bug Y,实际行为是 Z"
-
提供上下文
- 说明信息是否已过时
- 注明某个功能是否已弃用或正在开发中
综合模式
模式 1:多个来源一致
Stratus minions are background worker processes that handle async tasks.
According to the Confluence documentation, they process jobs from the queue and
can be scaled horizontally. This is confirmed by several Jira tickets (PROJ-145,
PROJ-203) which discuss minion configuration and scaling strategies.
模式 2:来源提供不同方面
The billing system has two main components:
**Payment Processing** (from Confluence "Billing Architecture" page)
- Handles credit card transactions
- Integrates with Stripe API
- Runs nightly reconciliation
**Invoice Generation** (from Jira PROJ-189)
- Creates monthly invoices
- Note: Currently has a bug where tax calculation fails for EU customers
- Fix planned for Q1 2024
模式 3:信息冲突
There is conflicting information about the authentication timeout:
- **Official Documentation** (Confluence) states: 30-minute session timeout
- **Implementation Reality** (Jira PROJ-456, filed Oct 2023): Actual timeout is
15 minutes due to load balancer configuration
- **Status:** Engineering team aware, fix planned but no timeline yet
Current behavior: Expect 15-minute timeout despite docs saying 30 minutes.
模式 4:信息不完整
Based on available documentation:
[What we know about deployment process from Confluence and Jira]
However, I couldn't find information about:
- Rollback procedures
- Database migration handling
You may want to check with the DevOps team or search for additional documentation.
步骤 5:提供引用
始终包含来源材料的链接,以便用户进一步探索。
引用格式
对于 Confluence 页面:
**Source:** [Page Title](https://yoursite.atlassian.net/wiki/spaces/SPACE/pages/123456)
对于 Jira 问题:
**Related Tickets:**
- [PROJ-123](https://yoursite.atlassian.net/browse/PROJ-123) - Brief description
- [PROJ-456](https://yoursite.atlassian.net/browse/PROJ-456) - Brief description
完整引用部分:
## Sources
**Confluence Documentation:**
- [Stratus Architecture Guide](https://yoursite.atlassian.net/wiki/spaces/DOCS/pages/12345)
- [Minion Configuration](https://yoursite.atlassian.net/wiki/spaces/DEVOPS/pages/67890)
**Jira Issues:**
- [PROJ-145](https://yoursite.atlassian.net/browse/PROJ-145) - Minion scaling implementation
- [PROJ-203](https://yoursite.atlassian.net/browse/PROJ-203) - Performance optimization
**Additional Resources:**
- [Internal architecture doc link if found]
搜索最佳实践
有效的搜索词
应该:
- ✅ 使用具体的技术术语:"OAuth authentication flow"
- ✅ 包含系统名称:"Stratus minions"
- ✅ 如果缩写常见则使用缩写:"API rate limiting"
- ✅ 如果首次搜索失败则尝试变体:"deploy process" → "deployment pipeline"
不应该:
- ❌ 过于笼统:"how things work"
- ❌ 使用完整句子:改用关键词
- ❌ 包含填充词:"the"、"our"、"about"
搜索结果质量
好的结果:
- 近期文档(不到 1 年)
- 官方/权威页面(标题为 "Guide"、"Documentation"、"Overview")
- 多个来源确认同一信息
- 详细的实现说明
存疑的结果:
- 非常旧的工单(超过 2 年,可能已过时)
- 重复或冲突的信息
- 草稿页面或进行中的文档
- 个人页面(可能非官方)
当结果不佳时:
- 尝试不同的搜索词
- 扩大搜索范围以包含相关概念
- 搜索具体的错误消息或代码
- 向用户询问更多上下文
处理常见场景
场景 1:未找到结果
如果搜索未返回任何结果:
I searched across Confluence and Jira but couldn't find information about "[topic]".
This could mean:
- The concept hasn't been documented yet
- It might be called something else (can you provide alternative names?)
- Documentation might be in a different system I don't have access to
Would you like me to:
1. Try searching with different terms?
2. Search for related concepts?
3. Look for mentions in recent Jira tickets?
场景 2:结果过多
如果搜索返回 50+ 条结果:
- 关注最新且最相关的(前 10-15 条)
- 优先选择官方文档而非随机工单
- 对相似结果进行分组:"我找到了 15 个与认证 bug 相关的工单……"
- 主动提出缩小搜索范围:"您希望我专注于 [特定方面] 吗?"
场景 3:查询含糊
如果用户的问题含糊不清:
I found information about several topics related to "[term]":
1. [Topic A] - from Confluence page X
2. [Topic B] - from Jira tickets Y, Z
3. [Topic C] - from documentation W
Which aspect are you most interested in?
场景 4:信息过时
如果你发现信息已过时:
I found documentation about [topic], but note that it's from [date] and may be outdated.
[Provide the information anyway]
You may want to verify this is still current, especially if it's from more than
a year ago.
场景 5:受限/私有内容
如果搜索结果包含无法访问的内容:
Search results mention [topic] in the following locations, but I don't have
access to view the full content:
- Confluence page: [title] (Space: [SPACE])
- Jira issue: PROJ-123
You may need to access these directly or check your permissions.
示例
示例 1:有明确的文档
用户:“Stratus minions 是什么?”
流程:
- 搜索:
search(cloudId="...", query="Stratus minions") - 查找:Confluence 页面“Stratus Architecture”以及 3 个 Jira 工单
- 获取:获取完整的 Confluence 页面内容
- 综合:将架构概览与工单中的实现细节结合起来
- 引用:提供所有来源的链接
回答:
Stratus minions are background worker processes that handle asynchronous task
processing in the Stratus system.
**Key Characteristics:**
- Run independently from web servers
- Process jobs from a Redis queue
- Can be scaled horizontally for increased throughput
- Handle tasks like email sending, report generation, and data processing
**Architecture:**
According to the Stratus Architecture documentation, minions follow a
worker-queue pattern where:
1. Web application enqueues tasks
2. Minions poll the queue for work
3. Tasks are processed asynchronously
4. Results are stored in the database
**Implementation Notes:**
From Jira ticket PROJ-203, the current deployment runs 5 minion instances,
with plans to scale to 10 for handling increased load.
## Sources
- [Stratus Architecture Guide](link)
- [PROJ-203](link) - Minion scaling implementation
示例 2:信息存在冲突
用户:“我们的会话超时时长是多少?”
流程:
- 搜索 Confluence 和 Jira
- 查找:文档称为 30 分钟,但工单报告的实际超时时长为 15 分钟
- 获取两个来源,以了解完整背景
- 明确指出差异
回答:
There is a discrepancy between documented and actual behavior:
**Official Documentation** (Security Guidelines):
Session timeout is configured for 30 minutes of inactivity.
**Actual Behavior** (PROJ-456, reported Oct 2023):
Users are being logged out after 15 minutes due to a load balancer configuration
that overrides the application setting.
**Current Status:**
The engineering team is aware of this issue. The load balancer timeout needs to
be adjusted to match the application setting. No fix timeline has been set.
**Recommendation:** Plan for 15-minute timeout until this is resolved.
## Sources
- [Security Guidelines](link) - Official documentation
- [PROJ-456](link) - Timeout discrepancy bug report
示例 3:信息不完整
用户:“说明我们的部署流程”
流程:
- 搜索到一些信息,但并不完整
- 综合现有信息
- 指出文档中的缺漏
回答:
Based on available documentation, here's what I found about the deployment process:
**Build Phase** (from Confluence "CI/CD Guide"):
1. Code pushed to main branch triggers GitHub Actions
2. Automated tests run (unit, integration)
3. Docker image built and pushed to registry
**Deployment Phase** (from Jira PROJ-789):
4. Staging deployment happens automatically
5. Manual approval required for production
6. Blue-green deployment strategy used
**Gaps in Documentation:**
I couldn't find documented information about:
- Rollback procedures
- Database migration handling
- Post-deployment verification steps
These details may exist in tribal knowledge or need to be documented.
## Sources
- [CI/CD Guide](link)
- [PROJ-789](link) - Deployment pipeline implementation
Would you like me to search for more specific aspects of deployment?
高质量回答的技巧
应做:
✅ 回答前始终先搜索(不要依赖一般知识) ✅ 引用所有来源并附上链接 ✅ 明确指出差异 ✅ 说明信息是否过时 ✅ 提供背景信息和示例 ✅ 使用标题清晰地组织回答 ✅ 链接到相关文档
不应做:
❌ 假设一般知识适用于这家公司 ❌ 搜索无结果时编造信息 ❌ 忽略相互冲突的信息 ❌ 引用整篇文档(应进行总结) ❌ 提供过多来源,造成信息过载(精选最重要的 5-10 个) ❌ 摘要不够时忘记获取详细信息
何时不应使用此技能
此技能仅适用于公司内部知识。请勿用于:
❌ 一般技术问题(使用训练所得知识) ❌ 外部文档(使用 web_search) ❌ 与特定公司无关的问题 ❌ 关于其他公司的问题 ❌ 时事或新闻
以下示例不应使用此技能:
- “什么是机器学习?”(一般知识)
- “React 如何运作?”(外部文档)
- “天气怎么样?”(不属于知识搜索)
- “找一家餐厅”(与工作无关)
快速参考
主要工具: search(cloudId, query) - 始终首先使用
后续工具:
getConfluenceContent(cloudId, content_id, content_format, detail="full")- 获取完整页面内容getJiraIssue(cloudId, issueIdOrKey)- 获取完整工单详情searchConfluence(cloudId, cql)- 定向搜索 ConfluencesearchJiraIssuesUsingJql(cloudId, jql)- 定向搜索 Jira
回答结构:
- 直接回答
- 详细说明
- 来源归属
- 差异(如有)
- 带链接的引用
请记住:
- 并行搜索优于顺序搜索
- 综合信息,而不只是罗列
- 始终引用来源
- 明确指出冲突
- 清楚说明文档中的缺漏