Agent skill

Performance Optimization

by albumentations-team in albumentations-team/AlbumentationsX

Systematic performance audit for AlbumentationsX runtime code.

AGPL-3.0Auto-check passedAI & LLM Engineering

Install Performance Optimization

skills CLI
$ npx skills add albumentations-team/AlbumentationsX --skill performance-optimization -a claude-code

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

GitHub CLI
$ gh skill install albumentations-team/AlbumentationsX performance-optimization --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/albumentations-team/AlbumentationsX.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/performance-optimization .claude/skills/performance-optimization && 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
performance-optimization
GitHub stars
566
Token cost
~1.7k tokens
SKILL.md length
777 words
Files
3 (incl. references)
Skills in repo
10
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Systematic performance audit for AlbumentationsX runtime code.

  • Works in 7 steps: Establish correctness and performance… → Run every stage of the guide's… → Treat every backend, vectorization, LUT,… → …
  • Optimizing transforms
  • SKILL.md covers Workflow, Torch Runtime Contract, Compose Execution Changes and AlbumentationsX Boundary, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Performance Optimization is an agent skill from albumentations-team/AlbumentationsX. Systematic performance audit for AlbumentationsX runtime code. Use whenever implementing, reviewing, profiling, or optimizing transforms, functional kernels, apply methods, random generation, reductions, label maps, dtype conversions, batch paths, allocation-heavy code, backend routing, or code that may belong in Albucore.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `agents/openai.yaml` and `references/performance-optimization.md`).

It sits in AI & LLM Engineering, covering Performance optimization, Computer vision and Deep learning. The repository describes itself as: Image augmentation for computer vision. AGPL-3.0-only or commercial licensing. The licence is AGPL-3.0.

When your agent uses it

  • Optimizing transforms
  • Functional kernels
  • Random generation
  • Dtype conversions

Example prompts

  • “/performance-optimization”

Workflow steps

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

  1. Establish correctness and performance baselines before editing.
  2. Run every stage of the guide's optimization pass. Do not stop after finding the first plausible improvement.
  3. Treat every backend, vectorization, LUT, random-generation, bincount, and in-place proposal as a benchmark
  4. Check the repository boundary. Move a reusable image-processing atom into Albucore instead of duplicating it in
  5. Read ../benchmark/SKILL.md completely and benchmark both the isolated kernel and the Compose route on its
  6. Add correctness tests before accepting a faster path. Preserve shapes, dtypes, values, annotations, aliasing, and
  7. Run the project validation workflow after the final implementation.

What it can do on your machine

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

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    No URLs in SKILL.md.

    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

Performance Optimization loads about 1.7k tokens when it runs, and up to ~5.6k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 777 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.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); files beside SKILL.md are not scanned.

SKILL.md

The full file from albumentations-team/AlbumentationsX at commit 5a5a49e, republished under its AGPL-3.0 licence (© albumentations-team). 777 words, ~1,654 tokens.

Download SKILL.mdSave it as .claude/skills/performance-optimization/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
performance-optimization
description
Systematic performance audit for AlbumentationsX runtime code. Use whenever implementing, reviewing, profiling, or optimizing transforms, functional kernels, apply methods, random generation, reductions, label maps, dtype conversions, batch paths, allocation-heavy code, backend routing, or code that may belong in Albucore.

Performance Optimization

Read references/performance-optimization.md completely before inspecting or changing runtime code. It is the in-repository fallback copy of Albucore's canonical docs/performance-optimization.md, so the guide remains available when the Albucore checkout is absent.

When changing the guide, update the canonical Albucore document first and keep the bundled copy synchronized. When both repositories are available, verify exact synchronization with cmp -s ../albucore/docs/performance-optimization.md .codex/skills/performance-optimization/references/performance-optimization.md. A mismatch blocks completion.

Workflow

  1. Establish correctness and performance baselines before editing.
  2. Run every stage of the guide's optimization pass. Do not stop after finding the first plausible improvement.
  3. Treat every backend, vectorization, LUT, random-generation, bincount, and in-place proposal as a benchmark hypothesis.
  4. Check the repository boundary. Move a reusable image-processing atom into Albucore instead of duplicating it in transforms.
  5. Read ../benchmark/SKILL.md completely and benchmark both the isolated kernel and the Compose route on its required size, channel, and dtype matrix.
  6. Add correctness tests before accepting a faster path. Preserve shapes, dtypes, values, annotations, aliasing, and seeded-replay contracts unless the change explicitly documents a compatibility break.
  7. Run the project validation workflow after the final implementation.

Torch Runtime Contract

Torch is already an externally managed, soft-required AlbumentationsX runtime dependency: package metadata does not select a CPU, CUDA, or MPS build, but importing albumentations requires an installed Torch runtime. Do not reject a Torch-backed implementation on the grounds that it would introduce a new runtime dependency. Benchmark the complete route, including NumPy/Tensor bridges, layout conversions, allocations, and return conversion.

