Logo de Codebase Hygiene

Codebase Hygiene

Comunidade
IgorWarzocha
codebase-hygiene

Must apply when changing maintained code.

Visão geral

Publicado porIgorWarzocha
Repositóriohowaboua-agent-stuff
Nome da habilidadecodebase-hygiene
Estrelas
426
Forks
46
Arquivos incluídos
10
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 10

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por IgorWarzocha no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Codebase Hygiene no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/IgorWarzocha/howaboua-agent-stuff/tree/main/packages/pi-skill-code/skills/codebase-hygiene
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/IgorWarzocha/howaboua-agent-stuff.git /tmp/howaboua-agent-stuff
mkdir -p .claude/skills
cp -r /tmp/howaboua-agent-stuff/packages/pi-skill-code/skills/codebase-hygiene .claude/skills/codebase-hygiene
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Codebase Hygiene em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Codebase Hygiene automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Codebase Hygiene não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Load applicable rules

Loaded references are authoritative.

  • Structural movement, ownership migration, and compatibility cleanup: references/refactoring.md
  • Test assessment, addition, deletion, and scoring: references/testing.md
  • Calls, dispatch, callbacks, continuations, imports, initialization, startup, and runtime cost: references/execution-topology.md
  • Dependencies, lockfiles, installers, scripts, CI actions, runtimes, compilers, and third-party tools: references/dependency-safety.md
  • Load language references for affected code and relevant cross-language contracts: references/js-ts.md, references/python.md, references/go.md, references/rust.md. Cover all repository languages for a repository-wide assessment.
  • React components, Hooks, rendering, state, and framework boundaries: references/react.md
  • For other languages, use repository evidence and current official ecosystem documentation.
  • Scores and caps: references/scoring-rubric.md. Score only when requested or already required.

Goal: leave a codebase that another agent can navigate efficiently, change coherently, verify quickly, and explain to a human from the code itself.

Inspect before editing

Optimize for agents working through search, bounded reads, and coherent multi-file edits. Do not imitate one-file-at-a-time human editing.

Apply governing instructions. Use the instructions already loaded by the harness and check for any missing instructions that cover the affected paths. Before adding behaviour, search for its existing owner and equivalent implementations. Read the complete owning function, component, or configuration section, plus the callers, contracts, state, and tests that determine the change. Do not edit from a search snippet. Read the full file for ownership or structural changes, cross-cutting state or initialisation, or when bounded reads leave ownership unclear.

Shape ownership

  1. Resist append bias. Before adding a branch, field, handler, test, or helper, decide whether it strengthens the current owner or reveals another responsibility.
  2. Exclude generated, vendored, and framework-owned files from size judgment unless maintained directly.
  3. Treat a maintained file above roughly 300 lines as a godfile candidate, not an automatic failure. Inspect mixed concerns, unrelated change reasons, central-path growth, hidden state, and agent readability. Cohesive stable tables, protocols, and algorithms may remain large. Growing mixed-responsibility files may not.
  4. Treat a function above roughly 50 lines as a review candidate. Split across ownership, abstraction level, state transition, effect, or failure-policy boundaries. Keep coherent algorithms and state machines together when extraction hides ordering.
  5. Collapse one-use helpers, wrapper factories, interfaces, and microfiles that add navigation without owning a decision, contract, translation, effect, lifecycle, resilience, security, or diagnostic boundary.

Dependency topology:

  • Minimize unrelated change spread, not raw fan-in or fan-out.
  • Tolerate local duplication while semantics are unsettled.
  • Consolidate only behavior with the same invariant, change pattern, and stable owner.
  • Allow high fan-in for small stable contracts whose implementation changes do not require consumer reassessment.
  • Keep high fan-out in explicit composition roots or orchestrators with visible dependencies, order, and failure policy.
  • Reject catch-all utils, helpers, common, types, managers, services, and contexts with unrelated ownership.

Keep execution traversable

  • Reading a symbol and its imports should reveal the next meaningful step and owner.
  • Preserve feature terminology through handlers, state, errors, logs, and tests.
  • Keep runtime selection statically enumerable where practical.
  • Add registries, events, middleware, factories, interfaces, and indirection only when the hop owns something consequential.
  • Keep import direction separate from execution direction. Stable policy must not import volatile infrastructure. Infrastructure may call policy or implement a policy-owned capability.
  • Construct dependencies at visible composition points.
  • Treat decorators, plugin registration, generated bindings, reflection, callbacks, queues, async continuations, and import-time setup as real edges that must remain discoverable.

Make contracts and state explicit

  • Validate external data at the boundary. Keep named data internally.
  • Use domain or branded types where values cross owners, can be confused, or represent completed validation.
  • Model exclusive states with variants or enums, not flag bags and optional-field combinations.
  • Preserve named fields until serialization or rendering. Avoid magic indexes, parallel arrays, positional tuples, and string-keyed domain dispatch.
  • Give each invariant, mutable transition, cache, transaction, and external effect one authority.
  • Do not hide dependencies in broad contexts, service locators, global registries, or ambient state.
  • Keep public interfaces narrow and in consumer-domain language. Never create an interface only for mocking.

Own behavior and proof

  • The owner that starts a resource, task, timer, subscription, worker, or connection owns failure propagation, cancellation, cleanup, and shutdown. Cover partial startup, blocked work, retries, backpressure, and idempotent cleanup. Background work must not outlive its state or dependencies.
  • Tests must reject credible failures in project-owned contracts, invariants, transitions, failure handling, and lifecycle. Do not reward volume, duplicate static checks, invent external providers, or retain feature-existence tests.
  • Preserve external behavior unless the user accepts a change. Internal types and layout may change when owned consumers migrate coherently. Public APIs, endpoints, serialized formats, persisted data, configuration, errors, and operational signals are contracts. Make migrations explicit.
  • Keep failures visible. Never pass checks through weaker strictness, broad ignores, unsafe casts, swallowed errors, skipped files, deleted useful tests, or silent fallback.
  • Separate unrelated dependency, toolchain, and policy upgrades from feature work. Apply references/dependency-safety.md to required dependency changes as well as optional modernisation.
  • Comments explain invariants, ordering, effects, compatibility, and non-obvious ownership. Delete code narration and unenforceable claims. Add documentation only when it reduces future discovery.

Finish

Run checks that exercise the changed contracts and risks. Re-read ownership and execution paths. Search for stale imports, registrations, adapters, duplicate owners, and old implementations. Report checks run, unavailable checks, and remaining material risk.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Codebase Hygiene faz?

Must apply when changing maintained code.

Por que usar Codebase Hygiene no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Codebase Hygiene é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Codebase Hygiene no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/IgorWarzocha/howaboua-agent-stuff/tree/main/packages/pi-skill-code/skills/codebase-hygiene. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Codebase Hygiene?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Codebase Hygiene?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Codebase Hygiene com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Codebase Hygiene é gratuita?

Sim. A habilidade é publicada no GitHub por IgorWarzocha sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