# di-sukharev/refactoring-skill architecture

> Architecture diagram of the GitHub repository di-sukharev/refactoring-skill, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/di-sukharev/refactoring-skill
- Repository: https://github.com/di-sukharev/refactoring-skill

## Overview

This repository is an agent skill for behavior-preserving code refactoring, not a conventional application. The documented workflow starts when a user asks an agent to refactor code: a fresh agent challenges the plan before edits, then a separate loop-based review checks the changes. The skill instructions are the only sampled implementation; workflow links below rely on the README, so internal instruction details are not inferred.

Main entry points: [`refactoring/SKILL.md`](https://github.com/di-sukharev/refactoring-skill/blob/master/refactoring/SKILL.md) (Refactoring skill)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_agent(("Coding agent"))
node_skill["Refactoring skill<br/>[SKILL.md]"]
node_target["Target code"]
node_fresh_agent(("Fresh agent"))
node_review_skill{{"Loop Code Review"}}

node_user -->|"requests refactoring"| node_agent
node_agent -->|"follows instructions"| node_skill
node_agent -->|"challenges plan"| node_fresh_agent
node_agent -->|"refactors code"| node_target
node_agent -->|"submits changes"| node_review_skill

click node_skill "https://github.com/di-sukharev/refactoring-skill/blob/master/refactoring/SKILL.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user,node_review_skill toneBlue
class node_agent,node_target,node_fresh_agent toneIndigo
class node_skill toneTeal
```

## Components

### Other components

- **User**
- **Coding agent**
- [Refactoring skill](https://github.com/di-sukharev/refactoring-skill/blob/master/refactoring/SKILL.md): `refactoring/SKILL.md`
- **Target code**
- **Fresh agent**
- **Loop Code Review**

## Connections

- User → Coding agent: requests refactoring (evidence: `README.md`)
- Coding agent → Refactoring skill: follows instructions (evidence: `README.md`)
- Coding agent → Fresh agent: challenges plan (evidence: `README.md`)
- Coding agent → Target code: refactors code (evidence: `README.md`)
- Coding agent → Loop Code Review: submits changes (evidence: `README.md`)
