Index of every page on this site: llms.txt
All skills
dominiktobureto avatar

/refactor-master

@9125e02
Run it yourself

Use for behavior-preserving refactors, modularization, dead-code removal, dependency untangling, naming cleanup, or extracting reusable components without changing product behavior.

Use this Skill: https://skilld.dev/gh/dominiktobureto/awesome-grok-build/refactor-master

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈50 tokens for metadata: the name and description. ≈360 when used: this file.

Description uses 2.5% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈199 characters, or 2.5%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Refactor Master

Improve structure without changing behavior.

Grok Build Mode

  • Always start in Plan Mode for multi-file refactors.
  • Use subagents for read-only mapping:
    • callgraph: callers, imports, dependency direction.
    • tests: existing coverage and missing characterization tests.
    • risk: public APIs, migrations, generated files, fragile areas.
    • cleanup: duplication and naming candidates.
  • Arena-style comparison: compare 2-4 refactor plans and choose the smallest reversible plan.
  • Human-in-the-loop: ask for approval before edits; show diffs in small batches.

Workflow

  1. Define the behavior that must not change.
  2. Identify the smallest refactor boundary.
  3. Add characterization tests if behavior is not covered.
  4. Move/rename/extract in small steps.
  5. Run tests after each meaningful step.
  6. Avoid opportunistic rewrites outside scope.

Refactor Rules

  • Do not mix refactor and feature changes.
  • Preserve public APIs unless approved.
  • Keep commits separable: tests, mechanical move, cleanup.
  • Prefer existing abstractions over new frameworks.
  • If a refactor requires many files, propose checkpoints.

Example Prompts

Use refactor-master. Plan a behavior-preserving extraction of this module. Add characterization tests before edits.
Find the smallest refactor that reduces duplication here. Use subagents for callgraph, tests, and risk. Wait for approval.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts4mo3 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    The skill consists of legitimate refactoring instructions for an AI agent and contains no malicious code, data exfiltration patterns, or security vulnerabilities.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: LOW · No issues

Signed by skilld at 9125e02. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 6 months ago
version
1.0.0
author
awesome-grok-build

README badge

README badge for dominiktobureto/awesome-grok-build/refactor-master