/glean-pack:glean-install-authfrom glean-pack
Installs and configures Glean API authentication with indexing and client tokens for enterprise search. Covers datasource indexing, search API access, and SDK initialization.
Ships in glean-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Configure Glean API authentication for enterprise search and knowledge management. Glean has two APIs: the Indexing API (push content into search) and the Client API (search and retrieve). Each uses separate tokens. Base URL: https://<domain>-be.glean.com/api.
company-be.glean.com)Navigate to Glean Admin Console > Settings > API:
| Token Type | Purpose | Required Header |
|---|---|---|
| Indexing API token | Push documents into search index | Authorization: Bearer <token> |
| Client API token | Search, chat, user-scoped queries | Authorization: Bearer <token> + X-Glean-Auth-Type: BEARER |
# .env (NEVER commit)
GLEAN_DOMAIN=company-be.glean.com
GLEAN_INDEXING_TOKEN=glean_idx_...
GLEAN_CLIENT_TOKEN=glean_cli_...
GLEAN_DATASOURCE=custom_app # Your custom datasource name
npm install @anthropic-ai/glean-indexing-api-client # Or use fetch directly
const GLEAN_BASE = `https://${process.env.GLEAN_DOMAIN}/api`;
// Verify indexing API access
async function verifyIndexingAccess() {
const res = await fetch(`${GLEAN_BASE}/index/v1/getdatasourceconfig`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.GLEAN_INDEXING_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ datasource: process.env.GLEAN_DATASOURCE }),
});
const config = await res.json();
console.log(`Connected. Datasource: ${config.name}`);
}
// Verify client API access
async function verifySearchAccess() {
const res = await fetch(`${GLEAN_BASE}/client/v1/search`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.GLEAN_CLIENT_TOKEN}`,
'X-Glean-Auth-Type': 'BEARER',
'Content-Type': 'application/json',
},
body: JSON.stringify({ query: 'test', pageSize: 1 }),
});
const results = await res.json();
console.log(`Search works. Found ${results.results?.length ?? 0} results.`);
}
| Error | Code | Cause | Solution |
|---|---|---|---|
Unauthorized | 401 | Invalid token | Regenerate in Admin > API Tokens |
Forbidden | 403 | Token lacks scope | Use correct token type (indexing vs client) |
Not Found | 404 | Wrong domain | Verify GLEAN_DOMAIN includes -be suffix |
After auth, proceed to glean-hello-world for your first index and search.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub flight505/skill-forge --plugin glean-pack24 skills in this plugin
/glean-ci-integrationCI/CD for Glean connectors with automated indexing tests and search quality validation.
Trigger: "glean CI", "glean GitHub Actions", "glean connector CI/CD".
/glean-common-errorsDiagnose and fix common Glean API errors including indexing failures, search issues, and permission problems.
Trigger: "glean error", "glean not indexing", "glean search empty", "debug glean".
/glean-core-workflow-aExecute Glean primary workflow: search, chat, and AI-powered answers across enterprise data.
Use when building search integrations, implementing Glean chat, or creating AI assistants.
Trigger: "glean search API", "glean chat", "glean AI answers", "enterprise search".
Other plugins' skills for the same job