Agent skill

Glean Reference Architecture

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Enterprise architecture: Source Systems to Connectors (Cloud Run/Lambda, event-driven or scheduled) to Glean Indexing API to Glean Search Index to Client API (Search + Chat) to Your Apps (Slack bot…

MITAuto-check passedBackend & APIs

Install Glean Reference Architecture

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill glean-reference-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace glean-reference-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/glean-reference-architecture .claude/skills/glean-reference-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
glean-reference-architecture
GitHub stars
2.8k
Token cost
~1.9k tokens
SKILL.md length
420 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Enterprise architecture: Source Systems to Connectors (Cloud Run/Lambda, event-driven or scheduled) to Glean Indexing API to Glean Search Index to Client API (Search + Chat) to Your Apps (Slack bot…

  • Works in 5 steps: Draw the source-to-index boundary and… → Start with a synthetic source and… → Make indexing idempotent, bound queues… → …
  • Tasks that involve Event-driven systems
  • SKILL.md covers Overview, Architecture Diagram, Service Layer and Caching Strategy, plus 10 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Glean Reference Architecture is an agent skill from jeremylongshore/tons-of-skills-marketplace. Enterprise architecture: Source Systems to Connectors (Cloud Run/Lambda, event-driven or scheduled) to Glean Indexing API to Glean Search Index to Client API (Search + Chat) to Your Apps (Slack bot, portal, internal tools). Trigger: "glean reference architecture", "reference-architecture".

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Designed for Claude Code

It sits in Backend & APIs, covering Event-driven systems and Chatbots and conversational support. It works with Slack and Cloud Run. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Tasks that involve Event-driven systems
  • Tasks that involve Chatbots and conversational support

Example prompts

  • “glean reference architecture”
  • “reference-architecture”
  • “/glean-reference-architecture”

Requirements

  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(npm:*), Bash(curl:*), Grep

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Draw the source-to-index boundary and assign an owner, data class, ACL authority, retry policy, and rollback for every edge.
  2. Start with a synthetic source and deny-by-default mapping; prove allow and deny paths before adding volume or a connector.
  3. Make indexing idempotent, bound queues and payloads, and quarantine an uncertain ACL or transform result rather than publishing it.
  4. Promote one datasource at a time with freshness, error-rate, and authorization probes, retaining the previous configuration revision.
  5. Review cache invalidation and retention whenever source permissions, document lifecycle, or identity mapping changes.

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(npm:*)
    • Bash(curl:*)
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developers.glean.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Glean Reference Architecture loads about 1.9k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 420 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 420 words, ~1,879 tokens.

Download SKILL.mdSave it as .claude/skills/glean-reference-architecture/SKILL.md (or your agent's skills folder).
name
glean-reference-architecture
description
Enterprise architecture: Source Systems to Connectors (Cloud Run/Lambda, event-driven or scheduled) to Glean Indexing API to Glean Search Index to Client API (Search + Chat) to Your Apps (Slack bot, portal, internal tools). Trigger: "glean reference architecture", "reference-architecture".
allowed-tools
Read, Write, Edit, Bash(npm:*), Bash(curl:*), Grep
compatibility
Designed for Claude Code
version
1.8.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, enterprise-search, glean

Glean Reference Architecture

Overview

Enterprise search integration architecture for connecting internal knowledge systems to Glean's indexing and search platform. Designed for organizations needing unified search across Confluence, Google Drive, Notion, Slack, Jira, and custom internal tools. Key design drivers: connector reliability for continuous indexing, permission synchronization to enforce source-system ACLs, incremental vs bulk indexing tradeoffs, and low-latency search aggregation across heterogeneous document types.

Architecture Diagram

Source Systems ──→ Connector Framework ──→ Queue (SQS) ──→ Glean Indexing API
(Confluence, Drive,    (Cloud Run)              ↓            /indexing/documents
 Notion, Slack, Jira)       ↓              Permission Sync  /indexing/permissions
                      Schedule (cron) ──→  Bulk Reindexer   /indexing/datasources
                            ↓
                      Glean Search Index ──→ Client API ──→ Your Apps
                                              /search       (Slack bot, portal)
                                              /chat         (internal tools)

Service Layer

typescript
class ConnectorService {
  constructor(private glean: GleanIndexingClient, private cache: CacheLayer) {}

  async indexDocument(doc: SourceDocument): Promise<void> {
    const gleanDoc = this.transformToGleanFormat(doc);
    await this.glean.indexDocument(doc.datasource, gleanDoc);
    await this.syncPermissions(doc.id, doc.acl);
  }

  async bulkReindex(datasource: string, since?: string): Promise<IndexReport> {
    const docs = await this.fetchAllDocuments(datasource, since);
    const batches = this.chunk(docs, 100);  // Glean recommends batches of 100
    let indexed = 0;
    for (const batch of batches) {
      await this.glean.bulkIndex(datasource, batch);
      indexed += batch.length;
    }
    return { datasource, totalIndexed: indexed, timestamp: new Date().toISOString() };
  }
}

Caching Strategy

typescript
const CACHE_CONFIG = {
  searchResults:  { ttl: 30,   prefix: 'search' },   // 30s — freshness critical for search
  permissions:    { ttl: 300,  prefix: 'perm' },      // 5 min — ACL changes are infrequent
  datasources:    { ttl: 3600, prefix: 'ds' },        // 1 hr — datasource config rarely changes
  connectorState: { ttl: 60,   prefix: 'conn' },      // 1 min — sync cursor freshness
  documentMeta:   { ttl: 120,  prefix: 'docmeta' },   // 2 min — title/author for search previews
};
// Webhook-driven invalidation: source system change events flush document cache immediately

Event Pipeline

typescript
class IndexingPipeline {
  private queue = new Bull('glean-indexing', { redis: process.env.REDIS_URL });

  async onSourceChange(event: SourceChangeEvent): Promise<void> {
    await this.queue.add(event.type, event, { attempts: 5, backoff: { type: 'exponential', delay: 3000 } });
  }

  async processDocumentChange(event: DocumentChangeEvent): Promise<void> {
    if (event.action === 'deleted') await this.glean.deleteDocument(event.datasource, event.docId);
    else await this.connector.indexDocument(await this.fetchDoc(event.datasource, event.docId));
  }

  async processPermissionChange(event: PermissionChangeEvent): Promise<void> {
    await this.glean.syncPermissions(event.datasource, event.docId, event.newAcl);
  }
}

Data Model

typescript
interface SourceDocument  { id: string; datasource: string; title: string; body: string; url: string; author: string; updatedAt: string; acl: Permission[]; }
interface Permission      { type: 'user' | 'group' | 'domain'; value: string; access: 'read' | 'write'; }
interface ConnectorState  { datasource: string; lastSyncCursor: string; lastFullReindex: string; documentCount: number; status: 'healthy' | 'degraded' | 'failed'; }
interface IndexReport     { datasource: string; totalIndexed: number; failures: string[]; timestamp: string; }

Scaling Considerations

  • Deploy one connector instance per datasource to isolate failures and rate limits
  • Schedule bulk reindexing during off-peak hours — Glean indexing API has per-datasource throughput limits
  • Use incremental sync (change cursors) for high-frequency sources (Slack, Jira) to minimize API calls
  • Permission sync is the bottleneck — batch ACL updates and run as a separate queue consumer
  • Monitor connector health per datasource; alert on sync lag > 15 minutes for critical sources

Error Handling

ComponentFailure ModeRecovery
Connector syncSource API rate limitPer-datasource backoff, degrade to hourly bulk sync
Document indexingGlean 429 throughput limitQueue retry with jitter, batch size reduction
Permission syncACL mismatch between source and GleanReconciliation job flags discrepancies for admin review
Bulk reindexTimeout on large datasourceCheckpoint cursor, resume from last successful batch
Search aggregationStale index for one datasourceDegrade gracefully — return results from healthy sources, flag staleness

Prerequisites

  • A named data owner for every source, a source-ACL inventory, and an approved classification/retention policy.
  • Separate sandbox, staging, and production identities, credentials, queues, and destinations; production content must never be an architecture test fixture.
  • A documented rollback for connector configuration, ACL mapping, and queue consumers before enabling a new path.
Show full SKILL.md (150 more words)Show less

Instructions

  1. Draw the source-to-index boundary and assign an owner, data class, ACL authority, retry policy, and rollback for every edge.
  2. Start with a synthetic source and deny-by-default mapping; prove allow and deny paths before adding volume or a connector.
  3. Make indexing idempotent, bound queues and payloads, and quarantine an uncertain ACL or transform result rather than publishing it.
  4. Promote one datasource at a time with freshness, error-rate, and authorization probes, retaining the previous configuration revision.
  5. Review cache invalidation and retention whenever source permissions, document lifecycle, or identity mapping changes.

Output

Produce an architecture record with component owners, source/destination classes, opaque datasource IDs, ACL authority, idempotency and retry behavior, observability signals, test evidence, and rollback revision. Exclude documents, queries, and identities.

Examples

source=sandbox-handbook; queue=index-synthetic; acl=source-groups; transform=v4; allow_probe=pass; deny_probe=pass; rollback=connector-r17 is a reviewable connector receipt.

Resources

Next Steps

See glean-deploy-integration.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/.curated/glean-reference-architecture of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

Glean Reference Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Glean Reference Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Glean Reference Architecture this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.9kAutomated safety check: PassMIT
Magic MouthHmbown/Wizards-of-the-Ghosts110—~836Automated safety check: PassCC0-1.0
GCP Cloud Rundavila7/claude-code-templates33k7 repos~1.7kAutomated safety check: PassMIT
Slack BotOpenClaudia/openclaudia-skills713—~8.7kAutomated safety check: NotesMIT
Chat SDKdatabuddy-analytics/Databuddy1.2k—~2.6kAutomated safety check: PassAGPL-3.0
Slack To Teamsmicrosoft/work-iq1k1 repos~2.3kAutomated safety check: PassCustom licence

Similar skills

  • Magic Mouth

    Hmbown/Wizards-of-the-Ghosts

    Magic Mouth is trigger → message. An agent skill from Hmbown/Wizards-of-the-Ghosts.

    110 GitHub stars~836 tokensUpdated 6 mo ago
    Backend & APIsAuto-check passed
  • GCP Cloud Run

    davila7/claude-code-templates

    Specialized skill for building production-ready serverless applications on GCP.

    33k GitHub starsUsed in 7 repos~1.7k tokens
    Backend & APIsAuto-check passed
  • Slack Bot

    OpenClaudia/openclaudia-skills

    Send messages and rich content to Slack channels via webhooks or Bot API.

    713 GitHub stars~8.7k tokensUpdated 23 days ago
    Backend & APIsAuto-check: notes
  • Chat SDK

    databuddy-analytics/Databuddy

    Build multi-platform chat bots with Chat SDK (chat npm package).

    1.2k GitHub stars~2.6k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Slack To Teams

    microsoft/work-iq

    Official

    Sub-skill of microsoft-365-agents-toolkit. An agent skill from microsoft/work-iq.

    1k GitHub starsUsed in 1 repo~2.3k tokens
    Documents & OfficeAuto-check passed
  • Slack Bot Builder

    davila7/claude-code-templates

    Build Slack apps using the Bolt framework across Python, JavaScript, and Java.

    33k GitHub starsUsed in 5 repos~2.2k tokens
    Agent WorkflowsAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Glean Reference Architecture

What does Glean Reference Architecture do?

Enterprise architecture: Source Systems to Connectors (Cloud Run/Lambda, event-driven or scheduled) to Glean Indexing API to Glean Search Index to Client API (Search + Chat) to Your Apps (Slack bot…. Glean Reference Architecture is an agent skill from jeremylongshore/tons-of-skills-marketplace. Enterprise architecture: Source Systems to Connectors (Cloud Run/Lambda, event-driven or scheduled) to Glean Indexing API to Glean Search Index to Client API (Search + Chat) to Your Apps (Slack bot, portal, internal tools).

When should I use Glean Reference Architecture?

Glean Reference Architecture fits situations like: tasks that involve Event-driven systems; tasks that involve Chatbots and conversational support.

How do I install Glean Reference Architecture in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill glean-reference-architecture -a claude-code`. Or copy the skill folder (skills/.curated/glean-reference-architecture in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/glean-reference-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Glean Reference Architecture in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill glean-reference-architecture -a codex`. Or copy the skill folder (skills/.curated/glean-reference-architecture in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/glean-reference-architecture in your project. Codex loads it when a task matches its description.

Can I use Glean Reference Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill glean-reference-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/glean-reference-architecture, .gemini/skills/glean-reference-architecture, .github/skills/glean-reference-architecture and .opencode/skills/glean-reference-architecture in your project.

What does Glean Reference Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Glean Reference Architecture is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(npm:*), Bash(curl:*), Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Glean Reference Architecture access the network?

SKILL.md names 1 domain. As links in the text: developers.glean.com. This is read from the text; nothing was executed.

Is Glean Reference Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Glean Reference Architecture use?

Glean Reference Architecture is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Glean Reference Architecture use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Glean Reference Architecture?

Skills that share tags, products or a category with Glean Reference Architecture: Magic Mouth (Hmbown/Wizards-of-the-Ghosts, 110 stars), GCP Cloud Run (davila7/claude-code-templates, 33k stars), Slack Bot (OpenClaudia/openclaudia-skills, 713 stars) and Chat SDK (databuddy-analytics/Databuddy, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Glean Reference Architecture?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.