Logo di Code Module Design

Code Module Design

Community
Integralist
code-module-design

Vocabulary and principles for designing deep modules. Use when designing or improving a module's interface, looking for deepening opportunities, deciding where a seam goes, making code more testable or easier for agents to navigate, or when another skill needs the deep-module vocabulary.

Panoramica

AutoreIntegralist
Repositoryagent-skills
Nome della skillcode-module-design
Stelle
26
Fork
1
File inclusi
2
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.

  • 2 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

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

Installazione

Installa la skill IA Code Module Design 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/Integralist/agent-skills/tree/main/.agents/skills/code-module-design
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova 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 nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Integralist/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/.agents/skills/code-module-design .claude/skills/code-module-design
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Code Module Design 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 Code Module Design 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 Code Module Design 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à.

Design deep modules: place substantial behaviour behind a small interface, choose a clean seam, and test through that interface. Use the vocabulary and principles here whenever code is designed or restructured. Deep modules give callers leverage and maintainers locality.

Vocabulary

Use these terms exactly; the shared vocabulary is deliberate. Prefer them to "component," "service," "API," or "boundary."

  • Module: Anything with an interface and implementation, at any scale: a function, class, package, or slice spanning tiers. Avoid unit, component, and service.
  • Interface: Everything a caller must know to use the module correctly: its type signature plus invariants, ordering constraints, error modes, required configuration, and performance characteristics. It is more than a language's interface keyword or a class's public methods. Avoid API and signature.
  • Implementation: The code inside a module. An adapter names a role, not what's inside: a Postgres repository can be an adapter with a large implementation; an in-memory fake can have a small one.
  • Depth: Leverage at the interface: how much behaviour a caller or test can exercise per unit of interface it learns. A module is deep when much behaviour sits behind a small interface, and shallow when the interface is nearly as complex as the implementation. Depth measures leverage, not the ratio of implementation lines to interface lines, which rewards padding.
  • Seam (Michael Feathers): The place a module's interface lives, where behaviour can change without editing that place. Deciding where the seam goes is separate from deciding what sits behind it. Avoid boundary, which collides with DDD's bounded context.
  • Adapter: A concrete thing that satisfies an interface at a seam. The term names its role, not its contents.
  • Leverage: What callers get from depth: more capability per unit of interface, so one implementation pays back across call sites and tests.
  • Locality: What maintainers get from depth: change, bugs, knowledge, and verification concentrate in one place, so a fix lands once.

Design principles

  • Depth belongs to the interface. A deep module can use small, swappable parts and internal seams that its own tests use; keep those out of the public interface. To deepen a module, cut methods, simplify parameters, and hide more behind the seam.
  • Deletion test. Imagine deleting the module. If complexity vanishes, it was a pass-through; if it reappears across callers, the module was earning its keep.
  • Interface is the test surface. Callers and tests cross the same seam. Needing to test past it means the module has the wrong shape.
  • One adapter is a hypothetical seam; two make it real. Add a seam only when something actually varies across it, typically production and test.
  • Testable by construction. Accept dependencies rather than creating them inside, and return results rather than mutating shared state, so tests can supply inputs and check outputs at the interface.
  • Redesign from first principles. For a new requirement, read the affected modules and ask what interface and implementation you would build if the requirement had existed from day one. Compare that with extending the current design; choose the smallest coherent change, not a rewrite by default. Plan the whole change and deliver it in increments. Keep existing behaviour except where the requirement changes it. Carry the design through every type, caller, test, doc, and example. Prefer a coherent abstraction over another feature-specific exception.

Further procedures

  • When deepening a cluster of shallow modules, read DEEPENING.md for how dependency categories determine the seam and tests.
  • When exploring alternative interfaces, follow DESIGN-IT-TWICE.md to have parallel subagents design alternatives and compare them.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Code Module Design?

Vocabulary and principles for designing deep modules. Use when designing or improving a module's interface, looking for deepening opportunities, deciding where a seam goes, making code more testable or easier for agents to navigate, or when another skill needs the deep-module vocabulary.

Perché usare Code Module Design su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Code Module Design è 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 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 Code Module Design in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/Integralist/agent-skills/tree/main/.agents/skills/code-module-design. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Code Module Design?

Qualsiasi modello che colleghi in 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 Code Module Design?

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

La skill IA Code Module Design è gratuita?

È pubblicata su GitHub da Integralist. Consulta il repository per i termini di licenza. 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, modelli 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.

Vedi tutti

Crea subito la tua area di lavoro IA

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