Agent skill

Optest

by PyLops in PyLops/pylops

Raise a PyLops operator's test coverage above a threshold (default 90%) by adding or modifying tests.

LGPL-3.0Auto-check passedTesting & QA

Install Optest

skills CLI
$ npx skills add PyLops/pylops --skill optest -a claude-code

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

GitHub CLI
$ gh skill install PyLops/pylops optest --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/PyLops/pylops.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/optest .claude/skills/optest && 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
optest
GitHub stars
539
Token cost
~729 tokens
SKILL.md length
341 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
LGPL-3.0

At a glance

Raise a PyLops operator's test coverage above a threshold (default 90%) by adding or modifying tests.

  • Works in 7 steps: Locate the operator. Find the source… → Measure baseline coverage for this… → Inspect the uncovered lines in the… → …
  • The user asks to improve/raise/check test coverage for a specific PyLops operator class (e.g
  • Calls make and python3
  • Tasks that involve Test coverage

What it does

Optest is an agent skill from PyLops/pylops. Raise a PyLops operator's test coverage above a threshold (default 90%) by adding or modifying tests. Use when the user asks to improve/raise/check test coverage for a specific PyLops operator class (e.g. "get FirstDerivative to 95% coverage", "improve test coverage for FFT").

Its SKILL.md is about 730 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Test coverage. It works with Python. The repository describes itself as: PyLops – A Linear-Operator Library for Python. The licence is LGPL-3.0.

When your agent uses it

  • The user asks to improve/raise/check test coverage for a specific PyLops operator class (e.g
  • Tasks that involve Test coverage

Example prompts

  • “get FirstDerivative to 95% coverage”
  • “improve test coverage for FFT”
  • “/optest”

Requirements

  • Python 3

Workflow steps

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

  1. Locate the operator. Find the source module that defines class
  2. Measure baseline coverage for this operator only
  3. Inspect the uncovered lines in the source module. For each missing line,
  4. Add or modify tests in the existing pytests/test_*.py file for this
  5. Re-run .pi/tools/operator_coverage.sh and iterate steps 3–4
  6. Validate the new tests actually pass and lint cleanly
  7. Report a short summary: starting %, final %, which test functions were

What it can do on your machine

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

    Shell commands in SKILL.md call:

    • make
    • python3

    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

Optest loads about 729 tokens when it runs. Until then it costs about 71 tokens; SKILL.md has 341 words of instructions outside code blocks.

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

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 PyLops/pylops at commit 2f06397, republished under its LGPL-3.0 licence (© PyLops). 341 words, ~729 tokens.

Download SKILL.mdSave it as .claude/skills/optest/SKILL.md (or your agent's skills folder).
name
optest
description
Raise a PyLops operator's test coverage above a threshold (default 90%) by adding or modifying tests. Use when the user asks to improve/raise/check test coverage for a specific PyLops operator class (e.g. "get FirstDerivative to 95% coverage", "improve test coverage for FFT").

Goal: bring test coverage for a given PyLops operator class to at least a target percentage (default 90%).

Expect the invocation to include an operator class name (e.g. FirstDerivative, FFT) and optionally a target percentage. If the operator name is missing, ask for it before proceeding.

Follow this workflow precisely:

  1. Locate the operator. Find the source module that defines class <Operator> (e.g. grep -rln "^class <Operator>\b" pylops/) and the test file(s) that already exercise it (grep -rln "<Operator>" pytests/).

  2. Measure baseline coverage for this operator only:

    bash
    .pi/tools/operator_coverage.sh <Operator>

    Read the reported percentage and the list of missing line numbers.

  3. Inspect the uncovered lines in the source module. For each missing line, identify what behaviour is untested: alternate dtypes, branches (e.g. kind/edge/order options), error paths (raise/NotImplementedError), adjoint vs forward, ND vs 1D, backend dispatch, etc.

  4. Add or modify tests in the existing pytests/test_*.py file for this operator. Match the repo's conventions:

    • Parametrize with @pytest.mark.parametrize over par dicts and dtype.
    • Always include a dottest(...) adjoint check for new configurations.
    • Use assert_array_almost_equal for forward/inverse comparisons.
    • Keep the CuPy/backend guard pattern used at the top of the test file. Do NOT weaken assertions or add trivial no-op tests just to hit lines.
  5. Re-run .pi/tools/operator_coverage.sh <Operator> and iterate steps 3–4 until COVERAGE_PCT >= <target>. If some lines are genuinely untestable on the current backend (e.g. CUDA-only paths), say so explicitly and exclude them from the target with justification rather than faking coverage.

  6. Validate the new tests actually pass and lint cleanly:

    bash
    make lint

    (run the relevant pytest file directly if a full make tests is too slow).

  7. Report a short summary: starting %, final %, which test functions were added/changed, and any lines deliberately left uncovered with the reason.

The coverage-measurement tool lives at .pi/tools/operator_coverage.sh (repo root, two levels up from the script's own location) — it locates the operator's source module, runs pytest scoped to it, and prints coverage % plus missing line numbers. Usage: .pi/tools/operator_coverage.sh <OperatorName> [extra pytest args...]. Runner selection: $RUNNER env var, else uv run if uv is on PATH, else python3 -m coverage.

© PyLops, LGPL-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

Just SKILL.md in .claude/skills/optest of PyLops/pylops.

Open the folder on GitHubat commit 2f06397

Compare with similar skills

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

Optest compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Optest this skillPyLops/pylops539—~729Automated safety check: PassLGPL-3.0
Find Untested Sourcesdotnet/skills5.6k1 repos~3.3kAutomated safety check: PassMIT
Test Coverage Reviewareed1192/finance-news-aggregator149—~2.6kAutomated safety check: PassMIT
Supercovsupercorp-ai/supercov1501 repos~415Automated safety check: PassMIT
Review OpCVCUDA/CV-CUDA2.7k—~481Automated safety check: PassCustom licence
Supercov Securitysupercorp-ai/supercov1501 repos~236Automated safety check: PassMIT

Similar skills

  • Official

    Statically pairs source files with test files to list code that no test references, using Roslyn for C# or tree-sitter for many languages, with no build.

    5.6k GitHub starsUsed in 1 repo~3.3k tokens
    Testing & QAAuto-check passed
  • Test Coverage Review

    areed1192/finance-news-aggregator

    Audit, plan, write, and verify unit tests for Python projects using pytest.

    149 GitHub stars~2.6k tokensUpdated 5 mo ago
    Testing & QAAuto-check passed
  • Supercov

    supercorp-ai/supercov

    Measures test coverage and code quality in a repository with the supercov CLI, and turns what it finds into small, focused tests or fixes.

    150 GitHub starsUsed in 1 repo~415 tokens
    Testing & QAAuto-check passed
  • Review Op

    CVCUDA/CV-CUDA

    Review a CV-CUDA operator end-to-end (support / test / bench / docs coverage).

    2.7k GitHub stars~481 tokensUpdated 21 days ago
    Testing & QAAuto-check passed
  • Supercov Security

    supercorp-ai/supercov

    Scans a repository's source for security vulnerabilities with the supercov CLI, pointing to the line of each finding and mapping it to CWE classes.

    150 GitHub starsUsed in 1 repo~236 tokens
    Testing & QAAuto-check passed
  • Test Coverage Improver

    openai/openai-agents-python

    Official

    Measure Python SDK coverage or address measured coverage gaps.

    30k GitHub stars~687 tokensUpdated today
    Testing & QAAuto-check passed

More from PyLops/pylops

  • Newop

    PyLops/pylops

    Create a new PyLops linear operator following docs/source/adding.rst - class file, docstring, tests, docs entry and example.

    539 GitHub stars~1.6k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Optest

What does Optest do?

Raise a PyLops operator's test coverage above a threshold (default 90%) by adding or modifying tests. Optest is an agent skill from PyLops/pylops. Raise a PyLops operator's test coverage above a threshold (default 90%) by adding or modifying tests.

When should I use Optest?

Optest fits situations like: the user asks to improve/raise/check test coverage for a specific PyLops operator class (e.g; tasks that involve Test coverage.

How do I install Optest in Claude Code?

Run `npx skills add PyLops/pylops --skill optest -a claude-code`. Or copy the skill folder (.claude/skills/optest in PyLops/pylops) into .claude/skills/optest in your project. Claude Code loads it when a task matches its description.

How do I install Optest in Codex?

Run `npx skills add PyLops/pylops --skill optest -a codex`. Or copy the skill folder (.claude/skills/optest in PyLops/pylops) into .agents/skills/optest in your project. Codex loads it when a task matches its description.

Can I use Optest 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 PyLops/pylops --skill optest -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/optest, .gemini/skills/optest, .github/skills/optest and .opencode/skills/optest in your project.

What does Optest need to run?

Going by SKILL.md and its folder, Optest needs the command-line tools its instructions call (make and python3). Our summary lists: Python 3.

Does Optest 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 Optest 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 Optest use?

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

How many tokens does Optest use?

About 729 tokens (SKILL.md is roughly 2.9k 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 Optest?

Skills that share tags, products or a category with Optest: Find Untested Sources (dotnet/skills, 5.6k stars), Test Coverage Review (areed1192/finance-news-aggregator, 149 stars), Supercov (supercorp-ai/supercov, 150 stars) and Review Op (CVCUDA/CV-CUDA, 2.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Optest?

PyLops (a GitHub organization) maintains it in PyLops/pylops, which has 539 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 7, 2026.

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