refactor-test-decoupling

refactor-test-decoupling is a skill for Claude Code, Codex from KarhouTam/agent-skills. It costs 0 tokens per session (5,495 once invoked), scanned A, original, no licence file.

A set of patterns for rewriting PyTorch tests so they do not depend on one particular hardware accelerator. It covers CPU-only, device-agnostic, and device-specific test classes.

In plain words
What is it for?
Use it when reorganising PyTorch test files around CPU tests, tests that run across device types, or tests for one accelerator.
Why use it?
It reduces test failures and duplicated code caused by tests being tied to a specific accelerator. It also makes the intended hardware coverage clearer.

Skill for Claude CodeCodex

Which agent this was written for is unclear — body not stored (licence); the path alone says nothing.

Good fit Use it when reorganising PyTorch test files around CPU tests, tests that run across device types, or tests for one accelerator.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/karhoutam/agent-skills/refactor-test-decoupling
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.

Any agent
npx skills add KarhouTam/agent-skills --skill refactor-test-decoupling
Clone the repo
git clone --depth 1 https://github.com/KarhouTam/agent-skills

Made for: Claude Code, Codex.

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 refactor-test-decoupling

README.md
[![agentmods](https://agentmods.dev/badge/skills/karhoutam/agent-skills/refactor-test-decoupling.svg)](https://agentmods.dev/skills/karhoutam/agent-skills/refactor-test-decoupling)
Your own site
<a href="https://agentmods.dev/skills/karhoutam/agent-skills/refactor-test-decoupling"><img src="https://agentmods.dev/badge/skills/karhoutam/agent-skills/refactor-test-decoupling.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,495 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.
Origin unknown 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.00000 $0.05495
Opus 5 $0.00000 $0.02747
Sonnet 5 $0.00000 $0.01099
Haiku 4.5 $0.00000 $0.00549

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

Security

Grade A, and why

refactor-test-decoupling 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 8d 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.

pytorch-test-refactoring/agent/skills/refactor-test-decoupling/SKILL.md · 345 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

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. 8d ago First seen · 345 lines · 0 tokens per session scan A e9f867e81c1b

Subscribe to this mod's changes

refactor-test-decoupling is a skill published in the GitHub repository KarhouTam/agent-skills (2 stars, last pushed 13d ago), with no licence file. It costs nothing until one of its globs matches a file; then it loads 5,495 tokens. 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

readme-template

Standard README template for repos — professional structure with badges, overview, table of contents, features/modules, stack, installation, configuration, tests, security, structure, docs, roadmap, contribute, license, author + RepoActivity sections (Star History, repo stats) + profile GIF footer. Use when creating…

pedroiff0/awesome-skills · 72 tokens

docker-single-port-multi-instance

Consolidate multiple Docker Compose app instances (production / test / demo) behind ONE host port using an nginx reverse proxy that routes by URL path prefix (e.g. /demo). Use when a user wants 'one port, several apps/banks' or a demo reachable simultaneously from the main landing page with its own database.

pedroiff0/awesome-skills · 73 tokens

adhoc-verification

Produce fresh, focused, local verification evidence for a code change without relying on the full test suite. Use when a system reminder (or the user) demands ad-hoc verification after an edit, or when you want to prove one behavior in isolation. Covers the correct way to write a throwaway supertest/harness script…

pedroiff0/awesome-skills · 86 tokens

agent-evaluation

This skill should be used when the user asks to "evaluate agent performance", "build test framework", "measure agent quality", "create evaluation rubrics", "implement LLM-as-judge", "compare model outputs", "mitigate evaluation bias", or mentions multi-dimensional evaluation, agent testing, quality gates, direct…

viktorbezdek/skillstack · 115 tokens

playwright-browser-automation

Run automated headless browser testing, scrape dynamic SPAs, capture high-resolution full-page screenshots, and perform visual regression testing with Playwright.

pedroiff0/awesome-skills · 34 tokens

accessibility-testing-best-practices

Use when applying accessibility testing best practices.

LoopyLuci/Skills · 16 tokens