Contributed Skills Api Test Impact Advisor
ASecurityDecide WHETHER and WHAT API tests a change needs — before any test is written. Use when a change lands (a Rally card/story/defect ID, a PR, or a described change to an API) and you need the test impact: which existing tests to UPDATE, what new tests to ADD, what's already covered by regression (NO-TEST), and what shouldn't be tested at all. Produces a risk-ranked coverage-decision memo by comparing the change's blast area against existing repo test coverage. It decides and seeds scenarios; it...
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added December 3, 2026
Works with
Security analysis
100/100Pro scans all 2 files and shows the line behind each finding
npx -y skills add StevenJV/tools --skill contributed-skills-api-test-impact-advisor --agent claude-codeAre you the author of Contributed Skills Api Test Impact Advisor?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/stevenjv-contributed-skills-api-test-impact-advisor)---
name: scope-api-test-coverage
description: |
Decide WHETHER and WHAT API tests a change needs — before any test is written. Use when a
change lands (a Rally card/story/defect ID, a PR, or a described change to an API) and you
need the test impact: which existing tests to UPDATE, what new tests to ADD, what's already
covered by regression (NO-TEST), and what shouldn't be tested at all. Produces a risk-ranked
coverage-decision memo by comparing the change's blast area against existing repo test
coverage. It decides and seeds scenarios; it does not write full test code.
Triggers: "what should I test for US12345", "do we need new/updated tests for this change",
"scope the test coverage for this PR", "what's the test impact of this card", "is this
already covered", "what's worth testing here".
---
# scope-api-test-coverage
Given a change, produce a **coverage-decision memo**: per slice of the change's blast area,
decide **UPDATE / ADD / NO-TEST / documented-no-test**, risk-ranked. The hand-off (the
ADD/UPDATE items) is what a scenario-design step later turns into full tests.
## Operating principles (these are the non-obvious part — internalize them)
1. **Regression always runs.** Assume every change triggers a regression run (scoped or full).
So your job is the **uncovered delta**, not the whole blast area. Never propose a test that
just re-covers what regression already holds.
2. **Know when NOT to test.** Triage first. If the change isn't a caller-facing API behavior
change, decline and route it (see Step 0). Manufacturing scenarios for a thing that isn't
this skill's job is a failure, not thoroughness.
3. **Test what the caller can force.** Only propose a test whose trigger condition is
reachable through inputs the caller controls — headers, body, URL, auth/token/scope. A
downstream 4xx you can induce with bad data is fair game; a downstream 500 or internal
failure you can't summon is not — that's a *documented no-test*, not a scenario.
4. **Presence ≠ coverage.** A test touching an endpoint is not coverage. Judge **adequacy**:
does it assert the real outcome with an **independent oracle**? And coverage is
**operation-specific** — a field tested on UPDATE is NOT covered on CREATE.
5. **Under-claim.** Never declare "covered" you haven't verified by reading the test. If you
can't read the tests, say so and produce *candidates* (see Degraded mode). A skill that
green-lights falsely is worse than one that admits uncertainty.
6. **Separate intended behavior from current-state claims.** The **AC / behavioral spec says
what *should* happen — it's what you test *for*.** Treat it as the source of intent, not a
hypothesis (and as the team moves to Spec-Driven Development, the prescriptive spec becomes
*more* authoritative for intent, not less). What you DO verify against reality are
*current-state* claims: the **OpenAPI/Swagger descriptive spec** can drift from what the
service actually does today (confirm mechanics against the running service); a claim that
**a test already covers something** — including an AC bullet asserting prior coverage — must
be checked against the actual **test code** (the repo is truth about *coverage*); **convention
docs (CLAUDE.md)** can be stale. Scrutinize the AC only for **testability** (observable,
caller-forceable, unambiguous) — never for whether its intent is trustworthy.
7. **Fetch, don't guess — and don't ask what a grep answers.** If you don't have the spec, the
test repo, or knowledge of the change's internal flows, ASK — don't assume. But only ask what
reading the code can't resolve (see "Trace before you ask" in Step 1).
## Inputs
- **The change** — a Rally ID (fetch via the Rally MCP `getRallyItem`, traverse the
hierarchy for context), a PR, or a description.
- **The test repo location** — check whether the conversation already established it; if not,
**ask for the path/identifier as a plain free-text question** (e.g. "What's the path or
org/repo for the tests?"). Do NOT put the location in a multiple-choice / pick-list prompt —
a pick-list can come back as "give me the path" without the actual path, forcing a second
round-trip. Other facts (auth needed? payloads reproducible?) can be multiple-choice; the
location itself must be free text. Handle any layout: one big QA monorepo, repo-per-service,
or tests colocated in the dev repo.
- **Lifecycle stage** — where the change is: pre-development, in a branch, merged but not yet
verified, or verified in a lower environment and pending promotion (e.g. INT5 → UAT). Ask, or
infer it (see Step 0).
- **Optional:** the OpenAPI spec (starting structure, not truth), an existing service profile.
If the spec and/or the test repo aren't available and you need them, ask before proceeding.
## Step 0 — Triage, then assemble context
**Triage first.** Classify the change and route:
| Change class | Home |
|---|---|
| Caller-facing API behavior change | **THIS skill** — continue to Step 1 |
| Performance / timeout / throughput | synthetic monitor / perf test / ops runbook |
| Scheduled / batch job behavior | integration test (may need state the caller can't reach) |
| Pure internal logic / rollback | unit test (dev repo) |
| Real risk, not caller-forceable | documented no-test (with rationale) |
When you decline, still **surface any hidden functional change** buried under a non-functional
framing (e.g. a "perf fix" that quietly changes *what* a batch job processes). Flag it as
"needs a different test type" — don't go silent.
**Hidden-change triggers — run the invisible-side-effect audit below before routing anything
to "pure internal logic / rollback."** Any of these means the change can alter caller-visible
behavior in places the diff never names, so a unit test alone doesn't cover it:
- the card is a chore / upgrade / refactor / revert / re-apply
- a dependency is **removed** (not bumped)
- the diff **deletes** a validation, sanitizer, default, error mapper / `rescue`, or schema
constraint
- a language/framework major version moves
- the change touches a shared component, base class, middleware, or SDK used by more than one
endpoint
- the diff exceeds ~50 runtime files
**Invisible-side-effect audit.** Apply these four rules to the touched surface:
1. **A removed safety net breaks code the diff never touches.** The dangerous line is often a
deletion that doesn't contain the affected field's name — it removes the mechanism, not the
symptom. Ask what the mechanism silently tolerated (dropped unknown fields, coerced a type,
swallowed an error, supplied a default) and what the new behavior is (usually "rejects" or
"passes through").
2. **Absence is the bug.** Grep for what is MISSING from an allowlist / permitted-fields list,
not what's in it.
3. **Silent vs loud.** Trace the error handling: a narrow handler is an uncaught 5xx (loud); a
broad one is a silent no-op (more dangerous — nothing alerts). Both need an assertion that
proves the outcome. For writes that means an independent read-back after the write — the 2xx
and the response body can both look right while nothing persisted. If two consumers read the
same field (two fronts, or a legacy and a replacement service), assert the value on both.
4. **Long fuse.** `git log --all --oneline -S '<field>' -- <path>` — when was the risk actually
introduced? If long before this change, the change *exposed* a latent bug rather than
introducing one; say so.
Report per finding: the mechanism removed, the endpoints / operations / fronts at risk, silent
or loud, and the assertion that would catch it. Carry each into the blast area as
adjacent-regression. If nothing turns up, say "audited, none found — checks run: …"; never skip
silently.
**Parity mode.** A Rally feature (`F…`), a migration, a "does new X match legacy Y" ask, or a
final sign-off regression compares two implementations instead of covering one change.
- Identify both explicitly — the legacy one (source of truth for current behavior) and the new
one — and which repo / front each lives in. If the card doesn't name both, ask; don't guess
which is legacy.
- Trace both. Build the Step 1 flow table with a column per side, not just "affected?".
- Every behavior difference is a finding, including ones that look like improvements. Classify
each as (a) a regression the new side must fix, (b) an intentional, approved change, or (c)
unresolved — needs a product/eng call. Don't assume the newer side is right.
- Verdicts then apply per difference: ADD/UPDATE for (a)-prone slices, a test that pins each (b),
and (c) goes to Open questions.
**Lifecycle stage.** The stage decides what you can read and what "covered" can be checked
against. Record it in Preconditions.
- *Pre-development:* no code to trace. The blast area is speculative and scenarios are
forward-looking; coverage discovery runs against existing tests only.
- *In a branch:* read the branch, not main. Flag every verdict pre-merge — the diff can still
change in review, so re-check after merge.
- *Merged, not yet verified:* same trace against the merged commit, without the pre-merge flag.
- *Verified in a lower environment, pending promotion (e.g. INT5 → UAT):* don't re-derive the
analysis. Narrow to promotion risk — test data, toggle/config state, and auth/scope that
differ between the two environments — and carry forward what the lower one already proved.
Merge ≠ deployed: a lower environment may be running a branch ahead of main.
- *Unsure:* don't default silently. Infer from the Rally state, any linked PR/branch, and merge
status; say which stage you inferred and why. With no signal, ask a narrow question ("has a
branch or PR been opened yet?").
**Read code at a ref, not the working tree.** `git -C <repo> fetch origin`, then
`git show origin/<ref>:path` / `git grep … origin/<ref>`. No checkout or pull, so uncommitted
local work is never touched, and the ref pins which lifecycle stage you analyzed.
**Spec-driven and linked-doc cards.** The real requirements may live outside the card. Signs: a
sparse description, links to external docs, AC that point at a document, mentions of
`spec.md` / `plan.md` / `tasks.md`, a `specs/<NNN-name>/` folder, or a `.specify/` directory in
the repo.
- Read `spec.md` and `plan.md` in full; they supersede the card's own text for intent
(principle 6). Record which files were used in Preconditions.
- Linked docs inaccessible: stop and ask the user to paste them. Don't proceed on a sparse card.
- Looks spec-driven but you can't find one: say spec existence is **unconfirmed** and ask them
to check with the card's author. Don't read silence as "there is no spec."
**Then assemble context:** fetch the change; identify the service + touched endpoint(s);
locate the test repo (ask via free-text for the path if unknown — see Inputs); load the repo's `CLAUDE.md` / convention docs as a
source of conventions and oracle norms (but verify their claims against code). Success
contract is usually trivial — a 2xx means it persisted; only probe further if a service
deviates.
**Optional — descriptive-spec drift / doc-gap check (on request, not required).** This skill
decides *test coverage*, not documentation completeness, so it does **not** read the
OpenAPI/Swagger spec by default. But when the change alters a request/response contract element
(a new header, param, field, or status) it's often useful to confirm whether the descriptive
spec actually documents it. **Offer** this check when the change is contract-shaped — or just
do it if the user asks — and report any gap as a **traceability note** (e.g. "OpenAPI doesn't
list the new `X-…` header — may need a spec update"). A doc-gap is a note, never an ADD/UPDATE
test verdict. Don't gate the memo on it.
## Step 1 — Propose the blast area, then elicit (the part the card won't tell you)
The spec and the card rarely reveal the flows that matter — especially side effects (events,
queue hand-offs, downstream calls) and internal branches. These live in the QA's head. So:
1. **Propose** the blast area from the change + spec + existing tests. Flag test-derived
flows as *known-only* — existing tests reflect only flows someone already knew about, never
the full picture. Never treat tests as the authority on what flows exist.
2. **Elicit the rest.** Invite a free-form brain-dump, AND run the flow-category checklist as
a backstop so nothing obvious is skipped. Resolve every category (covered / n/a / unknown-
flagged). Lead with the categories the change makes likely-relevant; treat clearly-n/a ones
as quick confirmations.
**Trace before you ask.** A question one more hop of code reading can answer is not an open
question. Before putting anything to the QA or into Open questions, trace the value or behavior
to its origin: is it scoped to the request / account / token (genuinely varies — ask), or a
process-wide constant fixed at boot or deploy time (config, env var, a table built once —
structurally can't vary)? The second case is a **finding**: cite file:line and don't ask.
Elicitation is for what the code can't tell you — intent, side effects, flows invisible from the
repo.
**Flow-category checklist** (the backstop):
- **Events / queue — full fan-out.** Which events fire (often more than one), in which
variants/styles? *(Its biggest value: experts habitually verify events but forget to mention
it — ask explicitly.)*
- **Downstream API calls** (e.g. lookup chains).
- **Upstream callers / other consumers** — who else calls this endpoint or reads this field
from outside the repo under test (other services, other fronts, an SDK, a UI embedding it)?
Nothing in the target repo references its own callers, so tracing that repo alone misses them.
Search sibling repos and SDKs for the path / base URL, and ask the QA which repos might call
it. A caller that omits a header or param the change now needs is itself a regression risk.
- **Conditional branches** — different behavior by field value, record state, or context. For a
feature toggle or flag, name it and cover **both** branches.
- **Caller permission / scope** — does behavior/access/visibility differ by token scope?
- **Adjacent-regression** — what sits next to this that *shouldn't* have moved? (A change that
*removes* something especially needs a "did adjacent behavior survive?" check.)
Routing within Step 1:
- **New logic** → the skill doesn't derive logic; ask the QA to enumerate the outcomes (new
logic usually means multiple outcomes → multiple scenarios).
- Apply the **forceability filter** continuously: drop or down-route anything the caller can't
force.
## Step 2 — Discover existing coverage (read the repo)
For each blast-area slice, find the tests on the touched endpoints and **read them** — match
on **operation + event variant**, not just "is this field asserted somewhere." For each test,
determine: what flow it exercises, what it asserts, and **what oracle** it uses.
**Completeness pass — read the whole touched surface, not just the entry spec.** This step,
more than any other, determines how consistent the output is. Don't stop at the obvious file:
- For **every** rule / field / operation / event-variant the change names, confirm whether a
payload/assertion actually exists for *that one* — and list the ones that **don't** (a
missing assertion is a gap even if a sibling is covered; "the field is tested somewhere" is
not enough — see operation-specific coverage above).
- Read the **shared util / helper / runner / verdict layer** the tests sit on, not just the
top-level spec. What the oracle *actually asserts* — "fires" vs "fires with the expected
action/value" — usually lives there, and it routinely changes the verdict (e.g. a runner
that records an action but never asserts it makes a "covered" slice covered-but-weak).
- **State what you read**, and if you stopped short, say so — never let an unread helper
masquerade as "no coverage." Going deeper here is the difference between a shallow and a
thorough run; standardize *up* to the thorough read, don't settle for the first file.
**Oracle taxonomy** (most → least independent of the thing under test):
`DB lookup > Splunk (side effects/events) > GET-after-POST read-back > response-body assertion`.
**Adequacy is risk-relative.** Judge the oracle against the slice's blast × likelihood:
- A high-risk persistence/side-effect slice asserted only by a status code or a non-
independent read-back → **covered-but-weak**.
- A low-risk slice asserted by the response → adequate.
- **Contract caveat:** a GET-after-POST is a legitimate persistence oracle where a 2xx means
the write succeeded — don't apply a blanket "distrust read-back."
- **Intentionally-failing assertion = coverage.** A test that asserts the correct value and
*intentionally fails until a known defect is fixed* IS adequate coverage. Read assertion
**intent** (including comments); never score a failing-by-design assertion as a gap.
- **Negative / absence oracles are soft — harden them, or they PASS for the wrong reason.**
When a slice's verdict turns on proving something did **NOT** happen (no event fired, no
downstream call, no record written), the oracle is inherently weaker than a positive one: a
broken query, a too-short wait, or a dead pipeline all read as "absent" and green-light a
feature that's actually broken — the precise false-PASS this skill exists to prevent. So any
ADD/UPDATE whose assertion is an absence MUST carry both of these, named in the hand-off:
1. **A positive control in the same run** — an adjacent case that *should* fire (e.g. the
non-suppressed/normal path), asserted to fire, proving the oracle was actually live during
the run. Absence with no live control is not coverage.
2. **A deliberate wait ≥ the pipeline's known propagation/indexing lag** before asserting
zero. Retrying-for-absence is pointless — it can only burn the full wait and never
confirms anything; a single check after the lag is the right shape.
Flag the wait-window as an open question when the lag isn't known. (If `references/triforce-context.md`
exists, it holds this team's lag values.)
Match the repo's existing oracle conventions for consistency, but **push for a stronger oracle
(DB, else Splunk)** on high-risk slices or brand-new APIs.
## Step 3 — Compute the delta and decide
Regression is assumed. The forceability filter applies throughout. Per slice:
- Covered adequately → **NO-TEST** (regression has it)
- Covered but weak → **UPDATE** (strengthen the oracle; say which assertion to add)
- Not covered → **ADD**
- Real risk, not caller-forceable → **documented NO-TEST** (with rationale)
Risk-rank everything by blast × likelihood. For every ADD/UPDATE, be able to answer **"what
does this catch that nothing else does?"** — drop it if you can't.
### Degraded mode (can't read the tests)
If the repo/tests are unreachable, do NOT abort or guess. Switch from "coverage decision" to
**candidate scenario proposal**: emit the blast area + candidate ADD scenarios (full detail +
per-scenario forceability), label coverage **NOT PERFORMED**, and frame every item as
"candidate — assumes no existing coverage; verify against the repo." Triage-declines and
forceability no-tests still stand.
## Step 4 — Emit the coverage-decision memo
Use this exact contract every run — fixed sections, fixed verdict vocabulary, a per-slice
table. The **Preconditions** line is mandatory: it makes the run self-explaining, so two runs
(or two environments) can be compared and you can instantly see *why* they differ.
```
## Coverage decision — <ID> (<one-line change>)
Preconditions: change source <Rally MCP | PR | description> · spec <yes | no | n/a> ·
spec-driven sources <files used | none | unconfirmed> · lifecycle stage <pre-dev | branch |
merged | verified in lower env, pending promotion> (<stated | inferred: why>) ·
test repo <path | NONE> · coverage discovery <PERFORMED | NOT PERFORMED (degraded)>
Classification: <caller-facing API change | parity (legacy <X> → new <Y>) |
declined → routed to <where>>
Invisible-side-effect audit: <not triggered | audited, none found — checks run: … | findings: …>
Blast area: confirmed <…> · elicited <…> · assumed/unverified <…>
Existing coverage read: <files/dirs actually read, or "none — degraded">
Decisions (risk-ranked):
| Verdict | Slice | Risk | Oracle | What it catches that nothing else does |
|---|---|---|---|---|
| ADD | <slice> | H/M/L | <DB/Splunk/status/…> | <…> |
| UPDATE | <existing test> | H/M/L | strengthen: <assertion/oracle> | <…> |
| NO-TEST | <slice> | — | covered by <test> (adequate) | — |
| NO-TEST (documented) | <slice> | — | reason: <not caller-forceable / avoided mechanics / wrong test type> | — |
Hand-off (to scenario design): <the ADD/UPDATE rows>
Open questions / assumptions to confirm: <…>
```
Rules for the contract:
- **Verdict vocabulary is closed:** `ADD` | `UPDATE` | `NO-TEST` | `NO-TEST (documented)`. Risk is `H` | `M` | `L`.
- In **degraded mode**, the table is still emitted, but Preconditions says `coverage discovery: NOT PERFORMED` and every row is a *candidate* (ADD-or-unknown) — never assert NO-TEST you couldn't verify.
- Surface traceability links you spot (e.g. a card whose fix the test attributes to another card).
- The memo decides and seeds; it does not write full test bodies (that's the design step).
## What this skill does NOT do
- Write full test code / scenario bodies (hand off to scenario design).
- Trust *current-state claims* — a spec's described shape, or a doc/AC bullet claiming
"there's already a test for this" — over the actual test code. (The AC/spec's *intent* is
exactly what it tests *for*; only the "what currently exists" claims get verified.)
- Invent flows from the spec, or treat existing tests as the list of all flows.
- Propose tests for conditions the caller can't force.
- Stop at the first/obvious test file — it does the Step 2 completeness pass.
- Ask the QA something one more hop of code reading would answer.
## Background / provenance
This skill was designed and pressure-tested against real Rally cards. If
`references/triforce-context.md` exists, it holds Triforce-specific context (fronts, auth, event
fan-out, the event-oracle rubric); read it when working that API surface and treat it as
adaptable team context, not universal law. The hidden-change audit, parity mode, lifecycle
stage, and spec-driven detection are adapted from the Seller-Experience-Pod
`testing-coverage-analysis` plugin, reworked for API tests.
Files in this skill
- README.md
- SKILL.md
Attribution
Related skills
View all in testing →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.