Skip to content
Back to skills

Glean Core Workflow A

ASecurity

'Execute Glean primary workflow: search, chat, and AI-powered answers

  • 2,688 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 29, 2026
ai-agentstypescriptbashkubernetesgitapi

Works with

  • claude code
  • cli
  • api

Security analysis

A100/100

Scanned May 29, 2026

npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill glean-core-workflow-a --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Glean Core Workflow A?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Glean Core Workflow A
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jeremylongshore-glean-core-workflow-a/badge)](https://www.skillsdirectory.com/skills/jeremylongshore-glean-core-workflow-a)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: glean-core-workflow-a
description: 'Execute 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".

  '
allowed-tools: Read, Write, Edit, Bash(npm:*), Bash(curl:*), Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags:
- saas
- enterprise-search
- glean
compatibility: Designed for Claude Code
---
# Glean Core Workflow A: Search & Chat

## Overview

Build search and chat experiences using the Glean Client API. Covers full-text search with filters, AI-powered chat answers, and autocomplete suggestions.

## Instructions

### Step 1: Search with Filters and Facets

```typescript
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 ?? ''}`);
});
```

### Step 2: AI Chat (Glean Assistant)

```typescript
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(', '));
```

### Step 3: Autocomplete / Suggestions

```typescript
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 Handling

| 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 |

## Resources

- [Search API](https://developers.glean.com/api/client-api/search/search)
- [Chat API](https://developers.glean.com/api/client-api/search/overview)

## Next Steps

For bulk indexing workflow, see `glean-core-workflow-b`.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.