rfxn/rdf/r-util-test-scope
Claude Code and agent skill by rfxn/rdf
- community
Checking that the SKILL.md file is still in the repository.
Analyze the current diff to recommend which tests to run and map
Install
npx vskill@latest install rfxn/rdf/r-util-test-scopeSKILL.md
The same SKILL.md was published earlier as rfxn/rdf/r-util-test-scope.
/rdf:r-util-test-scope — Test Scope Recommendation
Analyze the current diff to recommend which tests to run and map changed functions to their test files. Combines test tier selection with function-to-test impact analysis. Read-only — does not execute tests.
Arguments
$ARGUMENTS — optional:
- No args: analyze
git diff(staged + unstaged) - Function name(s): analyze those specific functions
--full: show full impact matrix (not just summary)
Protocol
Part 1: Test Tier Selection
1.1 Classify Change Scope
Run git diff --name-only and git diff --cached --name-only to get all modified files. Categorize each file:
| Category | File Patterns | |
|---|---|---|
| DOCS | README.md, CHANGELOG, .md, man/, docs/ | |
| CONFIG | conf.*, internals.conf, compat.conf, .ca.def | |
| CORE | functions, .lib.sh, main entry point internals | |
| CLI | main entry point case dispatcher, help/usage | |
| INSTALL | install.sh, uninstall.sh, importconf, cron* | |
| TEST | tests/.bats, tests/helpers/, Makefile | |
| CI | .github/, Dockerfile, run-tests.sh |
1.2 Determine Test Tier
Based on the highest-impact category in the diff:
Tier 0 — Lint only (DOCS only, no code changes)
Tier 1 — Primary OS (CONFIG, CLI, single-file CORE)
Tier 2 — Primary + RHEL (multi-file CORE, INSTALL, compat)
Tier 3 — Full matrix (CI changes, Dockerfile, cross-OS logic)
Tier 4 — Full matrix + deep legacy (bash 4.1 floor changes, iptables-legacy, vault repos)
Part 2: Function Impact Analysis
2.1 Identify Changed Functions
If $ARGUMENTS provides function names, use those.
Otherwise extract from git diff HEAD:
- Functions added or modified (grep for
functionand() {) - Functions whose body was modified (changed lines within a function
block — use diff context to identify enclosing function)
If no functions found, skip Part 2.
2.2 Search Test Files
For each function name, search tests/*.bats for:
- Direct calls:
grep -l "function_name" tests/*.bats - Setup helpers: functions called in
setup()that invoke target - Config variables: if function reads a config var, find tests
that set that variable
- Assertions on output: tests that grep for output strings the
function produces
2.3 Rank Relevance
Score each test file match:
- Direct call in @test block: HIGH (3 points)
- Called via setup/helper: MEDIUM (2 points)
- Config variable reference: LOW (1 point)
- Output string match: LOW (1 point)
Part 3: Output
HIGH relevance only
bats tests/05-quarantine.bats tests/03-scanning.bats
All relevance levels
make -C tests test
Rules
- Do NOT execute tests — only recommend what to run
- If in doubt between tiers, recommend the higher tier
- If no tests/ directory exists, report it and suggest lint only
- Report untested functions separately as coverage gaps
- If >10 test files match, suggest running full suite instead
- Account for project CLAUDE.md test preferences if present
- For bash projects: always include
bash -n+shellcheckin
every tier (they're fast and catch syntax errors)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingadapters/claude-plugin/output/skills/r-util-test-scope/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rfxn/rdf/r-util-test-scope)