refactor

refactor is a command for Claude Code from VincentChuWaiChow/vanguard-frontier-agentic. It costs 0 tokens per session (1,236 once invoked), scanned A, original, Apache-2.0.

A planning command for improving an existing AWS DynamoDB data model, repository layer, table configuration, or item-update path. A repository layer is application code that reads and writes database data.

In plain words
What is it for?
Use it to select relevant DynamoDB guidance, classify a requested change, and prepare a safe code or configuration update with suitable tests.
Why use it?
It keeps the work based on the supplied code and schema instead of silently discovering live resources or changing data. It also distinguishes a proposed refactor from an executed migration or deployment.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is python3 scripts/select_mode.py refactor --features core,indexes.

Part of the vanguard-frontier-agentic plugin — 215 skills, 13 commands, 4 plugins shipped together

Good fit Use it to select relevant DynamoDB guidance, classify a requested change, and prepare a safe code or configuration update with suitable tests.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/VincentChuWaiChow/vanguard-frontier-agentic
agentmods
npx agentmods add commands/vincentchuwaichow/vanguard-frontier-agentic/refactor

Made for: Claude Code.

Or install vanguard-frontier-agentic, the plugin that ships this one along with the rest of its 215 skills, 13 commands, 4 plugins.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/vincentchuwaichow/vanguard-frontier-agentic/refactor"><img src="https://agentmods.dev/badge/commands/vincentchuwaichow/vanguard-frontier-agentic/refactor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,236 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 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.00000 $0.01236
Opus 5.5 $0.00000 $0.00494
Sonnet 5.5 $0.00000 $0.00247
Haiku 4.5 $0.00000 $0.00124

Measured 20d ago against content hash eec563f35c78, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

refactor 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 20d 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.

skills/aws/aws-dynamodb-patterns/references/commands/refactor.md · 83 lines

How it starts

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

refactor

Improve an existing DynamoDB model, repository access layer, table configuration or item-update path. Read this command and selected feature references only. Default to local code/templates/sanitized snapshots; no implicit live discovery, backfill, feature update or deployment. The selector emits paths, not a migration.

/aws-dynamodb-patterns refactor --features core,indexes
python3 scripts/select_mode.py refactor --features core,indexes

Provide existing schema/IaC, application read/write paths and the desired change in the surrounding request. Unknown current state blocks an execution-ready delta, not a clearly labeled proposal. Live evidence may be obtained through a separately scoped authorized audit; that audit is not an automatic prerequisite or side effect.

Classify the update before writing a patch

Change Correct treatment
SDK/repository/query refactor Preserve persisted data and API/cursor/consistency/error contracts; add characterization and negative tests before surgical code changes
Ordinary item attribute/update expression Generate conditional/versioned UpdateItem or a justified transaction; key attributes are not mutable fields; distinguish missing vs NULL, partial batches and ambiguous outcomes
Capacity/encryption/TTL/PITR/Streams settings Use the actual service operation and current IaC owner; inspect permissions, transitions and retention/consumer/key dependencies; feature-plan may generate a separate reviewed delta
GSI addition/replacement Add the new path and inspect limits/backfill/throttling/readiness; service GSI backfill indexes existing qualifying attributes, not newly invented application-derived keys
Base table key schema (attribute names/types) or new LSI Treat as new-table/data migration, not an in-place UpdateTable key edit; preserve the old table/read path until verified cutover
Vector schema/dimensions or embedding model New index/generation and possibly re-embedding; equal dimensions do not align models; evaluate authorized recall/freshness before switching

Read the full file on GitHub · 83 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. 20d ago First seen · 83 lines · 0 tokens per session scan A eec563f35c78

Subscribe to this mod's changes

refactor is a command published in the GitHub repository VincentChuWaiChow/vanguard-frontier-agentic (26 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,236 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-11-12.

Related

refactor compared with commands from other repositories

refactor next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
refactorVincentChuWaiChow/vanguard-frontier-agenticCommand26todayApache-2.0A0Claude Code
db-enumpashki975/thm-claude-kitCommand23mo agoMITA17Claude Code
add-entitymentilead/shopify-app-skillCommand68mo agoMITA0Claude Code
checklistgithub/spec-kitCommand154ktodayMITA13Claude Code
clarifygithub/spec-kitCommand154ktodayMITA27Claude Code
specifygithub/spec-kitCommand154ktodayMITA13Claude Code
analyzegithub/spec-kitCommand154ktodayMITA26Claude Code