testing

A testing workflow for a command-line tool that connects to a website. It covers small isolated tests, real end-to-end checks, and tests that run the tool as a separate program.

In plain words
What is it for?
Writing mocked HTTP tests, live website tests, subprocess tests, and a TEST.md record of the test plan and results.
Why use it?
It helps catch broken requests, command behavior, and installation problems before release, while recording what was tested and what happened.

Skill for Claude CodeCodex

Part of the cli-anything-web-plugin plugin — 6 skills, 6 commands, 4 agents, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/itamarzand88/cli-anything-web/testing
Any agent
npx skills add ItamarZand88/CLI-Anything-WEB --skill testing
Clone the repo
git clone --depth 1 https://github.com/ItamarZand88/CLI-Anything-WEB

Made for: Claude Code, Codex.

Or install cli-anything-web-plugin, the plugin that ships this one along with the rest of its 6 skills, 6 commands, 4 agents, 1 MCP server.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,189 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00055 $0.03189
Opus 5 $0.00028 $0.01595
Sonnet 5 $0.00011 $0.00638
Haiku 4.5 $0.00006 $0.00319

Measured 3d ago against content hash cc65ad951320, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

result = subprocess.run(
cli-anything-web-plugin/skills/testing/SKILL.md · 333 lines

How it starts

The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLI-Anything-Web Testing

Write and document tests for cli-web-* CLIs. This skill owns the full testing lifecycle: test implementation and test documentation (plan + results).

Copy this checklist and check off items as you complete them:

Phase 3 Progress:
- [ ] Prerequisites: implementation complete, CLI installed, <APP>.md exists
- [ ] Auth verified working (auth login + status) — auth CLIs only
- [ ] Unit tests written (mocked HTTP, typed-exception + helper coverage)
- [ ] E2E tests written (live round-trips, FAIL not skip on missing auth)
- [ ] Subprocess tests written (_resolve_cli pattern)
- [ ] TEST.md Part 1 generated (generate-test-docs.py plan)
- [ ] Full suite green incl. CLI_WEB_FORCE_INSTALLED=1 subprocess run
- [ ] TEST.md Part 2 appended (generate-test-docs.py results)
- [ ] phase-state marked complete

Prerequisites (Hard Gate)

Do NOT start unless:

  • Implementation is complete (all core modules + commands exist)
  • pip install -e . succeeds and cli-web-<app> is on PATH
  • <APP>.md exists with API map and auth scheme

If implementation is incomplete, invoke the methodology skill first. If the methodology phase is marked failed in phase-state, follow skills/shared/RECOVERY.md §phase-state Check Failures.


Auth Must Be Working Before E2E Tests

For auth-required sites: run cli-web-<app> auth login then auth status (must show valid). Tests that skip or catch auth errors are broken — use pytest.fail() if auth is missing (CONVENTIONS.md §Auth Rules "Tests"). No-auth sites skip auth setup entirely.


Write Tests

Goal: Comprehensive test suite. Document what you're testing as you write it — TEST.md Part 1 (the plan) is written alongside the test code, not as a separate gate before it.

Testing Layer Strategy

The standard three-layer suite is: unit tests (mocked HTTP) + live E2E tests + subprocess tests. This covers fast correctness, real integration, and installed CLI.

Layer File Purpose
Unit test_core.py Core functions with mocked HTTP. No network. Fast.
E2E live test_e2e.py Real API calls. Require auth — FAIL (not skip) without it.
CLI subprocess test_e2e.py Installed cli-web-<app> via _resolve_cli(). Full end-to-end.
Integration (VCR) test_integration.py Recorded HTTP cassettes via VCR.py. Reproducible, no network. Recommended for RPC protocols.

Read the full file on GitHub · 333 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 333 lines · 55 tokens per session scan A cc65ad951320

Subscribe to this mod's changes

testing is a skill published in the GitHub repository ItamarZand88/CLI-Anything-WEB (216 stars, last pushed 9d ago), licensed MIT. It adds 55 tokens to every session and 3,189 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories