Agent skill

Lens Testing

by dyedd in dyedd/lens

A skill your agent uses when a Lens change needs backend HTTP contract coverage.

MITAuto-check passedAI & LLM Engineering

Install Lens Testing

skills CLI
$ npx skills add dyedd/lens --skill lens-testing -a claude-code

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

GitHub CLI
$ gh skill install dyedd/lens lens-testing --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/dyedd/lens.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/lens-testing .claude/skills/lens-testing && 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
lens-testing
GitHub stars
132
Token cost
~1.1k tokens
SKILL.md length
582 words
Files
2
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when a Lens change needs backend HTTP contract coverage.

  • Works in 5 steps: Trace the affected HTTP path and decide… → Reuse the nearest area file under… → If coverage is justified, add the… → …
  • A Lens change needs backend HTTP contract coverage
  • SKILL.md covers Scope, Workflow, Conventions and Commands
  • Calls uv and pnpm

What it does

Lens Testing is an agent skill from dyedd/lens. Use when a Lens change needs backend HTTP contract coverage. Keep tests risk-based, drive them through the API fixtures, and use the repository's uv-managed checks.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in AI & LLM Engineering. The repository describes itself as: 专为个人打造的轻量 LLM API 网关,统一管理多协议、多供应商,支持 Claude Code, Codex, OpenCode, OpenClaw, Grok Build, Hermes Agent、Pi 等 harness 调用,兼容… The licence is MIT.

When your agent uses it

  • A Lens change needs backend HTTP contract coverage

Example prompts

  • “/lens-testing”

Requirements

  • Python 3

Workflow steps

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

  1. Trace the affected HTTP path and decide whether it is a contract worth protecting.
  2. Reuse the nearest area file under backend/tests/api/, plus fixtures and helpers in backend/tests/conftest.py.
  3. If coverage is justified, add the smallest request-and-response behavior test.
  4. Format touched files and run the smallest relevant check. For backend contract changes, run the API suite in parallel; narrow to one file…
  5. Run frontend lint, type check, or build only when frontend files or the requested verification require them; CI remains the full…

What it can do on your machine

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

    • uv
    • pnpm

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

  • Network

    No URLs in SKILL.md. Its commands use uv and pnpm, 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

Lens Testing loads about 1.1k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 582 words of instructions outside code blocks.

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

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 dyedd/lens at commit 22fcd17, republished under its MIT licence (© dyedd). 582 words, ~1,103 tokens.

Download SKILL.mdSave it as .claude/skills/lens-testing/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
lens-testing
description
Use when a Lens change needs backend HTTP contract coverage. Keep tests risk-based, drive them through the API fixtures, and use the repository's uv-managed checks.

Lens Testing

Scope

Cover only critical, high-risk backend HTTP contracts: authentication and authorization, data persistence or loss, gateway protocol compatibility, and routing or failover behavior. A new route or reproducible bug alone does not justify a test; the affected HTTP contract must warrant the coverage.

Do not automatically add frontend tests or direct tests of units, services, helpers, converters, or repositories. Follow explicit user instructions when they change the scope.

Delete a test once the behavior it guarded is covered elsewhere, or once the field or option it pinned has been removed or derived.

Workflow

  1. Trace the affected HTTP path and decide whether it is a contract worth protecting.
  2. Reuse the nearest area file under backend/tests/api/, plus fixtures and helpers in backend/tests/conftest.py.
  3. If coverage is justified, add the smallest request-and-response behavior test.
  4. Format touched files and run the smallest relevant check. For backend contract changes, run the API suite in parallel; narrow to one file only while debugging.
  5. Run frontend lint, type check, or build only when frontend files or the requested verification require them; CI remains the full repository check.

Conventions

One file per area, named backend/tests/api/test_<area>_api.py. Name each test after the behavior it asserts, and separate arrange, act, and assert with blank lines.

  • Drive every test through the client fixture. A test that bypasses HTTP, by calling a service function directly or by hand-building a Request, is testing an implementation detail.
  • Build state through the admin API with the shared fixtures admin_headers, create_site, create_model_group, create_gateway_key, and create_site_group_and_key. Import helpers with from conftest import ...: valid_site_payload, gateway_headers, openai_chat_channel_id, seed_request_log, assert_error, and json_response.
  • Stub only at the network edge, by monkeypatching proxy_upstream._send_upstream or by injecting an httpx.MockTransport client, so the gateway path under test still runs end to end. Never monkeypatch the function under test and then assert on its own return value.
  • Assert one invariant per test, and express variants with pytest.mark.parametrize and pytest.param(..., id=...) rather than copied test bodies. For schema rejection cases, parametrize a mutator that edits an otherwise valid payload.
  • Assert only what the HTTP contract promises. Response item order is not a contract unless the endpoint documents it; compare sorted values or sets instead.
  • For protocol and streaming coverage, keep the upstream frames literal in the test, then assert both the converted client-visible body and the persisted request log.
  • Do not restate what the framework already guarantees. Request and backup models inherit StrictBaseModel(extra="forbid"), so one representative case per schema family covers rejected extra fields and missing required fields; do not add a case per field.
  • Do not write per-endpoint 401 tests. test_every_admin_route_rejects_missing_token walks app.routes and covers the whole admin surface; when a new admin route is intentionally public, add it to _UNAUTHENTICATED_ADMIN_ROUTES in the same change.
