Agent skill

Perf Loop

by ozontech in ozontech/seq-db

Autonomous performance-optimization loop for seq-db driven by seqbazooka.

Apache-2.0Auto-check passedDevOps & Cloud

Install Perf Loop

skills CLI
$ npx skills add ozontech/seq-db --skill perf-loop -a claude-code

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

GitHub CLI
$ gh skill install ozontech/seq-db perf-loop --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/ozontech/seq-db.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/perf-loop .claude/skills/perf-loop && 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
perf-loop
GitHub stars
133
Token cost
~1.6k tokens
SKILL.md length
770 words
Files
8 (incl. scripts)
Skills in repo
5
Repo updated
First seen
Licence
Apache-2.0

At a glance

Autonomous performance-optimization loop for seq-db driven by seqbazooka.

  • Works in 4 steps: Pick or confirm the scenario + params… → Build a docker image from the current… → Run seqbazooka with… → …
  • The user wants the agent to hunt for and land perf wins on its own
  • SKILL.md covers Guardrails (non-negotiable —…, Prerequisites (check once, up…, Run directory layout and The loop, plus 2 more sections
  • Runs Shell scripts from its folder; calls git, go and make

What it does

Perf Loop is an agent skill from ozontech/seq-db. Autonomous performance-optimization loop for seq-db driven by seqbazooka. Runs a scenario, collects seq-db profiles + metrics + the latency report, delegates analysis to the perf-analyzer subagent, applies the top optimization itself, re-runs, compares against the baseline, and keeps iterating until it stops improving. Use when the user wants the agent to hunt for and land perf wins on its own. For one-off "analyze these profiles" requests, call the perf-analyzer subagent directly instead.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including scripts (for example `observability/docker-compose.perf.yml`, `observability/prometheus.yml` and `reference/seqbazooka.md`).

It sits in DevOps & Cloud, covering Subagents and Performance optimization. The repository describes itself as: seq-db is a scalable and high-performance database designed for storing and querying logs efficiently. The licence is Apache-2.0.

When your agent uses it

  • The user wants the agent to hunt for and land perf wins on its own
  • Tasks that involve Subagents
  • Tasks that involve Performance optimization

Example prompts

  • “analyze these profiles”
  • “/perf-loop”

Requirements

  • A Bash shell
  • Docker

Workflow steps

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

  1. Pick or confirm the scenario + params with the user's intent (e.g. bulk for
  2. Build a docker image from the current working tree — this is what makes
  3. Run seqbazooka with --bootstrap.image=ghcr.io/ozontech/seq-db:perf-local
  4. This first run is 000-baseline. No analysis-driven change yet.

What it can do on your machine

Read from SKILL.md and the folder at commit 70af159. 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 3 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • go
    • make
    • docker

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

  • Network

    No URLs in SKILL.md. Its commands use git and docker, which can reach the network depending on how they are called.

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Perf Loop loads about 1.6k tokens when it runs. Until then it costs about 126 tokens; SKILL.md has 770 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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 ozontech/seq-db at commit 70af159, republished under its Apache-2.0 licence (© ozontech). 770 words, ~1,579 tokens.

Download SKILL.mdSave it as .claude/skills/perf-loop/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
perf-loop
description
Autonomous performance-optimization loop for seq-db driven by seqbazooka. Runs a scenario, collects seq-db profiles + metrics + the latency report, delegates analysis to the perf-analyzer subagent, applies the top optimization itself, re-runs, compares against the baseline, and keeps iterating until it stops improving. Use when the user wants the agent to hunt for and land perf wins on its own. For one-off "analyze these profiles" requests, call the perf-analyzer subagent directly instead.

perf-loop

Autonomously find and land performance wins in seq-db. You drive the loop and apply fixes yourself; you delegate the heavy profile reading to the perf-analyzer subagent so it stays out of this context. The goal is ideas that measurably help — code churn is expected, so try things, keep what wins, revert what doesn't.

Read reference/seqbazooka.md (bundled with this skill) before the first run — it has the commands, the report schema, and how to pull seq-db metrics/profiles from the observability stack. You compose the seqbazooka command yourself from that reference; there is no wrapper script for it.

Guardrails (non-negotiable — this loop is autonomous)

  • Never run on main. If on main, create and switch to a branch named 0-perf-<label> first. All work happens there.
  • One change per iteration, each its own commit. Land an accepted win as a perf: <what> commit so every idea is visible and revertible. If a change regresses or is neutral, git restore/revert it and record why — do not stack unverified edits.
  • Keep a run log (.perf-loop/log.md) of every iteration: hypothesis, change, measured delta, kept/reverted. This log is the real deliverable.
  • Compare apples to apples. Pin scenario params and --bootstrap.cpu/ --bootstrap.memory for the whole session. Changing the workload invalidates the baseline.

Prerequisites (check once, up front)

  • docker, seqbazooka, go tool pprof, jq, curl available.
  • A bootstrap config env file (key=value, see reference; .seqbench/baseline.env is the default). Ask the user if you can't find one; do not invent seq-db config.
  • Bring up the observability stack and leave it running: .claude/skills/perf-loop/scripts/stack.sh up (Prometheus :9090, Pyroscope :4040). It persists across iterations.
  • Ensure .perf-loop/ is git-ignored (add it to .gitignore if missing) so run artifacts never get committed.

Run directory layout

Each run gets .perf-loop/<NNN>-<label>/ (zero-padded, monotonic) containing: report.json (seqbazooka), the profiles you export from Pyroscope for the run window (cpu.pprof, allocs.pprof, heap.pprof, goroutine.pprof), a window.env (the [from,to] epochs), and meta.json (scenario, all flags, git SHA, image tag). The previous run's dir is the baseline for the next.

The loop

0. Baseline
  1. Pick or confirm the scenario + params with the user's intent (e.g. bulk for write perf, search-regular/search-aggregation for query perf). Default to a bounded --duration (a few minutes) so iterations are tractable.
  2. Build a docker image from the current working tree — this is what makes local edits measurable: VERSION=perf-local make build-image produces ghcr.io/ozontech/seq-db:perf-local. Verify docker image inspect finds it (else testcontainers tries to pull it and fails with manifest unknown).
  3. Run seqbazooka with --bootstrap.image=ghcr.io/ozontech/seq-db:perf-local (§ run mechanics below).
  4. This first run is 000-baseline. No analysis-driven change yet.
Show full SKILL.md (350 more words)Show less
1..N. Iterate

For each iteration:

  1. Analyze. Spawn perf-analyzer (Agent tool, subagent_type: "perf-analyzer") with the paths to the latest run's artifacts and the baseline/previous run's artifacts, plus the scenario. It returns a ranked list of optimization opportunities.
  2. Apply the top viable one yourself — edit the seq-db source. Respect CLAUDE.md/CONTRIBUTING.md (style, "why" comments, reuse over allocation). Keep the change focused; if the analyzer's top idea is risky or speculative, pick the next one it rates high-confidence.
  3. Rebuild the image, re-run the identical scenario into a new run dir.
  4. Compare the new report.json to the previous run's on the metrics that matter for the scenario (write → bulk mean/p(99); search → per-query p(99)/mean, hot and cold). Also diff profiles (go tool pprof -diff_base) to confirm the hotspot actually shrank.
  5. Decide: if it's a real improvement beyond noise, git commit it as perf: … and this run becomes the new baseline. Otherwise revert the edit (run dir stays as evidence) and try the analyzer's next idea.
  6. Append to the run log.
Run mechanics (per run)

The observability stack collects metrics/profiles continuously, so you do not scrape anything mid-run — you just bracket the run with timestamps and pull the window afterwards.

  1. Record FROM=$(date +%s).
  2. Run seqbazooka <cmd> … --bootstrap.image=ghcr.io/ozontech/seq-db:perf-local --bootstrap.network=host --bootstrap.cpu=<C> --bootstrap.memory=<M> --duration=<D> --report.path=<dir>/report.json (compose flags from the reference). Run it in the background and wait for it to finish.
  3. Record TO=$(date +%s) and write <dir>/window.env (FROM/TO/SERVICE=seq-db).
  4. Collect for [FROM,TO] into the run dir: scripts/collect-profiles.sh <run_dir> $FROM $TO (exports cpu/allocs/heap/ goroutine pprof), and scripts/promql.sh $FROM $TO '<promql>' for the metric series you care about. See reference/seqbazooka.md for details.

Stop conditions

Stop and summarize when any holds:

  • No improvement over 2 consecutive iterations (analyzer's remaining ideas are exhausted or don't pan out).
  • A hard cap (default 6 iterations) unless the user set another.
  • Profiles show the scenario is dominated by genuine I/O or already-tight code.
  • The user interrupts.

Final summary

Report: the branch and its perf: commits, per-commit measured delta, total improvement vs 000-baseline, ideas tried-and-reverted (with why), and what to try next. Point to .perf-loop/log.md for the full trail.

© ozontech, Apache-2.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 7 other files (scripts) in .claude/skills/perf-loop of ozontech/seq-db.

  • SKILL.md
  • observability/alloy/config.alloy
  • observability/docker-compose.perf.yml
  • observability/prometheus.yml
  • reference/seqbazooka.md
  • scripts/collect-profiles.sh
  • scripts/promql.sh
  • scripts/stack.sh

Open the folder on GitHubat commit 70af159

Compare with similar skills

Perf Loop 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.

Perf Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Perf Loop this skillozontech/seq-db133—~1.6kAutomated safety check: PassApache-2.0
V2 Perf Iterationmirage-project/mirage2.5k—~4kAutomated safety check: PassApache-2.0
Go Spec Reviewerinference-gateway/inference-gateway214—~1.2kAutomated safety check: PassApache-2.0
Session Profilertamdogood/builder-essential-skills218—~1.5kAutomated safety check: PassMIT
Utility Pm Release Conductorproduct-on-purpose/pm-skills713—~1.6kAutomated safety check: PassApache-2.0
Apex Microsoft Docsjonathan-vella/apex217—~966Automated safety check: PassMIT

Similar skills

  • V2 Perf Iteration

    mirage-project/mirage

    Runtime-V2 performance-iteration workflow. An agent skill from mirage-project/mirage.

    2.5k GitHub stars~4k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Go Spec Reviewer

    inference-gateway/inference-gateway

    Review a Go design spec before implementation begins - dispatch a subagent that checks a design doc for completeness, consistency, and idiomatic Go (simplicity, small consumer-defined interfaces…

    214 GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Session Profiler

    tamdogood/builder-essential-skills

    Profile and debug Hermes sessions from their JSONL transcripts.

    218 GitHub stars~1.5k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Utility Pm Release Conductor

    product-on-purpose/pm-skills

    Walk the guided 6-gate release runbook (G0 readiness, G1 adversarial review, G2 version bump and CHANGELOG, G2.5 commit and re-verify, G3 tag and push, G4 post-tag hygiene) via the…

    713 GitHub stars~1.6k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Apex Microsoft Docs

    jonathan-vella/apex

    ANALYSIS SKILL — Query official Microsoft documentation to understand concepts, find tutorials, and learn how services work.

    217 GitHub stars~966 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Docker Agent Config

    docker/skills

    Official

    A skill your agent uses when creating or editing an agent.yaml (or .yml/.hcl) configuration file for Docker Agent (cagent), including defining agents, models/providers, built-in or MCP toolsets…

    539 GitHub stars~2.5k tokensUpdated 3 days ago
    DevOps & CloudAuto-check: notes

More from ozontech/seq-db

  • Code Navigation

    ozontech/seq-db

    How to navigate and explore Go code in this repo. An agent skill from ozontech/seq-db.

    133 GitHub stars~837 tokensUpdated yesterday
    Auto-check: notes
  • Perf Architect

    ozontech/seq-db

    Design-level performance review for seq-db — proposes data-structure, algorithmic, memory-layout, and architectural alternatives for a hot path, each with reasoning and a validation plan.

    133 GitHub stars~581 tokensUpdated yesterday
    Auto-check passed
  • Code Review

    ozontech/seq-db

    Review the current code changes (branch diff vs main, a commit range, or a PR) for seq-db.

    133 GitHub stars~411 tokensUpdated yesterday
    Auto-check passed
  • Perf Analyze

    ozontech/seq-db

    One-shot profile analysis for seq-db — turns pprof profiles (and optional metrics/report) into a ranked list of concrete, profile-grounded optimization opportunities for the code.

    133 GitHub stars~422 tokensUpdated yesterday
    Auto-check passed

Questions about Perf Loop

What does Perf Loop do?

Autonomous performance-optimization loop for seq-db driven by seqbazooka. Perf Loop is an agent skill from ozontech/seq-db. Autonomous performance-optimization loop for seq-db driven by seqbazooka.

When should I use Perf Loop?

Perf Loop fits situations like: the user wants the agent to hunt for and land perf wins on its own; tasks that involve Subagents; tasks that involve Performance optimization.

How do I install Perf Loop in Claude Code?

Run `npx skills add ozontech/seq-db --skill perf-loop -a claude-code`. Or copy the skill folder (.claude/skills/perf-loop in ozontech/seq-db) into .claude/skills/perf-loop in your project. Claude Code loads it when a task matches its description.

How do I install Perf Loop in Codex?

Run `npx skills add ozontech/seq-db --skill perf-loop -a codex`. Or copy the skill folder (.claude/skills/perf-loop in ozontech/seq-db) into .agents/skills/perf-loop in your project. Codex loads it when a task matches its description.

Can I use Perf Loop 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 ozontech/seq-db --skill perf-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/perf-loop, .gemini/skills/perf-loop, .github/skills/perf-loop and .opencode/skills/perf-loop in your project.

What does Perf Loop need to run?

Going by SKILL.md and its folder, Perf Loop needs a shell for the scripts in its folder and the command-line tools its instructions call (git, go, make and docker). Our summary lists: A Bash shell; Docker.

Does Perf Loop access the network?

SKILL.md contains no URLs. Its commands use git and docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Perf Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. 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 Perf Loop use?

Perf Loop is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Perf Loop use?

About 1.6k tokens (SKILL.md is roughly 6.3k 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 Perf Loop?

Skills that share tags, products or a category with Perf Loop: V2 Perf Iteration (mirage-project/mirage, 2.5k stars), Go Spec Reviewer (inference-gateway/inference-gateway, 214 stars), Session Profiler (tamdogood/builder-essential-skills, 218 stars) and Utility Pm Release Conductor (product-on-purpose/pm-skills, 713 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Perf Loop?

ozontech (a GitHub organization) maintains it in ozontech/seq-db, which has 133 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 6, 2026.

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