Agent skill

Glean CLI

by sammcj in sammcj/agentic-coding

Provides knowledge on using the glean CLI tool to access company knowledge and documents through Glean.

Apache-2.0Auto-check passedDocuments & Office

Install Glean CLI

skills CLI
$ npx skills add sammcj/agentic-coding --skill glean-cli -a claude-code

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

GitHub CLI
$ gh skill install sammcj/agentic-coding glean-cli --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/sammcj/agentic-coding.git skills-src && mkdir -p .claude/skills && cp -r skills-src/Skills_disabled/glean-cli .claude/skills/glean-cli && 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-cli
GitHub stars
162
Token cost
~1.9k tokens
SKILL.md length
768 words
Files
2 (incl. references)
Skills in repo
62
Repo updated
First seen
Licence
Apache-2.0

At a glance

Provides knowledge on using the glean CLI tool to access company knowledge and documents through Glean.

  • The user asks you to use Glean to search
  • SKILL.md covers Prerequisite check, Always introspect first, Calling pattern and Commands at a glance, plus 2 more sections
  • Calls jq and brew; needs GLEAN_API_TOKEN
  • Otherwise access knowledge from their companys Confluence

What it does

Glean CLI is an agent skill from sammcj/agentic-coding. Provides knowledge on using the glean CLI tool to access company knowledge and documents through Glean. Use when the user asks you to use Glean to search, read or otherwise access knowledge from their company's Confluence, Slack, Google Drive Files (Slides, Documents, Sheets) etc.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/commands.md`).

It sits in Documents & Office, covering Knowledge bases and Slides and decks. It works with Confluence, Google Drive and Slack. The repository describes itself as: Agentic Coding Rules, Templates etc... The licence is Apache-2.0.

