refactor-values

refactor-values is a skill for Claude Code from idavidov13/agentic-playwright. It costs 125 tokens per session (1,989 once invoked), scanned A, original, MIT.

A procedure for safely changing shared enum values, enum keys, or fixed test data in a TypeScript test project. An enum is a named list of allowed values.

In plain words
What is it for?
Use it before renaming test-data keys, changing endpoint or message values, or editing existing static test data; then run type checks, linting, and affected tests.
Why use it?
It helps find every dependent test, schema, and assertion before a change, preventing mismatches and broken checks.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it before renaming test-data keys, changing endpoint or message values, or editing existing static test data; then run type checks, linting, and affected tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/idavidov13/agentic-playwright/refactor-values
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 idavidov13/agentic-playwright --skill refactor-values
Clone the repo
git clone --depth 1 https://github.com/idavidov13/agentic-playwright

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 refactor-values

README.md
[![agentmods](https://agentmods.dev/badge/skills/idavidov13/agentic-playwright/refactor-values/github.svg)](https://agentmods.dev/skills/idavidov13/agentic-playwright/refactor-values)
Your own site
<a href="https://agentmods.dev/skills/idavidov13/agentic-playwright/refactor-values"><img src="https://agentmods.dev/badge/skills/idavidov13/agentic-playwright/refactor-values/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 refactor-values

Your own site · 80×15
<a href="https://agentmods.dev/skills/idavidov13/agentic-playwright/refactor-values"><img src="https://agentmods.dev/badge/skills/idavidov13/agentic-playwright/refactor-values.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,989 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 warn 7 Sept 2026
SkillSpector: 6 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 15
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 92
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 15
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 95
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 98
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 101
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
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.00125 $0.01989
Opus 5.5 $0.00050 $0.00796
Sonnet 5.5 $0.00025 $0.00398
Haiku 4.5 $0.00013 $0.00199

Measured 1mo ago against content hash 91f7368f2aa4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

refactor-values 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 1mo 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/refactor-values/SKILL.md · 159 lines

How it starts

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

Refactoring Enum Values and Static Test Data

Critical

  • ALWAYS run Phase 1 (find all consumers) before making any edit. Enum values and static data feed into tests, page objects, schemas, and assertions — the blast radius must be known up front.
  • ALWAYS search for both the enum key (Messages.LOGIN_ERROR) and the raw string value ('Invalid email or password'). Some consumers may have bypassed the enum and hardcoded the string — they won't update when you change the enum.
  • NEVER update an enum value, rename a key, or edit a static-data file without updating every consumer in the same commit (atomicity — no intermediate broken state).
  • NEVER loosen a Zod schema (z.literal / z.enum) to make an updated value pass. Update the schema to match the new value; the schema is the contract.
  • ALWAYS run npx tsc --noEmit + npx eslint . + the affected tests before concluding the refactor. TypeScript catches key renames; eslint catches stale patterns; tests catch assertion drift.
  • NEVER use a single global find-and-replace — it misses case variants, hardcoded copies, and references inside comments, documentation, and sibling skill files. Inspect each match.

Instructions

Phase 1: Find all consumers before touching anything

Search the entire codebase for every occurrence of both:

  1. The enum key (the import reference consumers use).
  2. The current string value (the raw string — catches hardcoded usages that bypass the enum).

Use rg (ripgrep) when available — faster and more ergonomic — or grep -r as a universal fallback:

# Find all usages of the enum key
rg "Messages.LOGIN_ERROR" .
grep -r "Messages.LOGIN_ERROR" .

# Find all usages of the raw string value
rg "Invalid email or password" .
grep -r "Invalid email or password" .

# For endpoint changes, search both
rg "ApiEndpoints.LOGIN" .
rg "'/api/users/login'" .

Do this before making any edits. Understand the full blast radius first. Expect matches in .ts, .tsx, .md (skill files, README, CHANGELOG), and .json (Playwright reports — ignore).

Read the full file on GitHub · 159 lines

Files

What ships with it

2 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. 1mo ago First seen · 159 lines · 125 tokens per session scan A 91f7368f2aa4

Subscribe to this mod's changes

refactor-values is a skill published in the GitHub repository idavidov13/agentic-playwright (232 stars, last pushed 2d ago), licensed MIT. It adds 125 tokens to every session and 1,989 once invoked, about $0.0005 per session on Opus 5.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-30.

Related

Other skills, from other repositories

ultracite

Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects. Use when: (1) Setting up or initializing Ultracite in a project, or migrating its existing lint and format config onto Ultracite (ultracite init), (2) Running linting or formatting commands (check, fix, doctor), (3) Writing or…

haydenbleasel/ultracite · 179 tokens

freelance-gig-finder

Find fresh freelance and contract opportunities across multiple platforms for any skill set. Use this skill when a user asks "find me freelance React jobs", "Upwork gigs for Python developers", "freelance work posted this week", "contract jobs for designers", "find me remote freelance opportunities for [skill]", "I'm…

tinyfish-io/tinyfish-cookbook · 98 tokens

fetch

Default, free, and fastest way to read a URL's actual content — pulls clean, full page content (not a summary or a truncated snippet) as markdown, HTML, or structured JSON, including from JavaScript-heavy pages, in parallel across up to 10 URLs in one call. Zero setup, no CLI, no install — first use triggers an OAuth…

tinyfish-io/tinyfish-cookbook · 121 tokens

oss-bounty-finder

Find paid open-source work, OSS bounties, open source grants, or ways to get paid contributing to open source. Use when someone asks any of the following — "find me paid open source work", "show me OSS bounties for Rust", "how do I get paid for open source", "find GitHub bounties", "are there any open source grants I…

tinyfish-io/tinyfish-cookbook · 242 tokens

typescript-strict

TypeScript strict mode patterns with interfaces, type guards, generics, and utility types. Use when defining types, creating type-safe functions, handling nullable values, or implementing generic components.

BlackBeltTechnology/pi-agent-dashboard · 41 tokens

jest-unit

Unit testing skill using Jest for TypeScript and JavaScript, covering mocking, spies, snapshots, coverage, async testing, and custom matchers.

PramodDutta/qaskills · 32 tokens