Agent skill

Repo Native Refactor

by sickn33 in sickn33/agentic-awesome-skills

Review diffs without editing, or perform evidence-based cleanup while preserving authorized behavior, public contracts, and domain ownership.

MITAuto-check: warningsDevelopment

Install Repo Native Refactor

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add sickn33/agentic-awesome-skills --skill repo-native-refactor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sickn33/agentic-awesome-skills repo-native-refactor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/repo-native-refactor .claude/skills/repo-native-refactor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
repo-native-refactor
GitHub stars
47k
Used in
1 other repo
Token cost
~3.3k tokens
SKILL.md length
1,405 words
Files
11 (incl. references)
Skills in repo
1,493
Repo updated
First seen
Licence
MIT

At a glance

Review diffs without editing, or perform evidence-based cleanup while preserving authorized behavior, public contracts, and domain ownership.

  • Works in 6 steps: Establish scope and baseline → Establish intent, ownership, and… → Inventory findings before rewriting → …
  • Tasks that involve Refactoring
  • SKILL.md covers When to Use, Minimal intervention and…, Operating modes and Evidence hierarchy, plus 9 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Repo Native Refactor is an agent skill from sickn33/agentic-awesome-skills. Review diffs without editing, or perform evidence-based cleanup while preserving authorized behavior, public contracts, and domain ownership.

Its SKILL.md is about 3.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `references/LICENSE.md`, `references/deterministic-tooling.md` and `references/error-reliability.md`).

It sits in Development, covering Refactoring. The repository describes itself as: AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,400+ agentic skills. Includes… The licence is MIT.

When your agent uses it

  • Tasks that involve Refactoring

Example prompts

  • “/repo-native-refactor”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Establish scope and baseline
  2. Establish intent, ownership, and preservation
  3. Inventory findings before rewriting
  4. Classify risk and refactor
  5. Audit code prose
  6. Verify and review

What it can do on your machine

Read from SKILL.md and the folder at commit 680176d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Repo Native Refactor loads about 3.3k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 41 tokens; SKILL.md has 1,405 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~3.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningTells the agent its actions are pre-authorized / not to stop for confirmationSKILL.md:52
    zed cleanup allows bounded corrections; don't ask approval again for routine choices.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sickn33/agentic-awesome-skills at commit 680176d, republished under its MIT licence (© sickn33). 1,405 words, ~3,263 tokens.

Download SKILL.mdSave it as .claude/skills/repo-native-refactor/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
repo-native-refactor
description
Review diffs without editing, or perform evidence-based cleanup while preserving authorized behavior, public contracts, and domain ownership.
category
development
risk
critical
source
https://github.com/Natchannnn/repository-engineering-skills
source_repo
Natchannnn/repository-engineering-skills
source_type
community
date_added
2026-09-30
author
Natchannnn
tags
repository-engineering, code-review, refactoring, public-contracts
tools
codex
license
MIT

Repo-native refactor

When to Use

  • Use when the user asks to review a diff, branch, or PR for correctness, contract breaks, or operational risk.
  • Use when the user authorizes bounded cleanup before opening a PR or asks to consolidate duplicated policy with shared ownership.
  • Use for repository rehabilitation only when the user explicitly requests work across multiple domains.
  • Establish review-only, edit, or combined authority before choosing the operating mode.

Produce the smallest coherent change that belongs naturally in the target repository.

Prioritize in order:

  1. Correctness and security: prevent regressions, avoid new security vulnerabilities, handle boundary conditions.
  2. Semantic integrity: preserve existing invariants, state transitions, validation, and error boundaries.
  3. Contracts stay as declared: the rule lives in references/shared-contracts.md §1. Preserve the authorized target contract; otherwise keep exact declared types. Internal helpers are fine when exposed contracts stay exact.
  4. Repository conformity: match surrounding naming, domain conventions, and architectural precedents.
  5. Economy and simplicity: minimal intervention. Delete dead weight, avoid premature abstractions.

This is a post-implementation audit and small cleanup skill. It is not permission to redesign the repository. Establish a concrete consequence such as inconsistent behavior, duplicated policy that must change together, unclear ownership, avoidable resource cost, or a demonstrated maintenance obstacle. Leave healthy code unchanged when the benefit is speculative.


