Aller au contenu
Skillpedia
Programmation générale260k · #623

simplify-code

Ce qu’il fait

Ce skill fait nettoyer par votre IA le code que vous venez de modifier, sans chercher de bugs. Il s'adresse aux développeurs qui veulent un code plus propre et plus simple avant de le partager.

Quand l’utiliser

  • ✓Quand vous demandez à votre IA de simplifier ou de nettoyer vos modifications de code récentes.
  • ✓Quand vous voulez une relecture de la réutilisation, de la simplicité, de l'efficacité ou du niveau de conception.
  • ✓Quand vous voulez un essai à blanc qui signale des pistes de nettoyage sans modifier aucun fichier.

Lien du skill

https://github.com/NousResearch/hermes-agent/blob/main/skills/software-development/simplify-code/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/NousResearch/hermes-agent/blob/main/skills/software-development/simplify-code/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Simplifie mes modifications récentes et supprime le code dupliqué, mais ne change pas le comportement.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Le skill lance quatre relecteurs ciblés en parallèle, chacun cherchant un type de problème précis. Il combine ensuite leurs constats et applique les corrections qui en valent la peine.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Simplify Code — Parallel Review & Cleanup

Review your recent code changes with four focused reviewers running in parallel, aggregate their findings, and apply the fixes worth applying.

This is a cleanup pass, not a bug hunt. You are improving the quality of code that already works — removing duplication, flattening needless complexity, cutting waste, and deepening band-aid fixes. Do not go hunting for correctness bugs here; that's what requesting-code-review is for.

Core principle: Four narrow reviewers beat one broad reviewer. Each one deeply searches the codebase for a single class of problem — reuse, quality, efficiency, altitude — without diluting its attention across all four. They run concurrently, so you pay the latency of one review, not four.

When to Use

Trigger this skill when the user says any of:

  • "simplify" / "simplify my changes" / "simplify these changes"
  • "review my code" / "review my recent changes" / "clean up my changes"
  • "/simplify" (if they're carrying the Claude Code habit over)

Optional modifiers the user may add — honor them:

  • Focus: "simplify focus on efficiency" → run only the efficiency reviewer (or weight the aggregation toward it). Recognized focuses: reuse, quality (also accepts simplification), efficiency, altitude.
  • Dry run: "simplify but don't change anything" / "just report" → run the four reviewers, present findings, apply NOTHING. Ask before applying.
  • Scope: "simplify the last commit" / "simplify staged" / "simplify src/foo.py" → narrow the diff source accordingly (see Phase 1).

Do NOT auto-run this after every edit or tack it onto the end of unrelated tasks. It costs four subagents' worth of tokens — invoke it only when the user explicitly asks.

The Process

Phase 1 — Identify the changes

Capture the diff to review. Pick the source by what the user asked for, in this default order:

# 1. Default: uncommitted working-tree changes (tracked files)
git diff

# 2. If that's empty, include staged changes
git diff HEAD

# 3. Scoped variants the user may request:
git diff --staged                 # "staged changes"
git diff HEAD~1                    # "the last commit"
git diff main...HEAD              # "this branch" / "my PR"
git diff -- src/foo.py            # specific file(s)

If git diff and git diff HEAD are both empty and there's no git repo or no changes, fall back to the files the user explicitly named or that were recently created/edited in this session. If you genuinely can't find any changed code, say so and stop — there's nothing to simplify.

Capture the full diff text. Note its size: if it's very large (say >2000 changed lines), warn the user that four subagents each carrying the full diff will be token-heavy, and offer to scope it down (per-directory, per-commit) before proceeding.

Phase 2 — Launch four reviewers in parallel

Use delegate_task batch mode — pass all four tasks in one tasks array so they run concurrently. Four is the right fan-out for this pattern; it's within the delegation.max_concurrent_children budget on any default install.

No delegation available? If you can't call delegate_task in this context (you're a leaf subagent, delegation is disabled, or the budget is exhausted), do NOT skip the review or drop angles. Work through all four reviewer angles yourself, sequentially, in this context — same search standards, same finding format. Then say clearly in your final summary that this was a single-pass inline review, not the parallel fan-out, so the user knows what actually ran.

Give every reviewer the complete diff (not fragments — cross-file issues hide in the gaps) plus the absolute repo path so they can search the wider codebase. Each reviewer gets terminal, file, and search toolsets (so they can git, read_file, and search_files/grep).

Tell each reviewer to:

  • Search the existing codebase for evidence (don't reason from the diff alone).
  • Apply Chesterton's Fence: before flagging anything for removal, run git blame on the line to understand why it exists. If you can't determine the original purpose, mark it confidence: low — don't guess.
  • Report findings as structured output with the concrete cost, confidence, and risk:
    file:line → problem → cost (what's duplicated/wasted/harder to maintain) → suggested fix | confidence: high/medium/low | risk: SAFE/CAREFUL/RISKY
    
    The cost field forces each fi
Questions fréquentes

Cherche-t-il des bugs ?

Non. Le skill indique qu'il s'agit d'une passe de nettoyage, et que la chasse aux bugs relève du skill code-review.

Puis-je choisir un seul type de relecture ?

Oui. Le skill permet de se concentrer sur la réutilisation, la qualité, l'efficacité ou le niveau de conception.

Peut-il seulement signaler sans modifier les fichiers ?

Oui. Le skill propose un essai à blanc qui se contente de signaler les constats.

Détails

Description originale de l’auteur

Parallel 4-agent cleanup of recent code changes.

repo: NousResearch/hermes-agent

Popularité

Étoiles GitHub
260k
Position au classement
#623
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires