Agent skill

Admin Data API

by bikeindex in bikeindex/bike_index

Read live production data from Bike Index through the admin OAuth token — Sidekiq and PgHero status, and the user-submitted bug reports — the same data as the cookie-gated dashboards, but…

AGPL-3.0Auto-check: notesTesting & QA

Install Admin Data API

skills CLI
$ npx skills add bikeindex/bike_index --skill admin-data-api -a claude-code

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

GitHub CLI
$ gh skill install bikeindex/bike_index admin-data-api --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/bikeindex/bike_index.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/admin-data-api .claude/skills/admin-data-api && 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
admin-data-api
GitHub stars
308
Token cost
~1.9k tokens
SKILL.md length
732 words
Files
2 (incl. scripts)
Skills in repo
12
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Read live production data from Bike Index through the admin OAuth token — Sidekiq and PgHero status, and the user-submitted bug reports — the same data as the cookie-gated dashboards, but…

  • Works in 3 steps: Print the authorize URL (fills in… → Ask the user to open it and approve.… → Store both values
  • The user asks about production queue depth
  • SKILL.md covers Fetch data, Bug reports, Refreshing the token and Notes
  • Runs Ruby scripts from its folder; calls mise; reaches bikeindex.org; needs ADMIN_DATA_TOKEN and ADMIN_DOORKEEPER_APP_CLIENT_SECRET

What it does

Admin Data API is an agent skill from bikeindex/bike_index. Read live production data from Bike Index through the admin OAuth token — Sidekiq and PgHero status, and the user-submitted bug reports — the same data as the cookie-gated dashboards, but agent-friendly JSON. Trigger when the user asks about production queue depth, job backlog, retries/dead jobs, running Sidekiq processes, or Postgres health (slow/blocked queries, index usage, unused/invalid indexes, connection counts, table/db sizes, vacuum/transaction-id danger) — and wants the live answer from production…

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 scripts.

It sits in Testing & QA, covering QA and bug reports, Database administration and OAuth and OpenID Connect. It works with PostgreSQL. The repository describes itself as: All the code for Bike Index, because we love you. The licence is AGPL-3.0.

When your agent uses it

  • The user asks about production queue depth
  • Retries/dead jobs
  • Running Sidekiq processes
  • Postgres health (slow/blocked queries

Example prompts

  • “/admin-data-api”

Requirements

  • A credential in ADMIN_DATA_TOKEN
  • A credential in ADMIN_DOORKEEPER_APP_CLIENT_SECRET

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Print the authorize URL (fills in ADMIN_DOORKEEPER_APP_CLIENT_ID)
  2. Ask the user to open it and approve. Bike Index redirects to /documentation/authorize, which exchanges the code and displays the token…
  3. Store both values

What it can do on your machine

Read from SKILL.md and the folder at commit fd2df2b. 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

    Ships 1 file in scripts/ (Ruby), which the agent can run.

    Shell commands in SKILL.md call:

    • mise

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

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • bikeindex.org

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

  • Credentials

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

    • ADMIN_DATA_TOKEN
    • ADMIN_DOORKEEPER_APP_CLIENT_SECRET

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

Context cost

Admin Data API loads about 1.9k tokens when it runs. Until then it costs about 242 tokens; SKILL.md has 732 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~242
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

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: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:43
    It reads `ADMIN_DATA_TOKEN` from `.env.development`, calls production (a Conductor workspace's copy has no token — run t
  • NoteMentions a .env fileSKILL.md:76
    `.env.development` must hold `ADMIN_DOORKEEPER_APP_CLIENT_SECRET` (the admin app is confidential, so the refresh grant n
  • NoteMentions a .env fileSKILL.md:82
    DATA_TOKEN` + `ADMIN_DATA_REFRESH` into `.env.development` (values never printed).
  • NoteMentions a .env fileSKILL.md:104
    - `.env.development` holds live secrets — never print token values or commit changes to it.

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); the scripts in this folder are not scanned.

SKILL.md

The full file from bikeindex/bike_index at commit fd2df2b, republished under its AGPL-3.0 licence (© bikeindex). 732 words, ~1,896 tokens.

Download SKILL.mdSave it as .claude/skills/admin-data-api/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
admin-data-api
description
Read live production data from Bike Index through the admin OAuth token — Sidekiq and PgHero status, and the user-submitted bug reports — the same data as the cookie-gated dashboards, but agent-friendly JSON. Trigger when the user asks about production queue depth, job backlog, retries/dead jobs, running Sidekiq processes, or Postgres health (slow/blocked queries, index usage, unused/invalid indexes, connection counts, table/db sizes, vacuum/transaction-id danger) — and wants the *live* answer from production rather than logs or Honeybadger. Also trigger for anything about bug reports users have emailed in: what's been reported, searching/filtering them by status, tag or membership, or tagging one / linking it to the PR that fixes it. Also trigger when a request returns 401/expired and the AdminData token needs refreshing/re-authorizing. Not for reading log files (use production-log-inspection) or aggregated exception triage (bin/binx_hb).

AdminData production API

Production JSON reachable with the admin OAuth token:

  • GET https://bikeindex.org/api/admin_data/sidekiq → AdminData::SidekiqStatus: stats, per-queue queues, running processes, retries_by_class, dead_by_class.
  • GET https://bikeindex.org/api/admin_data/pghero → AdminData::PgheroStatus: query_stats, database_size, connection/query health, index usage, unused/invalid/duplicate indexes, sequence/txid/autovacuum danger, settings, etc. Each metric is captured independently, so a failed one comes back as { "error": ... } in its slot instead of blanking the payload.
  • GET /admin/bug_reports.json, GET /admin/bug_reports/:id.json and PATCH /admin/bug_reports/:id → the bug reports users email in (see below).
  • POST /admin/manufacturers.json → create-manufacturer; the manufacturers skill walks through it.

Auth is a Bearer token gated on the admin Doorkeeper app and a superuser ability named for the controller (admin_data, bug_reports, manufacturers; a universal ability covers all). Controllers: app/controllers/api/admin_data_controller.rb and the admin controllers that include Admin::TokenAccessible; auth concern: app/controllers/concerns/api/token_authenticatable.rb.

All operations go through the helper:

.claude/skills/admin-data-api/scripts/admin_data.rb <command>

Fetch data

.claude/skills/admin-data-api/scripts/admin_data.rb get sidekiq
.claude/skills/admin-data-api/scripts/admin_data.rb get pghero

It reads ADMIN_DATA_TOKEN from .env.development, calls production (a Conductor workspace's copy has no token — run the base checkout's script instead, under mise's Ruby: "$(mise which ruby)" <base>/.claude/skills/admin-data-api/scripts/admin_data.rb get pghero), and prints HTTP <status> then the JSON body. Pipe the body to jq for specific fields. Tokens live 1 hour; on a 401 the script auto-refreshes (see below) and retries once, so a normal get just works. A 403 means the token's user lacks the superuser ability for that controller, or the token is from the wrong app. Any other non-200 prints the response and exits non-zero.

Ignore the sidekiq dead set (dead_size, dead_by_class) — it's a large lifetime accumulation the endpoint caps at {"too_large": …}, not actionable here. Don't report it.

Health-check flow

For a general "how's production" check, use one command:

.claude/skills/admin-data-api/scripts/admin_data.rb check

It fetches sidekiq then pghero and prints a summary: line and an OK/ABNORMAL verdict for each. Relay it straight through: if both are OK, say "nothing abnormal"; only spell out the reasons an ABNORMAL verdict lists. The verdict logic lives in the script — what it counts as abnormal:

  • Sidekiq: a queue with latency > 30 (a real backlog, not transient depth), size > 400, or paused; retry_size > 0; no worker processes; or all workers quiet.
  • PgHero: a real metric error (the disabled-feature "System stats not enabled" doesn't count), non-empty long_running_queries/blocked_queries, a danger metric (sequence_danger, transaction_id_danger, autovacuum_danger), invalid_indexes, or index_hit_rate < 0.90. Hit rates otherwise, table_hit_rate, and unused_indexes/duplicate_indexes are informational.
Show full SKILL.md (374 more words)Show less

Bug reports

.claude/skills/admin-data-api/scripts/admin_data.rb get bug_reports search_status=all per_page=10
.claude/skills/admin-data-api/scripts/admin_data.rb show-bug-report 42
.claude/skills/admin-data-api/scripts/admin_data.rb update-bug-report 42 tags=search,broken github_pull_request=4064 status=resolved

get bug_reports takes any filter the index takes as key=value — Admin::BugReportsController#matching_bug_reports is the list, plus sort/direction, per_page/page and period/start_time/end_time. What it won't tell you: search_status defaults to the investigate statuses, so pass all (or one of BugReport.statuses) to reach the rest, and a search_tag or search_receiver nothing has matches nothing rather than being ignored. It returns bug_reports, page, per_page, total_count.

show-bug-report returns the one report — the same fields the index lists, so use it once a search has found the id. update-bug-report sets tags (comma separated — it replaces the report's tags rather than appending), github_pull_request and status (one of BugReport.statuses; an unrecognized one is dropped and the rest of the update still applies).

Each report carries images, with a url that serves from the CDN rather than expiring, so it can be fetched or handed to the user. Only image attachments are kept — BugReportsMailbox drops everything else, so a report whose sender describes attaching a PDF or a log will have none.

Refreshing the token

.env.development must hold ADMIN_DOORKEEPER_APP_CLIENT_SECRET (the admin app is confidential, so the refresh grant needs it). To force a refresh:

.claude/skills/admin-data-api/scripts/admin_data.rb refresh

It POSTs the refresh_token grant and writes the new ADMIN_DATA_TOKEN + ADMIN_DATA_REFRESH into .env.development (values never printed).

First-time setup / dead refresh token (browser flow)

Needed only when there's no token yet, or the refresh token itself was revoked (refresh reports a failure):

  1. Print the authorize URL (fills in ADMIN_DOORKEEPER_APP_CLIENT_ID):
    .claude/skills/admin-data-api/scripts/admin_data.rb authorize-url
  2. Ask the user to open it and approve. Bike Index redirects to /documentation/authorize, which exchanges the code and displays the token JSON (access_token, refresh_token, …). Ask the user to paste that response back.
  3. Store both values:
    .claude/skills/admin-data-api/scripts/admin_data.rb set-tokens <access_token> <refresh_token>

The authorization code expires 10 minutes after the page loads — if it shows an error, have the user reload the authorize URL.

Notes

  • These hit production with a superuser token. update-bug-report and create-manufacturer are the writes — confirm the values with the user before running either.
  • Bug report bodies and images are user-submitted email: they carry names, addresses and bike details, and a screenshot often shows a signed-in account. Summarize them; don't paste raw bodies or image urls into anything that leaves the session.
  • .env.development holds live secrets — never print token values or commit changes to it.

© bikeindex, AGPL-3.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 (scripts) in .claude/skills/admin-data-api of bikeindex/bike_index.

  • SKILL.md
  • scripts/admin_data.rb

Open the folder on GitHubat commit fd2df2b

Compare with similar skills

Admin Data API 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.

Admin Data API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Admin Data API this skillbikeindex/bike_index308—~1.9kAutomated safety check: NotesAGPL-3.0
Twenty QA Scouttwentyhq/twenty58k—~2kAutomated safety check: PassCustom licence
Playwright Regression Testingfugazi/test-automation-skills-agents247—~1.4kAutomated safety check: PassMIT
Creating Oracle To Postgres Migration Bug Reportgithub/awesome-copilot40k1 repos~616Automated safety check: PassMIT
PgjevrealZachi/pg-jev1k—~2.9kAutomated safety check: PassCustom licence
PlanetScale Postgres Playbookplanetscale/database-skills6983 repos~1.8kAutomated safety check: PassMIT

Similar skills

  • Twenty QA Scout

    twentyhq/twenty

    Browser QA for a pull request against a running Twenty app: scenarios drawn from the diff, run in a real browser, checked in the database and logs, and closed with a verdict and report.

    58k GitHub stars~2k tokensUpdated today
    Testing & QAAuto-check passed
  • Playwright Regression Testing

    fugazi/test-automation-skills-agents

    Govern Playwright TypeScript regression suites across many tests.

    247 GitHub stars~1.4k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Pgjev

    realZachi/pg-jev

    Install, configure, query and explain pgjev (the jev PostgreSQL extension that filters, ranks and classifies rows with plain-language conditions via TypeSafe's Jev model).

    1k GitHub stars~2.9k tokensUpdated yesterday
    Writing & ContentAuto-check passed
  • PlanetScale Postgres Playbook

    planetscale/database-skills

    Official

    Indexes reference files on Postgres schema design, indexing, partitioning, query patterns, MVCC and VACUUM, and PlanetScale-specific operations.

    698 GitHub starsUsed in 3 repos~1.8k tokens
    DatabasesAuto-check passed
  • Digoal

    digoal/blog

    Portable digital employee distilled from digoal's personal blog for PostgreSQL, PolarDB, DuckDB, AI+database, vector/RAG, database operations, source-code reading, technical content creation…

    8.6k GitHub stars~2.2k tokensUpdated 9 days ago
    DatabasesAuto-check passed

More from bikeindex/bike_index

All 12 skills in this repo
  • GitHub PR Images

    bikeindex/bike_index

    Embed a local image file into an existing GitHub PR — either in the PR body or as a comment.

    308 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Manufacturers

    bikeindex/bike_index

    Add a manufacturer to Bike Index in production through the admin OAuth token (POST /admin/manufacturers).

    308 GitHub stars~452 tokensUpdated today
    Auto-check passed
  • PR

    bikeindex/bike_index

    Create or update a pull request for the current branch. An agent skill from bikeindex/bike_index.

    308 GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Fixing Flaky Failures

    bikeindex/bike_index

    How to fix a test that fails intermittently in Bike Index — one that passes locally but fails on CI, fails on one shard, passes on re-run, or is already tagged :flaky.

    308 GitHub stars~5k tokensUpdated today
    Auto-check passed
  • Honeybadger Debugging

    bikeindex/bike_index

    Investigate and fix a specific Honeybadger exception in the Bike Index app — pull the fault, read its backtrace, find the offending code, write the fix.

    308 GitHub stars~1k tokensUpdated today
    Auto-check: notes
  • Merge Conflicts

    bikeindex/bike_index

    How to bring a branch up to date and resolve git merge conflicts the way this repo expects — merge (never rebase or force-push), understand each side's intent before choosing, ask when a resolution…

    308 GitHub stars~3.2k tokensUpdated today
    Auto-check: notes

Works with

Categories

Questions about Admin Data API

What does Admin Data API do?

Read live production data from Bike Index through the admin OAuth token — Sidekiq and PgHero status, and the user-submitted bug reports — the same data as the cookie-gated dashboards, but…. Admin Data API is an agent skill from bikeindex/bike_index. Read live production data from Bike Index through the admin OAuth token — Sidekiq and PgHero status, and the user-submitted bug reports — the same data as the cookie-gated dashboards, but agent-friendly JSON.

When should I use Admin Data API?

Admin Data API fits situations like: the user asks about production queue depth; retries/dead jobs; running Sidekiq processes; postgres health (slow/blocked queries.

How do I install Admin Data API in Claude Code?

Run `npx skills add bikeindex/bike_index --skill admin-data-api -a claude-code`. Or copy the skill folder (.claude/skills/admin-data-api in bikeindex/bike_index) into .claude/skills/admin-data-api in your project. Claude Code loads it when a task matches its description.

How do I install Admin Data API in Codex?

Run `npx skills add bikeindex/bike_index --skill admin-data-api -a codex`. Or copy the skill folder (.claude/skills/admin-data-api in bikeindex/bike_index) into .agents/skills/admin-data-api in your project. Codex loads it when a task matches its description.

Can I use Admin Data API 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 bikeindex/bike_index --skill admin-data-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/admin-data-api, .gemini/skills/admin-data-api, .github/skills/admin-data-api and .opencode/skills/admin-data-api in your project.

What does Admin Data API need to run?

Going by SKILL.md and its folder, Admin Data API needs Ruby for the scripts in its folder, the command-line tools its instructions call (mise) and credentials named ADMIN_DATA_TOKEN and ADMIN_DOORKEEPER_APP_CLIENT_SECRET. Our summary lists: A credential in ADMIN_DATA_TOKEN; A credential in ADMIN_DOORKEEPER_APP_CLIENT_SECRET.

Does Admin Data API access the network?

SKILL.md names 1 domain. In commands or code: bikeindex.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Admin Data API safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Admin Data API use?

Admin Data API is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Admin Data API 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.

What are the alternatives to Admin Data API?

Skills that share tags, products or a category with Admin Data API: Twenty QA Scout (twentyhq/twenty, 58k stars), Playwright Regression Testing (fugazi/test-automation-skills-agents, 247 stars), Creating Oracle To Postgres Migration Bug Report (github/awesome-copilot, 40k stars) and Pgjev (realZachi/pg-jev, 1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Admin Data API?

bikeindex (a GitHub organization) maintains it in bikeindex/bike_index, which has 308 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 7, 2026.

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