From glean-pack
Implements Glean Client API for enterprise search with filters/facets, AI chat answers with citations, and autocomplete. For building search integrations and AI assistants.
How this skill is triggered — by the user, by Claude, or both
Slash command
/glean-pack:glean-core-workflow-aThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build search and chat experiences using the Glean Client API. Covers full-text search with filters, AI-powered chat answers, and autocomplete suggestions.
Build search and chat experiences using the Glean Client API. Covers full-text search with filters, AI-powered chat answers, and autocomplete suggestions.
const results = await fetch(`${GLEAN}/client/v1/search`, {
method: 'POST', headers: searchHeaders,
body: JSON.stringify({
query: 'kubernetes deployment best practices',
pageSize: 20,
requestOptions: {
datasourceFilter: 'confluence,github',
facetFilters: [{ fieldName: 'author', values: ['engineering-team'] }],
},
}),
}).then(r => r.json());
results.results?.forEach((r: any) => {
console.log(`[${r.datasource}] ${r.title}`);
console.log(` ${r.snippets?.[0]?.snippet ?? ''}`);
});
const chatResponse = await fetch(`${GLEAN}/client/v1/chat`, {
method: 'POST', headers: searchHeaders,
body: JSON.stringify({
messages: [{ role: 'USER', content: 'What is our deployment process for production?' }],
applicationId: 'my-app',
}),
}).then(r => r.json());
console.log('Answer:', chatResponse.messages?.[0]?.content);
console.log('Sources:', chatResponse.citations?.map((c: any) => c.title).join(', '));
const suggestions = await fetch(`${GLEAN}/client/v1/autocomplete`, {
method: 'POST', headers: searchHeaders,
body: JSON.stringify({ query: 'deploy', datasourceFilter: 'confluence' }),
}).then(r => r.json());
suggestions.results?.forEach((s: any) => console.log(` ${s.text}`));
| Error | Cause | Solution |
|---|---|---|
| Empty results | Query too specific or datasource not indexed | Broaden query, check datasource status |
| Chat returns no citations | Content not indexed for chat | Verify documents have body text |
| 403 on search | User permissions | Ensure token has search scope |
For bulk indexing workflow, see glean-core-workflow-b.
npx claudepluginhub jeremylongshore/claude-code-plugins-plus-skills --plugin glean-packIndexes documents into Glean custom datasources via Indexing API and searches using Client API. For building connectors, testing search quality, or learning patterns.
Decomposes natural language questions into type-specific sub-queries for multi-source search (chat, docs, trackers), translates to source syntax, ranks relevance, handles ambiguity.