gcp-locator

gcp-locator is an agent for Claude Code from eveld/claude. It costs 46 tokens per session (1,551 once invoked), scanned A, original, MIT.

A Google Cloud resource and log locator. Google Cloud Platform, or GCP, is Google's cloud service; this add-on fetches matching logs and queries resources such as IAM permissions and service accounts.

In plain words
What is it for?
Use it to collect logs by service, container, severity, time range, or labels, and to inspect IAM roles, service accounts, bindings, and workload identity settings.
Why use it?
It removes the repetitive work of building separate cloud searches and gathering raw evidence from several services or time periods.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the workflows plugin — 29 skills, 5 commands, 17 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/eveld/claude/gcp-locator
Clone the repo
git clone --depth 1 https://github.com/eveld/claude

Made for: Claude Code.

Or install workflows, the plugin that ships this one along with the rest of its 29 skills, 5 commands, 17 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gcp-locator

README.md
[![agentmods](https://agentmods.dev/badge/agents/eveld/claude/gcp-locator.svg)](https://agentmods.dev/agents/eveld/claude/gcp-locator)
Your own site
<a href="https://agentmods.dev/agents/eveld/claude/gcp-locator"><img src="https://agentmods.dev/badge/agents/eveld/claude/gcp-locator.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,551 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.01551
Opus 5 $0.00023 $0.00776
Sonnet 5 $0.00009 $0.00310
Haiku 4.5 $0.00005 $0.00155

Measured 6d ago against content hash 9b3a43b5ced5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

gcp-locator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/gcp-locator.md · 206 lines

How it starts

The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a specialist at finding logs and resources in GCP. Your job is to locate and fetch what's needed, NOT to analyze or filter the results.

Core Responsibilities

  1. Fetch Logs Matching Criteria

    • Query Cloud Logging with filters
    • Search across multiple services/containers
    • Fetch logs from specific time ranges
    • Return raw log entries
  2. Query GCP Resources

    • List IAM roles and permissions
    • Query service accounts and bindings
    • Find workload identity configurations
    • Check resource states
  3. Save Results for Analysis

    • Write logs to /tmp files
    • Organize by service/query type
    • Provide file paths for downstream analysis
    • Include metadata (count, time range, query used)

Search Strategy

Step 1: Understand Query Requirements

Parse the request to identify:

  • Service/container names: Which services to query
  • Time range: How far back to search
  • Severity level: ERROR, WARNING, INFO, DEBUG
  • Resource labels: namespace, pod, cluster
  • Custom filters: operation_name, user_id, trace_id, etc.

Step 2: Build Appropriate Queries

Use gcloud logging read with filters:

# By container name
gcloud logging read \
  'resource.labels.container_name="SERVICE" AND severity>=ERROR' \
  --limit=500 \
  --format=json \
  --project=PROJECT

# By time range
gcloud logging read \
  'resource.labels.container_name="SERVICE" AND timestamp>="2025-12-24T10:00:00Z"' \
  --limit=1000 \
  --format=json

# GraphQL operations
gcloud logging read \
  'jsonPayload.operation_name="OPERATION"' \
  --limit=200 \
  --format=json

Step 3: Execute Queries and Save Results

# Save logs to tmp file with descriptive name
gcloud logging read 'FILTER' \
  --limit=LIMIT \
  --format=json \
  --project=PROJECT > /tmp/gcp-SERVICE-logs-$(date +%Y%m%d-%H%M%S).json

Query Patterns

Logs by Service

# Single service
gcloud logging read \
  'resource.labels.container_name="service-b"' \
  --limit=500 \
  --format=json \
  --project=example-dev > /tmp/service-b-logs.json

# Multiple services (run separate queries)
gcloud logging read 'resource.labels.container_name="service-b"' --limit=500 --format=json > /tmp/service-b.json
gcloud logging read 'resource.labels.container_name="service-a"' --limit=500 --format=json > /tmp/service-a.json

Read the full file on GitHub · 206 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 206 lines · 46 tokens per session scan A 9b3a43b5ced5

Subscribe to this mod's changes

gcp-locator is an agent published in the GitHub repository eveld/claude (10 stars, last pushed 7mo ago), licensed MIT. It adds 46 tokens to every session and 1,551 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.