更好的收集
Skill+Agent用于精确的Glean MCP搜索。
您的Glean MCP服务器有12个搜索参数。大多数AI代理使用一种: query这意味着每次内部搜索都会返回16个通用结果,而它可以准确地返回您需要的结果。
better-glean/
├── SKILL.md # Query patterns reference (install this)
├── agents/
│ └── glean-researcher.md # Autonomous research agent
├── examples/
│ └── queries.md # Tested query cookbook
├── .agentskills.json # Skill metadata & compatibility
├── CHANGELOG.md
├── CONTRIBUTING.md
└── LICENSE之前和之后
# Before: generic search
search(query="deployment automation")
# → 16 mixed results from Slack, Confluence, Jira, GitHub...
# After: targeted Slack search
search(query="migration", app="slack", updated="past_week")
# → This week's Slack discussions about the migration
# After: everything you authored recently
search(query="*", owner="me", sort_by_recency=true)
# → Your recent documents across all sources两种使用方法
1.技能(参考模式)
安装 SKILL.md 你的代理学习12个查询模式、40多个应用程序源、反模式和多角度搜索策略。当需要搜索Glean时,它会读取文件。
2.代理人(自主研究员)
安装 agents/glean-researcher.md 然后让一个子代理回答一个问题,计划2-3个搜索角度,执行这些搜索角度,并跟进顶部结果 read_document,并返回带有源的合成答案。
You: "What's the current state of the GCP tenant migration?"
Agent:
→ search(query="GCP tenant migration", app="confluence") → 4 docs
→ search(query="GCP tenant", app="slack", updated="past_week") → 7 threads
→ read_document(urls=["https://confluence.../GCP+Migration+Plan"])
→ Returns: structured answer + sources + gaps identified安装
仅技能(克劳德代码)
# Plugin Marketplace (recommended)
claude plugin marketplace add https://github.com/alanxurox/better-glean.git
claude plugin install better-glean@better-glean
# Or one-line clone (auto-discovered)
git clone https://github.com/alanxurox/better-glean.git ~/.claude/skills/glean-search仅技能(其他代理人)
# OpenSkills (any agent)
npx openskills install https://github.com/alanxurox/better-glean.git
# Cursor
git clone https://github.com/alanxurox/better-glean.git ~/.cursor/skills/glean-search
# Manual — copy SKILL.md anywhere your agent can read it代理人(克劳德代码)
# Copy the agent definition to your agents directory
cp agents/glean-researcher.md ~/.claude/agents/
# Then use it via Task tool:
# Task(subagent_type="glean-researcher", prompt="What's the state of the GCP migration?")GenDigital内部
git clone https://git.int.avast.com/Alan-Xu/better-glean.git ~/.claude/skills/glean-search添加到CLAUDE.md(可选)
## Glean Search
When searching internal docs, load `~/.claude/skills/glean-search/SKILL.md` for precise query patterns.
For autonomous research, use the `glean-researcher` agent.查询模式
| 模式 | 关键参数 |
|---|---|
| 某人最近的工作 | from, sort_by_recency |
| 轻松的讨论 | app="slack", channel |
| Slack DM | app="slack", type="direct message" |
| Jira门票 | app="jira" |
| 汇流文档 | app="confluence", owner |
| PR/代码审查 | app="githubenterprise", type="pull" |
| 最近的更改 | updated="past_week" |
| 日期范围 | after, before |
| 演示文稿 | type="slides" |
| 团队工作 | from="myteam" |
| 详尽的清单 | exhaustive=true |
| 分面精致 | dynamic_search_result_filters |
看 examples/queries.md 一本经过全面测试的烹饪书。
关键概念
from 对比 owner: from =由(广泛)更新、评论或创建。 owner =由(狭义)创建。使用 owner="me" 对于“我的PR”, from="me" 对于“我接触过的公关”
sort_by_recency:仅当用户的主要意图是“最新”或“最近”时使用。默认相关性排名更适合主题搜索。
**query="*" 通配符**:适用于“与这些筛选器匹配的所有文档”。始终与至少一个筛选器结合使用。
速率限制:Glean执行费率限制。批量筛选到更少的查询、缓存URL和首选项 search 结束 chat 为了降低成本。请参阅SKILL.md中的“速率限制”部分。
为什么存在
Glean MCP功能强大,但对AI代理的使用记录不足。MCP服务器指令告诉代理参数存在,但不进行教导 *当* 使用每一个。代理默认为简单 query 字符串和漏源过滤、人员范围、时间过滤、类型过滤、分面细化和多角度策略。
这项技能弥补了这一差距。代理更进一步——自主研究,无需手动制作查询。
格式
跟随 代理技能 开放标准——用专业知识扩展AI代理的便携式格式。
兼容: Claude Code、Cursor、Windsurf、Cline以及任何支持代理技能或自定义代理定义的代理。
贡献
找到了一个运行良好的查询模式?打开PR。请参阅 贡献.md 作为指导方针。