Compose Execution Changes

For composition.py, transforms_interface.py, or invocation-state work, keep configured graph policy separate from per-call state. Sampled parameters, applied records, processor sessions, Tensor bridge metadata, grayscale repair, and instance-binding bookkeeping belong to InvocationContext; a configured transform or Compose must not become a mailbox for any of them.

  • Reserve a default DataLoader seed only at the root. The reservation lock may cover the counter and configured RNG source; array conversion, preprocessing, transform execution, tracing, and finalization must remain outside it.
  • Preserve one root prepare/finalize boundary. Nested Compose nodes run focused additional-target and shape checks without opening a second processor, grayscale, Tensor, or restoration boundary.
  • Keep BaseCompose._apply_child() as the sole configured-graph dispatcher. run_with_trace() may attach an invocation-local observer, but it must not introduce a second node-selection or execution traversal.
  • Schedule bbox/keypoint filtering from declared target effects. Image-only nodes must not pay for shape discovery, clipping, filtering, or instance re-alignment; a final conversion must not repeat a filter already current for the invocation.
  • Optimize repeated application before construction. Compose.__init__() may compile the graph and eagerly prepare root-owned execution state when that removes work from the per-sample path. Report construction cost only as context; do not reject a call-time speedup because pipeline construction becomes slower.
  • Keep invocation_seed sample-keyed and side-effect free with respect to the worker stream.
  • Measure root skip, no-op, probabilistic no-op, always-applied cheap transform, applied-configuration capture, trace, Tensor, processor, and concurrent-call routes. Include the complete before/after cells in the handoff.
  • Exercise tests/test_compose_reentrancy.py, tests/test_per_worker_seed.py, tests/test_composition_tracing.py, and the affected Tensor, processor, replay, and instance-binding suites.
Show full SKILL.md (280 more words)Show less

AlbumentationsX Boundary

Keep transform policy, parameter sampling, target dispatch, and annotation semantics in AlbumentationsX.

Keep transform apply* methods as thin policy and dispatch methods. A method may validate its transform-specific runtime input contract, select a functional operation, and forward sampled parameters, but pixel arithmetic, temporary-array construction, clipping, dtype routing, and kernel-selection branches belong in the functional helper that owns the operation. The deterministic source contract is checked by the repository's unified AX guidance hook; keep its exact limits and exceptions in docs/contributing/coding_guidelines.md.

Propose an Albucore primitive when an operation:

  • is useful to more than one transform or image-processing caller;
  • has stable array semantics independent of transform policy;
  • benefits from dtype, channel, contiguity, or backend routing;
  • can be tested and benchmarked as an atomic operation.

Do not create a local helper merely to avoid coordinating an Albucore change when the operation satisfies these conditions.

If investigation identifies an Albucore defect, pause AlbumentationsX changes and open an Albucore Issue and PR before resuming.

Do not add a forwarding wrapper around a one-line call merely to attach a decorator. Use @clipped when every route of an image operation can leave the public range; branch and call albucore.clip(..., inplace=True) when only a known float32 mode (such as cubic interpolation) can. A separate function is justified only when it owns a real image operation and keeps that image policy distinct from masks or annotations.

Required Handoff

Report:

  • work deleted or avoided;
  • full-array passes, copies, conversions, and allocations removed;
  • vectorization and grouped-reduction candidates evaluated;
  • LUT, random-generator, and backend candidates compared;
  • safe in-place opportunities taken or rejected with a reason;
  • operations moved or proposed for Albucore;
  • correctness evidence and benchmark matrix;
  • regressions, compatibility changes, and rejected candidates.

© albumentations-team, 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 2 other files (references) in .codex/skills/performance-optimization of albumentations-team/AlbumentationsX.

  • SKILL.md
  • agents/openai.yaml
  • references/performance-optimization.md

Open the folder on GitHubat commit 5a5a49e

Compare with similar skills

Performance Optimization 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.

Performance Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Performance Optimization this skillalbumentations-team/AlbumentationsX566—~1.7kAutomated safety check: PassAGPL-3.0
The Art of Debuggingstas00/the-art-of-debugging1.7k—~6.1kAutomated safety check: NotesCC-BY-SA-4.0
Image Matcher IntegrationVincentqyw/image-matching-webui1.3k—~4.8kAutomated safety check: PassApache-2.0
Torch Performance Optimizationalbumentations-team/albucore123—~895Automated safety check: PassMIT
Tracelens Analysis Orchestratoramd/skills395—~760Automated safety check: PassMIT
Profile Trainingmarin-community/marin3.9k—~2.5kAutomated safety check: PassApache-2.0

