Using glean code

From gleanwork/claude-plugins · View interactive version

Using glean code is an AI agent skill from the GitHub repository gleanwork/claude-plugins. Search and analyze internal source code across the organization's repositories — use when asked how something is implemented, where the code for a system lives, who has been working on a codebase, or to find similar patterns across teams. Trigger phrases include how is X implemented, where is the co

How to use this skill

Skill file

Using Glean for Code Exploration

Glean indexes source code across the organization's connected repositories. Local tools (Grep, Glob, Read) see only the current repo; this skill is for everything else.

When to reach for this

The tool you'll mostly use

This skill drives the code_search MCP tool. For full param shape, inline filter syntax, and pitfalls (quoting names, the app: filter not applying, recency caveats), read CODE2. That is the canonical reference; this skill carries the workflow on top.

For this skill's own workflow patterns, see:

Vetting

Not every match is worth surfacing. Code in legacy/, deprecated/, archive/, abandoned repos, or files with extensive TODO/FIXME comments will mislead the user. Apply the criteria in CODE4 and prefer 3 high-quality matches over 10 unfiltered ones.

Quality test

Recency test

Relevance test

Filter out: code in /deprecated/, /old/, /legacy/ paths; abandoned repositories; prototype/experimental code; code with extensive TODO/FIXME comments. Quality over quantity — 3 good examples beat 10 mediocre ones.

Key differentiator

Local tools (grep, glob) search only the current repo. Glean searches across all repositories in the organization. This is powerful for:

Tool selection

| User intent | Glean tool |

|-------------|------------|

| Find code by content, pattern, or file | code_search |

| Find related design docs or specs | search |

| Identify code owners/contributors | code_search + employee_search |

| Read full file content | read_document |

Output expectations

When presenting code findings:

  1. Cite each file with its full URL so the user can open it directly
  2. Note last-update date when a result depends on currency (active patterns vs. archaeological digs)
  3. Group by repo when results span many repos — it shows the user the shape of the answer
  4. Flag drift when implementations disagree across teams — don't pretend consensus exists if it doesn't

Related skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.