Minimal intervention and evidence gate

  • Evidence-based intervention: refactor only with concrete evidence of divergence, defect, or operational risk. If greenfield code or an additive diff is already minimal, idiomatic, and passing, leave it. A pattern you recognize is a candidate finding, not a reason to change anything.
  • Semantic DRY (Cost-benefit consolidation): merge duplicated logic only when the copies share an owner, an invariant, and a reason to change, and only if merging saves more than it costs. Leave similar-looking checks in separate domains alone, and keep small local duplication when merging would obscure ownership.
  • Contract boundary protection: preserve public interfaces, parameter names, and return types, except where the task clearly authorizes the change. During cleanup, keep the authorized target contract; don't revert to the old one.

Operating modes

  • Review vs. Refactor Authority: first establish the outcome: findings, edits, or both. Review-only means inspection and verification, no source edits. Authorized cleanup allows bounded corrections; don't ask approval again for routine choices.
  • Change-set cleanup: for a working tree, branch, commit range, feature, or bounded checkpoint. Work diff-first; read surrounding code only to understand ownership, contracts, and precedent.
  • Repository rehabilitation: only when explicitly requested across multiple domains. Read repository rehabilitation, build a short profile, and work in batches you can verify independently.

Evidence hierarchy

Use the evidence hierarchy to guide investigation, not to resolve material contradictions automatically. Reconcile conflicting requirements, documentation, callers, and tests before changing the affected contract. When repository patterns conflict, resolve in order:

  1. User requirements and explicitly authorized scope.
  2. Documented architecture and repository guidelines.
  3. Observable public contracts and persisted schemas.
  4. Healthy sibling code within the same domain and runtime boundary.
  5. Relevant tests, schemas, callers, and dependencies.
  6. Dominant local conventions.
  7. Language and runtime idioms.
  8. Conservative, idiomatic defaults.

Never treat a temporary workaround, buggy sibling, or accidental pattern as precedent.


Workflow

1. Establish scope and baseline

Before mutating code, identify:

  • Comparison base and working-tree state.
  • In-scope files vs. untouched user modifications.
  • Existing verification commands and their current pass/fail status.

Differentiate pre-existing failures from regressions introduced by this pass. Never claim a check ran when it did not.

2. Establish intent, ownership, and preservation

Refactoring is behavior-preserving by default. Protect:

  • Public APIs, serializations, and database schemas.
  • Concurrency guarantees, idempotency, timeouts, and retries.
  • Resource lifecycles (file handles, sockets, database transactions).

If a bug requires an observable change, classify and report it as an intentional behavioral correction rather than routine cleanup.

3. Inventory findings before rewriting

Inspect the authorized scope for:

  • Validation or control flow whose structure obscures an invariant, creates inconsistent behavior, or duplicates the same owned policy.
  • Misplaced domain ownership or leaky abstractions.
  • Leaked unmanaged resources or missing atomic flush/sync calls.
  • Unnecessary boilerplate, dead code, or commentary narrating syntax.

Read finding taxonomy for complex cases. Establish the smallest adequate correction before editing.

4. Classify risk and refactor

Risk bands:

  • R0 - Mechanical: Established formatter or locally provable cleanup.
  • R1 - Low Structural: Local residue with straightforward test verification.
  • R2 - Contextual Structural: Renames, control-flow changes, extraction of shared predicates.
  • R3 - Semantic: Errors, fallbacks, retries, serialization, transactions, async, or lifecycles.
  • R4 - Critical Boundary: Auth, permissions, crypto, data migrations, persistence durability.

Read semantic risk for R2+ changes. Never mass-rewrite R3 or R4 behavior without explicit instructions and verified tests.

5. Audit code prose
  • When prose is in scope, treat comments, docstrings, CLI output, and error messages as distinct surfaces. Read repository prose for that work.
  • Delete comments that merely narrate obvious syntax or execution order.
  • Preserve and tighten comments that explain non-obvious invariants, protocol quirks, rounding, or hardware workarounds.
  • Never invent fictitious tickets, PR references, or production incident IDs.
Show full SKILL.md (594 more words)Show less
6. Verify and review
  • Run the smallest repository-native checks that meaningfully exercise the change. For R3/R4 changes or weak test suites, read error and reliability boundaries and testing integrity.
  • Prioritize diff reviewability and coherence over raw line minimization; do not compress code into unreadable one-liners.
  • Distinguish intentional behavioral corrections from mechanical cleanup.
  • Review the final diff like a skeptical maintainer. Every line needs a reason. No contract changed without permission, no test got weaker, no dependency moved for nothing.

Reference routing

Read supporting references only when the corresponding trigger occurs:


