Logo Hugging Face
Agents & OrchestrationSûr100100/100

Simplify (Hugging Face)

Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.

ou envoie-le directement à ton agent.

Installer dans ton projet

$ curl -fsSL https://arboristhree.xyz/cli/install-skill.mjs -o /tmp/arboris-install-skill.mjs && node /tmp/arboris-install-skill.mjs simplify__huggingface-openenv__claude-skills-543befa7c644
Logo Hugging Face
Hugging Face
huggingface/openenv
Contenu à copier
---
name: simplify
description: Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
context: fork
agent: code-simplifier
metadata:
  origin: Hugging Face
---

# /simplify

Refactor and clean up code after tests pass.

## Usage

```
/simplify
/simplify src/openenv/core/client.py
```

## When to Use

- After `/implement` makes tests pass
- When code is correct but could be cleaner
- Before creating a PR (optional polish step)

## When NOT to Use

- Tests are failing (fix tests first)
- You want to add new functionality (use `/write-tests` first)
- Code is already clean and simple

## What It Does

1. Runs tests to ensure they pass (baseline)
2. Identifies opportunities for simplification
3. Refactors while keeping tests green
4. Runs tests after each change to verify nothing broke

## Philosophy

This is TDD's third phase: Red → Green → **Refactor**.

The goal is NOT to add features or change behavior. The goal is to make the code:
- Easier to read
- Easier to maintain
- More consistent with project patterns
- Less duplicated

## Guidelines

### Good Simplifications

- Extract helper functions to reduce duplication
- Rename variables for clarity
- Remove dead code
- Simplify complex conditionals
- Use more Pythonic idioms

### NOT Simplifications (Avoid)

- Adding new features
- Changing public APIs
- "Improving" code that works and is readable
- Adding abstractions for hypothetical future needs

## Completion Criteria

1. All tests still pass
2. Code is cleaner/simpler than before
3. No new functionality was added
4. Changes follow project patterns (see PATTERNS.md)

## Integration with TDD Workflow

```
/write-tests  →  create failing tests (Red)
    ↓
/implement    →  make tests pass (Green)
    ↓
/simplify     →  clean up code (Refactor)
    ↓
/pre-submit-pr   →  validate before PR
```
Colle ce Markdown dans ton agent ou utilise les boutons ci-dessus pour l’écrire dans ton projet.

Ce que fait Simplify (Hugging Face)

After `/implement` makes tests pass
When code is correct but could be cleaner
Before creating a PR (optional polish step)
Tests are failing (fix tests first)

Comment utiliser Simplify (Hugging Face)

1
Copie le prompt
Un clic copie le prompt packagé (ou l'envoie à ton agent).
2
L'agent installe le skill
Il ajoute le SKILL.md et ses ressources à ton projet.
3
Activation automatique
Le skill s'active dès que le contexte correspond.

Déclencheurs pour Simplify (Hugging Face)

Dis simplement à ton agent quelque chose comme :

Applique le skill simplify__huggingface-openenv__claude-skills-543befa7c644 à cette tâche
Utilise simplify__huggingface-openenv__claude-skills-543befa7c644 pour améliorer cette implémentation
Passe en revue ce sujet avec simplify__huggingface-openenv__claude-skills-543befa7c644

Skills liés à Simplify (Hugging Face)