Agent skill
greptile-tools
Executes natural language codebase queries against indexed repositories via Greptile API. Use when investigating code architecture, locating implementations, understanding feature workflows, or searching cross-repository patterns requiring semantic code graph traversal.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/greptile-tools
SKILL.md
[H1][GREPTILE-TOOLS]
Dictum: Codebase context enables precise answers.
Query indexed repositories via Greptile API v2. Defaults to current repo.
[IMPORTANT] Repository must be indexed before querying. Check status first. Supports natural language queries against a comprehensive code graph with file/function/class references.
[1][COMMANDS]
| [CMD] | [ARGS] | [PURPOSE] |
|---|---|---|
| index | -- | Trigger repository indexing |
| status | -- | Check indexing progress/completion |
| query | <question> [genius] |
Natural language codebase Q&A |
| search | <question> |
Code search (files only, no answer) |
[2][USAGE]
# Check indexing status (run first)
uv run .claude/skills/greptile-tools/scripts/greptile.py status
# Trigger repository indexing
uv run .claude/skills/greptile-tools/scripts/greptile.py index
# Natural language query
uv run .claude/skills/greptile-tools/scripts/greptile.py query "How does authentication work?"
# Deep analysis with genius mode
uv run .claude/skills/greptile-tools/scripts/greptile.py query "Explain Effect pipeline patterns" genius
# Code search (files/functions only, no generated answer)
uv run .claude/skills/greptile-tools/scripts/greptile.py search "rate limiting implementation"
[3][ARGUMENTS]
index: (no arguments)
- Triggers indexing on default repo (bsamiee/Parametric_Portal)
- Set
reload=Trueto force re-index
status: (no arguments)
- Returns indexing status, files processed count, SHA, readiness
query: <question> [genius]
question— Natural language query (required)genius— Pass literalgeniusfor deep analysis mode (slower, more thorough)- Returns: answer text + source file references with line ranges
search: <question>
question— Natural language code search (required)- Returns: matching files/functions/classes (no generated answer)
[4][OUTPUT]
Commands return: {"status": "success|error", ...}.
| [INDEX] | [CMD] | [RESPONSE] |
|---|---|---|
| [1] | index |
{repo, message} |
| [2] | status |
{repo, indexing, sha, progress, ready} |
| [3] | query |
{query, answer, sources: [{file, lines}]} |
| [4] | search |
{query, results: [{file, lines, summary}]} |
Error responses include retryable: bool for transient failures (5xx, 429).
[5][ENVIRONMENT]
| [VAR] | [REQUIRED] | [DESCRIPTION] |
|---|---|---|
GREPTILE_TOKEN |
Yes | Greptile API bearer token |
GITHUB_TOKEN |
Yes | GitHub token for repo access (or GH_TOKEN) |
[6][ERROR_HANDLING]
- HTTP errors print
[ERROR] <status>: <body>and exit 1 - Missing token:
[ERROR] GREPTILE_TOKEN environment variable not setand exit 1 - Repository not indexed:
[ERROR] Repository not indexed; runindexcommand first - Rate limit (429): retry after
Retry-Afterheader value queryreturnsretryable: boolfor transient failures (5xx, 429)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?