Hard stops

Do not force a refactor where intent, ownership, public-contract consequences, migration semantics, or concurrency behavior cannot be established. Do not guess between conflicting architectural patterns without evidence.


Completion Report

Scale the completion report to the change. Omit empty sections. Format completion concisely:

Result

Use one: Verified, Verified with caveats, Needs review, or Failed verification.

For review-only requests, an empty findings list is a complete result, not an embarrassing one. Never manufacture findings to fill a report: each reported finding needs a producer, a consumer, and an observed consequence, or it is not reported.

Changed

Summarize material corrections by file and function.

Preserved intentionally

Note specific patterns or contracts deliberately retained to avoid breaking downstream consumers.

Verification

List exact verification commands executed and their outcomes.

Residual uncertainty

Document unresolved limitations or high-risk boundaries intentionally deferred.


Examples

Review without editing
text
Use repo-native-refactor to review this branch against main for public-contract
breaks and retry failures. Do not edit source files. Report only findings with
a concrete producer, consumer, and observable consequence.

Inspect the comparison base and relevant callers, run proportionate verification, and report evidence-backed findings. An empty findings list is a valid result.

Consolidate one owned policy
text
Use repo-native-refactor to consolidate the duplicated eligibility checks owned
by this billing module. Preserve the current accepted inputs, error types, and
return values. Leave similar checks in other domains alone and run the module's tests.

Confirm that the copies share an owner, invariant, and reason to change before extracting anything. Keep the correction bounded and verify the final behavior.

Limitations

  • Review requires an identifiable comparison base and enough repository evidence to establish contracts and ownership.
  • Similar syntax alone does not establish shared policy or justify consolidation.
  • The skill cannot establish migration or concurrency safety without relevant requirements and verification; unresolved material uncertainty is a hard stop.
  • Local checks and self-review do not establish independent review or universal reliability.

Security & Safety Notes

Review-only mode permits inspection and verification without source edits. The authorized cleanup mode can modify source files, so the declared risk is critical under this collection's state-modification classification. Keep edits within the user's authorized scope, preserve unrelated user changes, and apply the R3/R4 verification and stop conditions before changing sensitive behavior. Cleanup authority does not authorize publishing, deploying, or changing external systems.


When NOT to Use

  • Clean greenfield code: Do not refactor newly written code that is already minimal, idiomatic, and passing all tests.
  • Speculative cleanup: If you cannot state the domain owner and the concrete maintenance consequence in a single sentence, leave the code unmodified.
  • Risk classification: When uncertain between risk bands (such as R2 structural vs. R3 semantic), default conservatively to the higher risk band and require explicit justification.

Source & License

Adapted from Natchannnn/repository-engineering-skills. The original MIT copyright notice and license are retained in references/LICENSE.md. Collection adaptations add metadata, explicit triggers, interaction examples, limitations, and safety notes; the core workflow and supporting reference instructions are retained.

© sickn33, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (references) in skills/repo-native-refactor of sickn33/agentic-awesome-skills.

  • SKILL.md
  • references/LICENSE.md
  • references/deterministic-tooling.md
  • references/error-reliability.md
  • references/finding-taxonomy.md
  • references/refactor-examples.md
  • references/repository-prose.md
  • references/repository-rehabilitation.md
  • references/semantic-risk.md
  • references/shared-contracts.md
  • references/testing-integrity.md

Open the folder on GitHubat commit 680176d

Used in 1 other repository

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sickn33/agentic-awesome-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Repo Native Refactor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Repo Native Refactor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Repo Native Refactor this skillsickn33/agentic-awesome-skills47k1 repos~3.3kAutomated safety check: WarnMIT
Guidelinesakash-network/node1.1k20 repos~577Automated safety check: PassMIT
Component Refactoringlangflow-ai/langflow155k—~3.5kAutomated safety check: PassMIT
Migrate Core Code to Submodulestinyhumansai/openhuman42k—~2.6kAutomated safety check: PassGPL-3.0
ast-grep Structural Searchcode-yeongyu/oh-my-openagent70k—~3.3kAutomated safety check: PassMIT
Systematic Code Refactoringluongnv89/claude-howto42k—~3kAutomated safety check: PassMIT

