Логотип Codebase Hygiene

Codebase Hygiene

Спільнота
IgorWarzocha
codebase-hygiene

Must apply when changing maintained code.

Огляд

ВидавецьIgorWarzocha
Репозиторійhowaboua-agent-stuff
Назва навичкиcodebase-hygiene
Зірки
426
Форки
46
Файли в пакеті
10
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 10

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Видавець на GitHub: IgorWarzocha. Перед установленням перегляньте вихідні файли навички.

Встановлення

Установіть навичку ШІ Codebase Hygiene у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки на GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до розділу «Плагіни» → «Навички».
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/IgorWarzocha/howaboua-agent-stuff/tree/main/packages/pi-skill-code/skills/codebase-hygiene
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Додати навичку → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

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
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Codebase Hygiene в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Codebase Hygiene, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для певного постачальника, тому навичка Codebase Hygiene не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож поки навичка не потрібна, токени на її інструкції не витрачаються.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

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.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Codebase Hygiene?

Must apply when changing maintained code.

Навіщо використовувати Codebase Hygiene у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Codebase Hygiene — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Codebase Hygiene у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/IgorWarzocha/howaboua-agent-stuff/tree/main/packages/pi-skill-code/skills/codebase-hygiene. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Codebase Hygiene?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Codebase Hygiene?

Зі скількома забажаєте. У TypingMind ви можете використовувати Codebase Hygiene із будь-якою моделлю, яка підтримує навички, зокрема з GPT, Claude, Gemini, Grok, DeepSeek, Mistral чи Llama. Для цього ви використовуєте власні ключі API.

Чи безкоштовна навичка ШІ Codebase Hygiene?

Так. На GitHub цю навичку публікує IgorWarzocha за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це набір інструкцій для повторного використання, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти, які вона може викликати, — код, який десь виконується й повертає результат. Натомість навичка ШІ дає моделі знання й пояснює порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний робочий простір зі ШІ вже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