Show full SKILL.md (127 more words)Show less

Commands

Call every backend tool through uv run --no-sync from the repository root, so it comes from the dev dependency group instead of a global install.

  • Format and lint touched files: uv run --no-sync ruff format <paths> then uv run --no-sync ruff check --fix <paths>
  • Backend suite: uv run --no-sync python -m pytest backend/tests/api -q --confcutdir=backend/tests -n auto --dist worksteal
  • One file, while debugging: uv run --no-sync python -m pytest backend/tests/api/test_<area>_api.py -q --confcutdir=backend/tests
  • Frontend checks, from frontend/: pnpm lint, pnpm exec tsc --noEmit, and pnpm build

pytest-xdist and ruff ship in the dev dependency group; install them with uv sync --locked. With a package index mirror configured, --locked misreports lockfile drift, so use uv sync --frozen.

Do not add another test runner or a custom parallel harness.

© dyedd, MIT. 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 in .agents/skills/lens-testing of dyedd/lens.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 22fcd17

Compare with similar skills

Lens Testing 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.

Lens Testing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lens Testing this skilldyedd/lens132—~1.1kAutomated safety check: PassMIT
Agent BuildershareAI-lab/learn-claude-code78k4 repos~1.2kAutomated safety check: PassMIT
Add Uint Supportpytorch/pytorch104k2 repos~2.3kAutomated safety check: PassCustom licence
LLM Benchmarking with lm-evaluation-harnessOrchestra-Research/AI-Research-SKILLs13k8 repos~3kAutomated safety check: PassMIT
Segment Anything Model GuideOrchestra-Research/AI-Research-SKILLs13k8 repos~3.3kAutomated safety check: PassMIT
1passwordtrpc-group/trpc-agent-go1.9k14 repos~656Automated safety check: PassApache-2.0

Similar skills

  • Agent Builder

    shareAI-lab/learn-claude-code

    Design and build AI agents for any domain. An agent skill from shareAI-lab/learn-claude-code.

    78k GitHub starsUsed in 4 repos~1.2k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Uint Support

    pytorch/pytorch

    Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.

    104k GitHub starsUsed in 2 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • LLM Benchmarking with lm-evaluation-harness

    Orchestra-Research/AI-Research-SKILLs

    Runs lm-evaluation-harness to benchmark language models on academic suites such as MMLU, GSM8K and HumanEval, compare models and track training checkpoints.

    13k GitHub starsUsed in 8 repos~3k tokens
    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 8 repos~3.3k tokens
    AI & LLM EngineeringAuto-check passed
  • 1password

    trpc-group/trpc-agent-go

    Set up and use 1Password CLI (op). An agent skill from trpc-group/trpc-agent-go.

    1.9k GitHub starsUsed in 14 repos~656 tokens
    AI & LLM EngineeringAuto-check passed
  • Planning With Files

    jarrodwatts/claude-code-config

    Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage.

    1.1k GitHub starsUsed in 5 repos~967 tokens
    AI & LLM EngineeringAuto-check passed

Questions about Lens Testing

What does Lens Testing do?

A skill your agent uses when a Lens change needs backend HTTP contract coverage. Lens Testing is an agent skill from dyedd/lens. Use when a Lens change needs backend HTTP contract coverage.

When should I use Lens Testing?

Lens Testing fits situations like: A Lens change needs backend HTTP contract coverage.

How do I install Lens Testing in Claude Code?

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

How do I install Lens Testing in Codex?

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

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

What does Lens Testing need to run?

Going by SKILL.md and its folder, Lens Testing needs the command-line tools its instructions call (uv and pnpm). Our summary lists: Python 3.

Does Lens Testing access the network?

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

Is Lens Testing 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 Lens Testing use?

Lens Testing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lens Testing use?

About 1.1k tokens (SKILL.md is roughly 4.4k 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 Lens Testing?

Skills that share tags, products or a category with Lens Testing: Agent Builder (shareAI-lab/learn-claude-code, 78k stars), Add Uint Support (pytorch/pytorch, 104k stars), LLM Benchmarking with lm-evaluation-harness (Orchestra-Research/AI-Research-SKILLs, 13k stars) and Segment Anything Model Guide (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lens Testing?

dyedd (a GitHub user) maintains it in dyedd/lens, which has 132 GitHub stars. The repository was last updated on October 10, 2026.

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