Similar skills

  • Guidelines

    akash-network/node

    Behavioral guidelines to reduce common LLM coding mistakes. An agent skill from akash-network/node.

    1.1k GitHub starsUsed in 20 repos~577 tokens
    DevelopmentAuto-check passed
  • Component Refactoring

    langflow-ai/langflow

    Refactor high-complexity React components in Langflow frontend.

    155k GitHub stars~3.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Migrate Core Code to Submodules

    tinyhumansai/openhuman

    Plans and carries out moving non-host-specific code and its tests from the OpenHuman core into vendored tiny submodule libraries, then releases the submodule and re-pins the host.

    42k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • ast-grep Structural Search

    code-yeongyu/oh-my-openagent

    Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.

    70k GitHub stars~3.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Systematic Code Refactoring

    luongnv89/claude-howto

    Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.

    42k GitHub stars~3k tokensUpdated 9 days ago
    DevelopmentAuto-check passed
  • Codex

    skills-directory/skill-codex

    A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    1.5k GitHub starsUsed in 3 repos~1.8k tokens
    DevelopmentAuto-check passed

More from sickn33/agentic-awesome-skills

All 1,493 skills in this repo
  • Liuguang Banlan UI

    sickn33/agentic-awesome-skills

    Implements an interface in one of two named color modes, iridescent white or colorful black, from a parameterized starter that reports measured color intensity.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • User Thoughts Memory

    sickn33/agentic-awesome-skills

    Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Using LWC Memory and Graphs

    sickn33/agentic-awesome-skills

    Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.

    47k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Find Complementary Founders

    sickn33/agentic-awesome-skills

    Guides an agent through assessing its own owner for cofounder fit, publishing an approved profile, and ranking complementary profiles other agents published for their owners.

    47k GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check passed
  • Whatsapp Cloud API

    sickn33/agentic-awesome-skills

    Integracao com WhatsApp Business Cloud API (Meta). An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~4.5k tokens
    Auto-check passed
  • Cline Pilot

    sickn33/agentic-awesome-skills

    Acts as a proxy for the Cline CLI, dispatching coding tasks one at a time, monitoring runs by hard evidence, relaying decisions to you and learning per-project preferences.

    47k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Categories

Questions about Repo Native Refactor

What does Repo Native Refactor do?

Review diffs without editing, or perform evidence-based cleanup while preserving authorized behavior, public contracts, and domain ownership. Repo Native Refactor is an agent skill from sickn33/agentic-awesome-skills. Review diffs without editing, or perform evidence-based cleanup while preserving authorized behavior, public contracts, and domain ownership.

When should I use Repo Native Refactor?

Repo Native Refactor fits situations like: tasks that involve Refactoring.

How do I install Repo Native Refactor in Claude Code?

Run `npx skills add sickn33/agentic-awesome-skills --skill repo-native-refactor -a claude-code`. Or copy the skill folder (skills/repo-native-refactor in sickn33/agentic-awesome-skills) into .claude/skills/repo-native-refactor in your project. Claude Code loads it when a task matches its description.

How do I install Repo Native Refactor in Codex?

Run `npx skills add sickn33/agentic-awesome-skills --skill repo-native-refactor -a codex`. Or copy the skill folder (skills/repo-native-refactor in sickn33/agentic-awesome-skills) into .agents/skills/repo-native-refactor in your project. Codex loads it when a task matches its description.

Can I use Repo Native Refactor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sickn33/agentic-awesome-skills --skill repo-native-refactor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/repo-native-refactor, .gemini/skills/repo-native-refactor, .github/skills/repo-native-refactor and .opencode/skills/repo-native-refactor in your project.

What does Repo Native Refactor need to run?

SKILL.md names no scripts, command-line tools or credentials: Repo Native Refactor is instructions for the agent only.

Does Repo Native Refactor access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Repo Native Refactor safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): tells the agent its actions are pre-authorized / not to stop for confirmation. Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Repo Native Refactor use?

Repo Native Refactor is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Repo Native Refactor use?

About 3.3k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9.6k tokens, read only when the agent opens those files.

What are the alternatives to Repo Native Refactor?

Skills that share tags, products or a category with Repo Native Refactor: Guidelines (akash-network/node, 1.1k stars), Component Refactoring (langflow-ai/langflow, 155k stars), Migrate Core Code to Submodules (tinyhumansai/openhuman, 42k stars) and ast-grep Structural Search (code-yeongyu/oh-my-openagent, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Repo Native Refactor?

sickn33 (a GitHub user) maintains it in sickn33/agentic-awesome-skills, which has 47,379 GitHub stars. The repository holds 1,493 skills in this directory. The repository was last updated on October 9, 2026.

Source: sickn33/agentic-awesome-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.