Agent skill · Audited from source
Refactor
skill · FlorianBruniaux/claude-code-ultimate-guideCC-BY-SA-4.0 licenceAudited 7 Oct 2026 · source d90170da4369
Is it safe? With care — CAUTION, grade B (89/100). We read this skill's source at commit d90170da4369 and found no filesystem, network or shell access and no hard-coded secrets. The audit raised 2 findings, 0 critical or high. What it does: Analyze code for SOLID violations and suggest targeted improvements
Cite
Cite this page
ModelsAtlas. “Refactor (FlorianBruniaux/claude-code-ultimate-guide)”. Retrieved 7 Oct 2026. https://modelsatlas.com/skills/florianbruniaux/refactor
3 skills are called “Refactor”. You are viewing FlorianBruniaux/claude-code-ultimate-guide.
- FlorianBruniaux/claude-code-ultimate-guide★ 6.1k!CAUTION
- agenticnotetaking/arscontexta★ 3.5k✓SAFE
- val1813/kwcode★ 685✓SAFE
Trust audit
Audit 0.4.1 · source read 7 Oct 2026
CAUTION means the audit found things worth knowing before you trust this skill. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | WARN | 2 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (2)
MEDIUMInventory / provenanceinv.symlink · whitepapers/recap-cards/en/_extensions
whitepapers/recap-cards/en/_extensions
- Why
- link not followed
- Fix
- —
MEDIUMInventory / provenanceinv.symlink · whitepapers/recap-cards/fr/_extensions
whitepapers/recap-cards/fr/_extensions
- Why
- link not followed
- Fix
- —
Audit 0.4.1 · source sha d90170da4369 · 7 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- PublisherFlorianBruniaux GitHub userOwner of the repository this skill is read from
- Source folderFlorianBruniaux/claude-code-ultimate-guide/examples/skills/refactorThe exact folder we audited
- LicenceCC-BY-SA-4.0As the repository states it
- Commit pinned for this verdictd90170da4369A new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Analyze code for SOLID violations and suggest targeted improvements
---
name: refactor
description: Analyze code for SOLID violations and suggest targeted improvements
argument-hint: "<file_or_module> [--pattern <name>]"
effort: medium
when_to_use: "Use when a module has SOLID violations, code smells, or duplication to address."
disable-model-invocation: true
---
# SOLID refactoring assistant
Analyze code for SOLID violations and suggest targeted improvements.
## Purpose
Identify refactoring opportunities based on:
- SOLID principle violations
- Code smells and anti-patterns
- Complexity metrics
- Duplication detection
## Instructions
### Step 1: Scope analysis
Determine the refactoring scope from user input:
- Single file: Deep analysis
- Directory: Pattern detection across files
- Function/class: Focused extraction suggestions
```bash
# Get file/directory stats
if [ -f "$TARGET" ]; then
wc -l "$TARGET"
echo "Single file analysis"
elif [ -d "$TARGET" ]; then
find "$TARGET" -type f \( -name "*.ts" -o -name "*.js" -o -name "*.py" \) | wc -l
echo "Directory analysis"
fi
```
### Step 2: SOLID violations detection
#### S - single responsibility
Look for:
- Files > 300 lines
- Functions > 50 lines
- Classes with > 10 methods
- Mixed concerns (data + UI + business logic)
```bash
# Find large files
find . -name "*.{ts,js,py}" -exec wc -l {} + 2>/dev/null | sort -rn | head -10
# Functions with high line count (approximate)
grep -rn "function\|def \|fn " --include="*.{ts,js,py,rs}" . | head -20
```
#### O - open/closed principle
Look for:
- Switch/case statements on types
- Repeated if/else type checking
- Direct modifications vs extensions
#### L - liskov substitution
Look for:
- Overridden methods that throw "not implemented"
- Type checks before method calls
- Empty method overrides
#### I - interface segregation
Look for:
- Large interfaces (> 10 methods)
- Classes implementing unused interface methods
- Fat service classes
#### D - dependency inversion
Look for:
- Direct instantiation of dependencies (`new Service()`)
- Hardcoded class references
- Missing dependency injection
### Step 3: Code smells
```bash
# Duplication patterns
grep -rn --include="*.{ts,js,py}" . 2>/dev/null | \
awk -F: '{print $3}' | sort | uniq -c | sort -rn | head -10
# Long parameter lists (> 4 params)
grep -rn "function.*,.*,.*,.*," --include="*.{ts,js}" . 2>/dev/null | head -10
# Deep nesting (4+ levels)
grep -rn "^\s\{16,\}" --include="*.{ts,js,py}" . 2>/dev/null | head -10
```
### Step 4: Complexity assessment
For each issue found, assess:
- **Impact**: How much code is affected?
- **Risk**: What could break?
- **Effort**: Lines to change, tests needed?
## Output format
---
### 🔧 Refactoring analysis
**Target**: [file/directory]
**Lines Analyzed**: [count]
### 📊 SOLID scorecard
| Principle | Status | Issues Found |
|-----------|--------|--------------|
| Single Responsibility | 🟡 | 3 large classes |
| Open/Closed | 🟢 | OK |
| Liskov Substitution | 🟢 | OK |
| Interface Segregation | 🔴 | 2 fat interfaces |
| Dependency Inversion | 🟡 | 5 direct instantiations |
### 🎯 Priority refactorings
#### 1. [Highest Impact] - Extract class from `UserService`
**Violation**: Single Responsibility
**Current**: 450 lines handling auth + profile + notifications
**Suggested**:
```
UserService.ts (450 lines)
↓ Extract
AuthService.ts (~150 lines)
ProfileService.ts (~150 lines)
NotificationService.ts (~100 lines)
```
**Risk**: Medium (update imports)
**Tests Needed**: Update dependency injection in tests
#### 2. [Second Priority] - Replace switch with polymorphism
**Location**: `src/handlers/payment.ts:45`
**Current**:
```typescript
switch (paymentType) {
case 'card': // 50 lines
case 'bank': // 50 lines
case 'crypto': // 50 lines
}
```
**Suggested**: Strategy pattern with `PaymentProcessor` interface
**Risk**: Low (isolated change)
### 📝 Code smells
| Smell | Location | Severity |
|-------|----------|----------|
| Long Method | `api.ts:calculateTotal` (120 lines) | 🟠 High |
| Duplicate Code | `utils/*.ts` (3 similar blocks) | 🟡 Medium |
| Deep Nesting | `parser.ts:parse` (6 levels) | 🟡 Medium |
### 🚀 Quick wins (low risk, high value)
1. Extract `validateEmail()` to shared utils (used in 4 places)
2. Replace magic numbers with named constants
3. Add early returns to reduce nesting in `processOrder()`
### ⚠️ Technical debt notes
- [Item to track for future sprints]
---
## Refactoring safety checklist
Before applying suggestions:
- [ ] Tests exist for affected code
- [ ] Create feature branch
- [ ] Commit current state
- [ ] Apply one refactoring at a time
- [ ] Run tests after each change
- [ ] Review diff before committing
## Usage
**Analyze specific file:**
```
/refactor src/services/user.ts
```
**Analyze directory:**
```
/refactor src/api/
```
**Focus on specific principle:**
```
/refactor --focus=srp src/services/
```
**With complexity threshold:**
```
/refactor --threshold=high
```
## References
- Martin Fowler's Refactoring Catalog
- Clean Code by Robert C. Martin
- SOLID principles by Robert C. Martin
$ARGUMENTSExcerpt, first 5,084 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit d90170d
git clone https://github.com/FlorianBruniaux/claude-code-ultimate-guide git -C claude-code-ultimate-guide checkout d90170da4369
The author documents no install command, so this uses the repository directly. Our verdict covers commit d90170da4369 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- !CAUTION B 89 / 100
first audit · source
d90170da4369
README badge
For maintainers · shows the latest audit
[](https://modelsatlas.com/skills/florianbruniaux/refactor/)
The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.
Similar skills
All coding & review skills →FlorianBruniaux/claude-code-ultimate-guide
Audit Claude Code agents, skills, and commands for quality and production readiness. Use when evaluating skill quality, checking production readiness scores, or comparing agents against best-practice templates.
FlorianBruniaux/claude-code-ultimate-guide
Codebase health audit scoring 7 categories with progression plan
FlorianBruniaux/claude-code-ultimate-guide
Autonomous improvement loop: scan codebase metrics, scaffold experiment files, run agent-driven iterations until metric improves
FlorianBruniaux/claude-code-ultimate-guide
Post-deploy monitoring: watch production after a deploy and alert on regressions
FlorianBruniaux/claude-code-ultimate-guide
Restore context after /clear by summarizing recent work and project state
FlorianBruniaux/claude-code-ultimate-guide
Launch and navigate the ccboard TUI/Web dashboard for Claude Code. Use when monitoring token usage, tracking costs, browsing sessions, or checking MCP server status across projects.
Add this badge to your README
[](https://modelsatlas.com/skills/florianbruniaux/refactor/)
<a href="https://modelsatlas.com/skills/florianbruniaux/refactor/"><img src="https://modelsatlas.com/skills/florianbruniaux/refactor/badge.svg" alt="ModelsAtlas: CAUTION B"></a>
Questions about Refactor
What does the Refactor skill do?
Is Refactor safe to install?
What can Refactor access on my machine?
How current is this page?
Sources
- github.com/FlorianBruniaux/claude-code-ultimate-guide/tree/main/ — the audited source at commit d90170da4369 and every finding aboveObserved · 7 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Refactor skill do?
- Is Refactor safe to install?
- What can Refactor access on my machine?