When your agent uses it

  • The user asks you to use Glean to search
  • Otherwise access knowledge from their companys Confluence
  • Google Drive Files (Slides

Example prompts

  • “Use the glean-cli skill to provide knowledge on using the glean CLI tool to access company knowledge and documents through Glean”
  • “/glean-cli”

Requirements

  • A credential in GLEAN_API_TOKEN

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • jq
    • brew

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

  • Network

    No URLs in SKILL.md.

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • GLEAN_API_TOKEN

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

Context cost

Glean CLI loads about 1.9k tokens when it runs, and up to ~5.2k if it reads all its reference files. Until then it costs about 73 tokens; SKILL.md has 768 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~73
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.2k

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 sammcj/agentic-coding at commit 62ba5a2, republished under its Apache-2.0 licence (© sammcj). 768 words, ~1,903 tokens.

Download SKILL.mdSave it as .claude/skills/glean-cli/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
glean-cli
description
Provides knowledge on using the `glean` CLI tool to access company knowledge and documents through Glean. Use when the user asks you to use Glean to search, read or otherwise access knowledge from their company's Confluence, Slack, Google Drive Files (Slides, Documents, Sheets) etc.

Glean CLI

glean is a local CLI that authenticates to a company's Glean instance and exposes its REST API. It can search the corporate index, talk to Glean Assistant, look up people, fetch and summarise documents, and manage Glean-side resources (collections, pins, go-links, announcements, curated answers, agents, verification workflows).

Output is JSON on stdout, errors on stderr, exit code reflects success. This makes the CLI ideal for piping into jq.

Prerequisite check

Before using anything in this skill, make sure the binary is on $PATH:

bash
command -v glean

The glean CLI command is provided by brew install gleanwork/tap/glean-cli

If the command isn't found, you shoulkd ask the user if they wish you to install it for them.

If unauthenticated (run glean auth status upon authentication errors) and the user is at a terminal: glean auth login (browser OAuth). For CI or scripts, set GLEAN_API_TOKEN and GLEAN_HOST env vars instead - credentials resolve in the order: env vars -> system keyring -> ~/.glean/config.json.

Always introspect first

glean schema is the source of truth for commands and flags - Glean ships updates, and the schema reflects whatever version is installed locally. Before invoking a command you haven't used in this session, run:

bash
glean schema <command>          # full machine-readable schema for one command
glean schema | jq '.commands'   # list every available command

The reference file in this skill (references/commands.md) is a fast lookup, but if glean schema disagrees, schema wins.

Calling pattern

bash
glean <command> [subcommand] [flags]

Three flags are global and worth knowing up front:

FlagPurpose
--output <json|ndjson|text>Default json. Use ndjson when streaming results to a pipeline.
--json '<payload>'Send a complete JSON request body. Overrides every other flag - use this for any non-trivial request, the schema documents the body shape.
--dry-runPrint the request that would be sent, send nothing. Always use this before any create/update/delete operation.

Short positional flags exist for ergonomic queries (glean search "vacation policy", glean chat "what are the holidays?"), but anything beyond a single string should go through --json.

Commands at a glance

Read-only:

CommandUse for
glean searchFind documents across all enterprise sources.
glean chatAsk Glean Assistant a question; streams an AI answer.
glean documentsFetch a doc's metadata, content, permissions, or AI summary.
glean entitiesLook up people, teams, or custom entities.
glean messagesRead a specific Slack/Teams message by ID.
glean insightsPull search/usage analytics.
glean agentsList, inspect, and run Glean AI agents.
glean toolsList and run Glean platform tools.
glean answersList/get curated Q&A pairs.

Write/admin:

CommandUse for
glean collectionsCreate/update/delete document collections; add/remove items.
glean pinsPromote a document to the top of results for given queries.
glean shortcutsManage go-links (e.g. go/wiki).
glean announcementsCreate/update/delete time-bounded company announcements.
glean answersCreate/update curated answers.
glean verificationMark documents verified; send verification reminders.
glean activityLog user activity events; submit relevance feedback.
glean apiRaw authenticated HTTP call to any Glean REST endpoint (escape hatch).

For flag-level detail and worked examples on any of these, read references/commands.md - it's organised by command in the same order as the tables above.

Show full SKILL.md (285 more words)Show less

Common workflows

Search and pipe into jq. Search returns JSON with a results array; each result has a document with title, url, id, snippets, etc.

bash
glean search "incident response runbook" | jq '.results[] | {title: .document.title, url: .document.url}'

Find then summarise. Combine search with the summarise subcommand:

bash
DOC_ID=$(glean search "Q1 OKRs" | jq -r '.results[0].document.id')
glean documents summarize --json "{\"documentId\":\"$DOC_ID\"}" | jq -r .summary

Ask a question. For any "what does our company say about X" question, prefer glean chat over glean search - Glean Assistant cites the underlying documents in its response.

bash
glean chat "How do I expense international travel?"

Look up a person.

bash
glean entities read-people --json '{"query":"Jane Smith"}' | jq '.[0] | {name, email, title, department}'

Gotchas

  • Don't echo tokens. GLEAN_API_TOKEN is sensitive; never echo it, log it, or include it in error messages or commit it to a file. Use it via env var only.
  • Always --dry-run first for writes. Any create, update, delete, verify, remind, add-items, delete-item, or report action sends data into the customer's Glean tenant. Print the body first, get the user's confirmation if it's not their explicit ask, then send.
  • --json overrides everything. If both --json and individual flags are supplied, the JSON body wins - silently. Don't mix the two.
  • Schema, not memory. Flag names and JSON body shapes evolve between Glean releases. If you pass a body and the API rejects it, run glean schema <command> and check the current shape rather than guessing.
  • glean api is the escape hatch, not the default. If a dedicated subcommand exists for what you're doing (e.g. glean search rather than glean api search), prefer it - the dedicated command has nicer ergonomics and a stable contract.
  • Errors land on stderr. When piping into jq or another consumer, capture stderr separately so you can surface the real error message rather than a "parse error: unexpected end of JSON" downstream.
  • Search results aren't always document objects. results[] may contain promoted answers, people, or pinned items - when working programmatically, branch on .type or guard with .document?.

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

Files

SKILL.md and 1 other file (references) in Skills_disabled/glean-cli of sammcj/agentic-coding.

  • SKILL.md
  • references/commands.md

Open the folder on GitHubat commit 62ba5a2

Compare with similar skills

Glean CLI 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 CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Glean CLI this skillsammcj/agentic-coding162—~1.9kAutomated safety check: PassApache-2.0
Enterprise SearchZhixiangLuo/10xProductivity478—~535Automated safety check: PassMIT
Kb Refreshtechwolf-ai/ai-first-toolkit1321 repos~1.3kAutomated safety check: PassMIT
Colleague DistillationZhixiangLuo/10xProductivity478—~2.1kAutomated safety check: NotesMIT
Google Workspace Opsaffaan-m/ECC275k2 repos~684Automated safety check: PassMIT
Chart To Driveai-analyst-lab/ai-analyst304—~1.4kAutomated safety check: PassMIT

Similar skills

  • Enterprise Search

    ZhixiangLuo/10xProductivity

    Search your entire company's institutional knowledge in one query — Slack, Confluence, Jira, Linear, Notion, GitHub, plus any AI or multi-source search tool listed in verifiedconnections.md.

    478 GitHub stars~535 tokensUpdated 2 mo ago
    Knowledge ManagementAuto-check passed
  • Kb Refresh

    techwolf-ai/ai-first-toolkit

    Add new sources to your knowledge base or re-scrape existing ones to pick up changes.

    132 GitHub starsUsed in 1 repo~1.3k tokens
    Knowledge ManagementAuto-check passed
  • Colleague Distillation

    ZhixiangLuo/10xProductivity

    Distill a colleague into a reusable AI skill (work + persona) using tool connections — Slack, Slack AI, Jira, GHE, Bitbucket, Confluence, SharePoint, Teams, Outlook, Notion, Linear, Google Docs, and…

    478 GitHub stars~2.1k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check: notes
  • Operate across Google Drive, Docs, Sheets, and Slides as one workflow surface for plans, trackers, decks, and shared documents.

    275k GitHub starsUsed in 2 repos~684 tokens
    Documents & OfficeAuto-check passed
  • Chart To Drive

    ai-analyst-lab/ai-analyst

    Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides.

    304 GitHub stars~1.4k tokensUpdated 7 days ago
    Documents & OfficeAuto-check passed
  • Google Drive Sheets

    yc-software/qm

    Find, read, export, edit, and manage the user's Google Drive, Docs, Sheets, and Slides through per-user OAuth.

    15k GitHub stars~2.3k tokensUpdated today
    Documents & OfficeAuto-check passed

More from sammcj/agentic-coding

All 62 skills in this repo
  • Yue2 Music

    sammcj/agentic-coding

    A skill your agent uses when generating songs with YuE2, covering a recording via SheetSage2 audio-to-ABC, editing a score or lyrics with melody preservation, or building a reproducible listening…

    162 GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Bento Slides

    sammcj/agentic-coding

    A skill your agent uses when creating or editing Bento (.bento.html) slide decks, including any request for a single-file HTML slide deck.

    162 GitHub stars~2.9k tokensUpdated today
    Auto-check passed
  • Idrive Backup

    sammcj/agentic-coding

    A skill your agent uses whenever the user wants you to manage, discuss or diagnose iDrive Backup configuration on macOS

    162 GitHub stars~1.7k tokensUpdated today
    Auto-check: notes
  • Piper Tts Training

    sammcj/agentic-coding

    Train custom TTS voices for Piper (ONNX format) using fine-tuning or from-scratch approaches.

    162 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • PPTX To Md

    sammcj/agentic-coding

    Convert a PPTX slide deck into per-slide markdown that preserves both the verbatim text and the meaning of embedded screenshots, diagrams and charts in their original layout positions.

    162 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Skill Creator Primer

    sammcj/agentic-coding

    You MUST load this skill before the skill-creator skill AND before making ANY change to, or conducting a review of ANY Agent Skill.

    162 GitHub stars~9.8k tokensUpdated today
    Auto-check passed

Questions about Glean CLI

What does Glean CLI do?

Provides knowledge on using the glean CLI tool to access company knowledge and documents through Glean. Glean CLI is an agent skill from sammcj/agentic-coding. Provides knowledge on using the glean CLI tool to access company knowledge and documents through Glean.

When should I use Glean CLI?

Glean CLI fits situations like: the user asks you to use Glean to search; otherwise access knowledge from their companys Confluence; google Drive Files (Slides.

How do I install Glean CLI in Claude Code?

Run `npx skills add sammcj/agentic-coding --skill glean-cli -a claude-code`. Or copy the skill folder (Skills_disabled/glean-cli in sammcj/agentic-coding) into .claude/skills/glean-cli in your project. Claude Code loads it when a task matches its description.

How do I install Glean CLI in Codex?

Run `npx skills add sammcj/agentic-coding --skill glean-cli -a codex`. Or copy the skill folder (Skills_disabled/glean-cli in sammcj/agentic-coding) into .agents/skills/glean-cli in your project. Codex loads it when a task matches its description.

Can I use Glean CLI 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 sammcj/agentic-coding --skill glean-cli -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-cli, .gemini/skills/glean-cli, .github/skills/glean-cli and .opencode/skills/glean-cli in your project.

What does Glean CLI need to run?

Going by SKILL.md and its folder, Glean CLI needs the command-line tools its instructions call (jq and brew) and credentials named GLEAN_API_TOKEN. Our summary lists: A credential in GLEAN_API_TOKEN.

Does Glean CLI access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Glean CLI 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 CLI use?

Glean CLI is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Glean CLI use?

About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.3k tokens, read only when the agent opens those files.

What are the alternatives to Glean CLI?

Skills that share tags, products or a category with Glean CLI: Enterprise Search (ZhixiangLuo/10xProductivity, 478 stars), Kb Refresh (techwolf-ai/ai-first-toolkit, 132 stars), Colleague Distillation (ZhixiangLuo/10xProductivity, 478 stars) and Google Workspace Ops (affaan-m/ECC, 275k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Glean CLI?

sammcj (a GitHub user) maintains it in sammcj/agentic-coding, which has 162 GitHub stars. The repository holds 62 skills in this directory. The repository was last updated on October 7, 2026.

Source: sammcj/agentic-coding on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.