stoa: Skill for Claude Code

.claude/skills/analytics/SKILL.md

analytics is a skill for Claude Code from stoa-platform/stoa. It costs 29 tokens per session (1,179 once invoked), scanned B, original, Apache-2.0.

A read-only skill for checking data from PostgreSQL, local token records, Prometheus metrics, GitHub CI, and Kubernetes.

In plain words
What is it for?
Use it to query production database data, token costs, monitoring metrics, GitHub workflow results, and Kubernetes pod status.
Why use it?
It gathers operational information from several systems without changing them, so you can inspect application, cost, build, and cluster status in one workflow.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; positional $N argument.

This is stoa-platform/stoa's own configuration. It tells Claude Code how to work on stoa itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything stoa configures →

Reuse

Borrowing it

Nothing to install: this file belongs to stoa-platform/stoa. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/stoa-platform/stoa/main/.claude/skills/analytics/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/stoa-platform/stoa

Made for: Claude Code.

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 analytics

README.md
[![agentmods](https://agentmods.dev/badge/skills/stoa-platform/stoa/analytics/github.svg)](https://agentmods.dev/skills/stoa-platform/stoa/analytics)
Your own site
<a href="https://agentmods.dev/skills/stoa-platform/stoa/analytics"><img src="https://agentmods.dev/badge/skills/stoa-platform/stoa/analytics/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for analytics

Your own site · 80×15
<a href="https://agentmods.dev/skills/stoa-platform/stoa/analytics"><img src="https://agentmods.dev/badge/skills/stoa-platform/stoa/analytics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,179 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00029 $0.01179
Opus 5.5 $0.00012 $0.00472
Sonnet 5.5 $0.00006 $0.00236
Haiku 4.5 $0.00003 $0.00118

Measured 2mo ago against content hash 2ac58c6f866a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

analytics scanned grade B with 2 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 2mo 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat ~/.claude/stats-cache.json | python3 -m json.tool

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://pushgateway.gostoa.dev/metrics | grep gateway_arena
.claude/skills/analytics/SKILL.md · 157 lines

How it starts

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

Analytics Skill

Query STOA platform data across 5 sources. All queries are read-only.

Data Sources

# Source Access Auth
1 PostgreSQL (OVH Managed) psql direct Infisical /prod/database
2 Token Observatory Local files None (filesystem)
3 Pushgateway / Prometheus HTTP API None (IP-whitelisted)
4 GitHub CI gh CLI GitHub token (ambient)
5 Kubernetes kubectl kubeconfig (ambient)

Connection Patterns

PostgreSQL

eval $(infisical-token)
DB_URL=$(infisical secrets get DATABASE_URL --env=prod --path=/database --plain 2>/dev/null)
psql "$DB_URL" -c "<QUERY>"

Fallback (direct):

psql "<POSTGRES_CONNECTION_STRING>"

Token Observatory

# Today's stats
cat ~/.claude/stats-cache.json | python3 -m json.tool

# Historical (metrics.log)
grep "TOKEN-SPEND" ~/.claude/projects/-Users-torpedo-hlfh-repos-stoa/memory/metrics.log

Pushgateway

curl -s https://pushgateway.gostoa.dev/metrics | grep gateway_arena

GitHub CI

gh run list --limit 10 --json name,status,conclusion,startedAt,updatedAt
gh run view <run-id> --log-failed

Kubernetes

kubectl get pods -n stoa-system -o wide
kubectl top pods -n stoa-system

Pre-Built Queries

1. tenant-count — Total tenants

SELECT COUNT(*) AS total_tenants FROM tenants WHERE deleted_at IS NULL;

2. api-count — APIs by tenant

SELECT t.name AS tenant, COUNT(a.id) AS apis
FROM apis a JOIN tenants t ON a.tenant_id = t.id
WHERE a.deleted_at IS NULL
GROUP BY t.name ORDER BY apis DESC;

3. user-count — Active users

SELECT COUNT(*) AS total_users FROM users WHERE is_active = true;

4. gateway-instances — Registered gateways

SELECT name, gateway_type, status, base_url, last_health_check
FROM gateway_instances ORDER BY last_health_check DESC;

5. recent-deployments — Last 10 API deployments

SELECT a.name AS api, d.status, d.gateway_type, d.created_at
FROM deployments d JOIN apis a ON d.api_id = a.id
ORDER BY d.created_at DESC LIMIT 10;

Read the full file on GitHub · 157 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. 2mo ago First seen · 157 lines · 29 tokens per session scan B 2ac58c6f866a

Subscribe to this mod's changes

analytics is a skill published in the GitHub repository stoa-platform/stoa (9 stars, last pushed yesterday), licensed Apache-2.0. It adds 29 tokens to every session and 1,179 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

analytics compared with skills from other repositories

analytics next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
analyticsstoa-platform/stoaSkill9yesterdayApache-2.0B29Claude Code
lyrikgebruder/wirkenSkill1942d agoMITA15Claude Code
librariangebruder/wirkenSkill1942d agoMITA34Claude Code
notesgebruder/wirkenSkill1942d agoMITA10Claude Code
tdx-assetsgebruder/wirkenSkill1942d agoMITA58Claude Code
aggregatorgebruder/wirkenSkill1942d agoMITA30Claude Code
githubgebruder/wirkenSkill1942d agoMITA9Claude Code