rangeLink: Skill for Claude Code

.claude/skills/affected-tests/SKILL.md

affected-tests is a skill for Claude Code from couimet/rangeLink. It costs 35 tokens per session (1,437 once invoked), scanned A, original, MIT.

A skill that finds integration tests changed on your current Git branch and builds a command to run them.

In plain words
What is it for?
Use it to compare your branch with a base branch, collect test IDs, and generate a filtered pnpm test command for manual checking.
Why use it?
It avoids manually searching for the right tests before continuous integration checks them. It also records the affected tests in the issue-completion note.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

This is couimet/rangeLink's own configuration. It tells Claude Code how to work on rangeLink itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything rangeLink configures →

Reuse

Borrowing it

Nothing to install: this file belongs to couimet/rangeLink. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/couimet/rangeLink/main/.claude/skills/affected-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/couimet/rangeLink

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for affected-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/couimet/rangelink/affected-tests/github.svg)](https://agentmods.dev/skills/couimet/rangelink/affected-tests)
Your own site
<a href="https://agentmods.dev/skills/couimet/rangelink/affected-tests"><img src="https://agentmods.dev/badge/skills/couimet/rangelink/affected-tests/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for affected-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/couimet/rangelink/affected-tests"><img src="https://agentmods.dev/badge/skills/couimet/rangelink/affected-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,437 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00035 $0.01437
Opus 5 $0.00017 $0.00718
Sonnet 5 $0.00007 $0.00287
Haiku 4.5 $0.00003 $0.00144

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

Security

Grade A, and why

affected-tests scanned grade A with 0 findings 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 9d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/affected-tests/SKILL.md · 157 lines

How it starts

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

Affected Tests

Generate a compact pnpm test:release:grep "..." command covering every integration test changed on the current branch vs the base branch. Includes both regular and [assisted] TCs so the user can run them manually before CI handles automated-only validation. Appends the result as a ## Affected Tests block at the end of the finish-issue note.

Input: $ARGUMENTS

If no base branch is provided, read the finish-issue note (most recent .claude-work/notes/*finish*.txt) and extract Base branch: from it. If neither exists, default to origin/main.

Step 1: Determine the Base Branch

Check if the user provided a base branch argument. If not, find the most recent finish-issue note:

ls -t .claude-work/notes/*finish*.txt 2>/dev/null | head -1

If a note exists, extract Base branch: from it. Otherwise use origin/main. Record this as BASE_BRANCH.

Step 2: Find Changed Integration Test Files

git diff --name-only BASE_BRANCH -- packages/rangelink-vscode-extension/src/__integration-tests__/suite/

If no files changed, print "No integration test files changed" and stop.

Step 3: Extract All TC IDs

Extract TC IDs from test(...) calls, filtering out log-marker prefixes (before-*, after-*, rl-*, ctxmenu-*, csc-*, clean-*):

for f in $(git diff --name-only BASE_BRANCH -- packages/rangelink-vscode-extension/src/__integration-tests__/suite/); do
  grep -oE "test\('(\[assisted\] )?[a-z]+(-[a-z]+)+-[0-9]+" "$f" | sed "s/test('//" | sed "s/\[assisted\] //"
done | grep -vE "^(before-|after-|rl-|ctxmenu-|csc-|clean-)" | sort -u > /tmp/tc-ids.txt

This captures both [assisted] and regular test IDs, filtering out internal log markers.

Step 4: Compress into a Compact Grep Expression

Save the IDs to /tmp/tc-ids.txt then run this Node.js script inside the project directory:

const fs = require('fs');
const ids = fs.readFileSync('/tmp/tc-ids.txt', 'utf8').trim().split('\n');

const groups = {};
for (const id of ids) {
  const m = id.match(/^(.+)-(\d+)$/);
  if (!m) continue;
  const [, slug, num] = m;
  if (!groups[slug]) groups[slug] = new Set();
  groups[slug].add(parseInt(num, 10));
}

const compressSet = (numSet) => {
  const nums = [...numSet].sort((a, b) => a - b);
  if (nums.length === 0) return '';
  if (nums.length === 1) return String(nums[0]).padStart(3, '0');

  // Group by first 2 digits of zero-padded representation
  const padGroups = {};
  for (const n of nums) {
    const padded = String(n).padStart(3, '0');
    const prefix = padded.slice(0, 2);
    const one = padded[2];
    if (!padGroups[prefix]) padGroups[prefix] = new Set();
    padGroups[prefix].add(one);
  }

  const parts = [];
  for (const [prefix, oneSet] of Object.entries(padGroups)) {
    const ones = [...oneSet].sort();

    if (ones.length === 10) {
      parts.push(prefix + '[0-9]');
      continue;
    }

    let charClass = '';
    let i = 0;
    while (i < ones.length) {
      let j = i;
      while (j + 1 < ones.length && ones[j + 1] === String.fromCharCode(ones[j].charCodeAt(0) + 1)) {
        j++;
      }
      if (j > i) {
        charClass += ones[i] + '-' + ones[j];
        i = j + 1;
      } else {
        charClass += ones[i];
        i++;
      }
    }

    if (charClass.length === 1) {
      parts.push(prefix + charClass);
    } else {
      parts.push(prefix + '[' + charClass + ']');
    }
  }

  return parts.length === 1 ? parts[0] : '(' + parts.join('|') + ')';
};

const featureParts = Object.entries(groups)
  .sort(([a], [b]) => a.localeCompare(b))
  .map(([slug, numSet]) => slug + '-' + compressSet(numSet));

const result = featureParts.join('|');
console.log(result);

Read the full file on GitHub · 157 lines

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. 9d ago First seen · 157 lines · 35 tokens per session scan A 09fb2ddb579a

Subscribe to this mod's changes

affected-tests is a skill published in the GitHub repository couimet/rangeLink (10 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,437 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

browser-qa-delivery

Validate a Design Studio HTML artifact in the sandbox browser, fix rendering and runtime defects, then deliver exactly the tested file.

juspay/xyne-spaces · 30 tokens

screenshot-automation

Generates an automated App Store screenshot pipeline with UI tests for screenshot capture, device framing, localized caption overlays, and multi-size batch export. Use when user wants automated screenshots, App Store screenshot generation, or a fastlane snapshot replacement.

rshankras/claude-code-apple-skills · 52 tokens

test-generator

Generate test templates for unit tests, integration tests, and UI tests using Swift Testing and XCTest. Use when adding tests to iOS/macOS apps.

rshankras/claude-code-apple-skills · 33 tokens

regression-consistency-checker

Checks whether a new version of a repository preserves the behavior observed by tests on the old version. Use this skill when comparing two versions of code to detect regressions, verify refactoring safety, validate bug fixes don't break existing functionality, or ensure backward compatibility. Detects differences in…

ArabelaTso/Skills-4-SE · 130 tokens

testing

TDD/BDD testing principles. Use when writing tests, reviewing test coverage, setting up testing, or discussing test strategy and test architecture.

TheBeardedBearSAS/claude-craft · 30 tokens

playwright-pro

Production-grade Playwright testing skill for E2E suites, flaky test diagnosis, browser automation, migration from Cypress/Selenium, CI integration, visual checks, and regression validation.

seaworld008/Commonly-used-high-value-skills · 39 tokens