Logo di Cleanse

Cleanse

Community
andrewgleave
cleanse

Review code for readability, then simplify it to be easy to follow and understand. Use this skill when the user wants to simplify code, improve readability, clean up for handoff, make code skimmable, reduce complexity, refactor for clarity, strip boilerplate, prepare code for future maintainers, or make a codebase easier to pick up. Trigger liberally — any request touching readability, simplification, cleanup, or "make this easier to understand" should use this skill. Also trigger when the user says things like "review this", "clean this up", "tidy this", "make this simpler", "reduce complexity", "flatten this", "strip the noise", or "I want to understand this code quickly next time I open it".

Panoramica

Pubblicato daandrewgleave
Repositoryskills
Nome della skillcleanse
Stelle
34
Fork
1
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da andrewgleave su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Cleanse in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/andrewgleave/skills/tree/main/cleanse
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/andrewgleave/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/cleanse .claude/skills/cleanse
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Cleanse in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Cleanse non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Cleanse non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Scope

If the user specified files or directories, review those. If not, ask what they'd like you to review before proceeding.

Goal

Make this code trivially easy to pick up cold. Someone opening this file in six months should understand what it does in seconds. All changes should preserve the original functionality and behavior.

What to look for

Read the target code carefully, then apply these passes in order. Make changes directly — don't list suggestions.

1. Flatten control flow

Nested conditionals are the single biggest readability killer. Flatten them.

  • Convert if/else chains to early returns and guard clauses. Put the bail-out condition at the top, happy path below.
  • When a function has a single meaningful path wrapped in a conditional, invert the condition and return early.
  • If an else block just returns or continues, remove the else — the early return already handles it.

2. Strip noise

Remove anything that doesn't help the reader understand the code:

  • Comments that restate the code — // increment counter above counter += 1 is noise. Delete.
  • Redundant type annotations — if the type is obvious from the right-hand side and the language supports inference, remove the annotation.
  • Unnecessary intermediate variables — if a variable is used once on the next line, inline it (unless the name adds genuine clarity).

Only keep comments that explain why — workarounds, constraints, non-obvious business rules. These are valuable. Remove everything else.

3. Simplify logic

  • Collapse trivial if/else into a single expression where the language supports it (ternary, nil-coalescing, pattern matching).
  • Replace boolean flags that track state across a loop with early exits or functional transforms (map, filter, first).
  • Inline one-use helpers that are short enough to read in place. Don't extract helpers for one-time operations — three similar lines is better than a premature abstraction.

4. Improve naming

  • Rename vague variables: data, result, temp, info, val, obj — these tell the reader nothing. Use names that say what the thing is.
  • But keep names short for tightly-scoped temps (loop indices, short closures) and when a single word is enough. i is fine in a 3-line loop.
  • Follow the language's naming conventions. camelCase in JS/Swift, snake_case in Python/Rust, etc.
  • Method names should describe what they do without needing a comment. If you need a comment to explain what a method does, rename the method.

5. Move declarations close to usage

Variables defined at the top of a function but not used until line 40 force the reader to hold them in mental memory. Move declarations to just before first use. This makes extraction easier later.

6. Break up long functions

If a function is doing multiple distinct things sequentially, split it — each piece should do one thing and be readable on its own. Apply the same passes above to each extracted function. If extracting would require threading many parameters or the logic is deeply interleaved, don't force it — flag it as a readability concern instead.

How to apply changes

  1. Read the target files thoroughly.
  2. Make all changes directly. Be efficient — batch related edits.
  3. After editing, verify the code still compiles/parses if possible (run the project's lint or build command if one exists).
  4. List changes briefly — the diff tells the full story.

What NOT to do

  • Don't add comments, docstrings, or type annotations that weren't there before (unless renaming made something ambiguous).
  • Don't refactor architecture or move files between modules. This is a clarity pass, not a redesign.
  • Don't change public API signatures unless the name is actively misleading.
  • Don't be clever. The goal is code so boring and obvious that it is self-documenting and can be read cold.

Domande frequenti

Cosa fa la skill IA Cleanse?

Review code for readability, then simplify it to be easy to follow and understand. Use this skill when the user wants to simplify code, improve readability, clean up for handoff, make code skimmable, reduce complexity, refactor for clarity, strip boilerplate, prepare code for future maintainers, or make a codebase easier to pick up. Trigger liberally — any request touching readability, simplification, cleanup, or "make this easier to understand" should use this skill. Also trigger when the user says things like "review this", "clean this up", "tidy this", "make this simpler", "reduce comple...

Perché usare Cleanse su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Cleanse è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Cleanse in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/andrewgleave/skills/tree/main/cleanse. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Cleanse?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Cleanse?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Cleanse: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Cleanse è gratuita?

Sì. È pubblicata su GitHub da andrewgleave con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