Similar skills

  • The Art of Debugging

    stas00/the-art-of-debugging

    Condensed debugging method and tool recipes for Unix, Python and PyTorch programs: crashes, hangs, segfaults, wrong output, CUDA OOM, NaN values and slowness.

    1.7k GitHub stars~6.1k tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Image Matcher Integration

    Vincentqyw/image-matching-webui

    Adds a new local feature matching model from a GitHub repository to the image-matching-webui project as a working WebUI option.

    1.3k GitHub stars~4.8k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Torch Performance Optimization

    albumentations-team/albucore

    Optimize or review eager CPU-only Albucore PyTorch runtime paths with benchmark-backed decisions.

    123 GitHub stars~895 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Orchestrates modular PyTorch profiler trace analysis with TraceLens: generates perf reports, prepares category data, runs system-level and compute-kernel subagents in parallel, validates outputs…

    395 GitHub stars~760 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Profile Training

    marin-community/marin

    Profile a named JAX, Levanter, or Marin run, or investigate a measured startup, compilation, initialization, or throughput bottleneck.

    3.9k GitHub stars~2.5k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Segment Anything Model Guide

    Orchestra-Research/AI-Research-SKILLs

    Guide to using Meta's Segment Anything Model for zero-shot image segmentation with point, box or mask prompts, or automatic mask generation.

    13k GitHub starsUsed in 9 repos~3.3k tokens
    AI & LLM EngineeringAuto-check passed

More from albumentations-team/AlbumentationsX

All 10 skills in this repo
  • Mixing Transforms

    albumentations-team/AlbumentationsX

    Policy for AlbumentationsX transforms that combine multiple images or objects.

    566 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Release Notes

    albumentations-team/AlbumentationsX

    Generate release notes for AlbumentationsX. An agent skill from albumentations-team/AlbumentationsX.

    566 GitHub stars~685 tokensUpdated today
    Auto-check passed
  • Add Transform

    albumentations-team/AlbumentationsX

    Full checklist for adding a new transform to AlbumentationsX.

    566 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Docstring Deep Dive

    albumentations-team/AlbumentationsX

    Review public AlbumentationsX docstrings for useful descriptions, runnable examples, parameter semantics, and related transforms.

    566 GitHub stars~534 tokensUpdated today
    Auto-check passed
  • License Integrity

    albumentations-team/AlbumentationsX

    Maintain AlbumentationsX license, CLA, provenance notices, and packaged legal artifacts consistently.

    566 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Validate And Fix

    albumentations-team/AlbumentationsX

    After completing code changes, runs tests and pre-commit, then iteratively fixes failures until all pass.

    566 GitHub stars~847 tokensUpdated today
    Auto-check passed

Questions about Performance Optimization

What does Performance Optimization do?

Systematic performance audit for AlbumentationsX runtime code. Performance Optimization is an agent skill from albumentations-team/AlbumentationsX. Systematic performance audit for AlbumentationsX runtime code.

When should I use Performance Optimization?

Performance Optimization fits situations like: optimizing transforms; functional kernels; random generation; dtype conversions.

How do I install Performance Optimization in Claude Code?

Run `npx skills add albumentations-team/AlbumentationsX --skill performance-optimization -a claude-code`. Or copy the skill folder (.codex/skills/performance-optimization in albumentations-team/AlbumentationsX) into .claude/skills/performance-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Performance Optimization in Codex?

Run `npx skills add albumentations-team/AlbumentationsX --skill performance-optimization -a codex`. Or copy the skill folder (.codex/skills/performance-optimization in albumentations-team/AlbumentationsX) into .agents/skills/performance-optimization in your project. Codex loads it when a task matches its description.

Can I use Performance Optimization 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 albumentations-team/AlbumentationsX --skill performance-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/performance-optimization, .gemini/skills/performance-optimization, .github/skills/performance-optimization and .opencode/skills/performance-optimization in your project.

What does Performance Optimization need to run?

SKILL.md names no scripts, command-line tools or credentials: Performance Optimization is instructions for the agent only.

Does Performance Optimization access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Performance Optimization 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. Review the folder before installing.

What licence does Performance Optimization use?

Performance Optimization 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 Performance Optimization use?

About 1.7k tokens (SKILL.md is roughly 6.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4k tokens, read only when the agent opens those files.

What are the alternatives to Performance Optimization?

Skills that share tags, products or a category with Performance Optimization: The Art of Debugging (stas00/the-art-of-debugging, 1.7k stars), Image Matcher Integration (Vincentqyw/image-matching-webui, 1.3k stars), Torch Performance Optimization (albumentations-team/albucore, 123 stars) and Tracelens Analysis Orchestrator (amd/skills, 395 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Performance Optimization?

albumentations-team (a GitHub organization) maintains it in albumentations-team/AlbumentationsX, which has 566 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 7, 2026.

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