Логотип Posd Code Review

Posd Code Review

Спільнота
mzbac
posd-code-review

Review a codebase, directory, or PR diff using John Ousterhout’s “A Philosophy of Software Design” principles. Use when the user wants design/maintainability feedback: complexity (dependencies/obscurity), deep modules, information hiding/leakage, interface design (common case), layering, error-handling strategy, comments and naming/obviousness. Do NOT use for formatting-only or lint-only requests, or when the user is explicitly asking for performance benchmarking, a pure security audit, or purely stylistic rewrites.

Огляд

Видавецьmzbac
Репозиторійskills
Назва навичкиposd-code-review
Зірки
27
Форки
1
Файли в пакеті
Лише інструкції
Посилання
  • Інструкції у форматі Markdown

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

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

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

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

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

    Опубліковано на GitHub користувачем mzbac. Перегляньте вихідний вміст перед установленням.

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

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

1

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

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mzbac/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/posd-code-review .claude/skills/posd-code-review
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

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

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

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

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

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

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

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

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

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

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

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

POSD Code Review Skill

Goal

Produce a review that reduces software complexity by:

  • Identifying dependencies and obscurity.
  • Mapping findings to symptoms: change amplification, cognitive load, and unknown unknowns.
  • Proposing refactors that create deep modules, strengthen information hiding, and make interfaces simpler for the most common use cases.
  • Offering practical, incremental improvements (“small investments”), not a wholesale rewrite.

Inputs (infer if missing)

  • Scope: PR diff / commit range / paths / whole repo.
  • Constraints: backwards compatibility, “no behavior change”, deadlines, style guides, API stability.
  • Audience: maintainers vs new contributors (affects how much explanation to include).

If scope is ambiguous, default to: review the touched area + immediate neighbors (callers/callees).

Operating mode

  • Default to read-only review: do not edit files unless asked.
  • Use evidence: cite file paths, symbols, and concrete examples.
  • Prefer small, staged refactors that can be landed safely.

Workflow

Step 0 — Build a quick mental model

  1. Identify the system’s main responsibilities and “shape”:
    • Key entrypoints, main services/packages, public APIs, domain layer, IO boundaries.
  2. Identify the primary modules/components and their interfaces:
    • What does each module promise?
    • What does the caller have to know (including “informal” constraints)?

Step 1 — Find complexity hotspots (evidence-driven)

Pick 3–10 candidate hotspots based on:

  • High churn / frequently changed files
  • High fan-in (many callers) or fan-out (many dependencies)
  • Lots of conditionals/special cases
  • Repeated logic across modules
  • High “setup tax” to use an API (many parameters, flags, ordering rules)

Suggested commands (optional, adapt to repo/tooling):

  • git status, git diff, git log --stat
  • rg -n "TODO|FIXME|HACK|workaround"
  • rg -n "throws | catch | Exception | Result<|Either<|panic!|unwrap\\("
  • Language-specific: eslint, ruff, golangci-lint, mvn test, etc. (only if requested/appropriate)

Step 2 — Review using POSD lenses (checklists below)

For each hotspot/module, analyze:

  • What complexity does it remove for callers?
  • What complexity does it push outward?
  • Where is knowledge duplicated across modules?

Step 3 — “Design it twice” for top issues

For the top 2–3 most impactful findings:

  • Provide two alternative designs.
  • Pick one and justify why it reduces overall complexity.

Step 4 — Produce an actionable report

Use the output template below. Prioritize issues that:

  • Reduce change amplification across multiple files
  • Reduce cognitive load for common tasks
  • Eliminate unknown unknowns by improving interfaces/docs
  • Shrink exception surface area

POSD Review Checklists

A) Complexity (dependencies + obscurity)

Look for:

  • Call chains that require reading multiple files to understand one change.
  • Implicit ordering constraints (“call A before B”).
  • Hidden invariants (only “known” by tribal knowledge).
  • Names that don’t reveal intent; missing “why” documentation.

Fix strategies:

  • Pull related knowledge into one module.
  • Make invariants explicit in interfaces and comments.
  • Replace “temporal coupling” with data-driven or capability-based APIs.

B) Deep modules vs shallow modules

Shallow module signals:

  • Big/complex interface for little functionality.
  • Wrappers that mostly forward calls (“pass-through” methods).
  • Many tiny classes that add interfaces without hiding complexity.

Deep module goals:

  • Small, stable interface; substantial internal work hidden behind it.
  • Callers can use the module without understanding its internals.

Fix strategies:

  • Merge overly-fragmented modules when they share knowledge.
  • Replace multiple special-purpose methods with one general-purpose method + simple parameters.
  • Move complexity into the module if it simplifies the caller.

C) Information hiding & information leakage

Leakage signals:

  • Same file format / protocol / validation rules implemented in multiple modules.
  • Duplicated constants, field names, parsing rules.
  • Two modules that must be changed together for one “design decision”.

Fix strategies:

  • Consolidate the “knowledge” into one module.
  • Introduce a focused module that owns the leaking decision.
  • Remove getters that expose internal structures; offer intention-revealing methods instead.

D) Interfaces designed for the common case

Look for:

  • APIs that require rare options to be understood to do common tasks (“overexposure”).
  • Too many parameters / flags / configuration knobs.
  • Interfaces that “punt” hard cases to the caller.

Fix strategies:

  • Provide good defaults.
  • Replace flag soups with a smaller number of cohesive operations.
  • Make common-case code short and obvious; move uncommon complexity behind optional APIs.

E) Layering: different layers, different abstractions

Look for:

  • Upper layers duplicating lower-layer APIs.
  • Pass-through methods/variables across multiple layers.
  • Decorator stacks that multiply shallow interfaces.

Fix strategies:

  • Collapse layers that don’t add a distinct abstraction.
  • Reassign responsibilities so each layer adds real value.
  • Expose lower-level APIs directly when the upper layer adds no abstraction.

F) Error handling: reduce exception surface area

Look for:

  • Defensive “throw everywhere” patterns.
  • Exceptions that callers can’t realistically handle.
  • Many special-case checks scattered across the codebase.
  • Exception-handling branches that are untested/unreachable.

Fix strategies:

  • Define errors out of existence by changing semantics so the “error” cannot occur (or becomes normal behavior).
  • Mask/collapse related failures into fewer handling sites.
  • If an error is unrecoverable, prefer a clear “panic/fail fast” boundary rather than half-handling everywhere.
  • Before introducing a new error/exception: describe exactly how the caller will handle it.

G) Comments & documentation (abstraction + non-obvious info)

Look for:

  • Public methods without an interface/contract comment.
  • Comments that restate code (noise).
  • Missing “why” on non-obvious algorithms, invariants, or tricky edge cases.
  • Implementation details leaking into interface docs (wrong abstraction level).

Fix strategies:

  • Add header/interface comments that define the contract.
  • Add “why” comments for non-obvious design decisions.
  • Remove comments that merely repeat code and refactor code to be more obvious.

H) Naming, consistency, obviousness

Look for:

  • Vague names; “hard to name” entities that likely hide an unclear abstraction.
  • Local inconsistencies (same concept named differently across files).
  • Non-obvious code where the reader must simulate mentally to understand.

Fix strategies:

  • Rename to encode intent and invariants.
  • Align naming and patterns within a subsystem.
  • Rewrite small sections for clarity; prefer readability over cleverness.

Output template (required)

Executive summary

  • 3–7 bullets: biggest complexity drivers, where they show up, what to do next.

Scorecard (0–5)

Rate each area briefly with 1–2 sentences:

  • Deep modules
  • Information hiding/leakage
  • Interface common-case usability
  • Layering/abstraction boundaries
  • Error handling strategy
  • Comments/contracts
  • Naming/consistency/obviousness

Findings (prioritized)

For each finding:

  1. Title (short)
  2. Principle violated (e.g., information leakage, shallow module, overexposure)
  3. Evidence (files/symbols; concrete snippet description)
  4. Impact
    • Change amplification? Cognitive load? Unknown unknowns?
  5. Recommendation
    • Smallest safe change first
  6. Design-it-twice alternatives (required for top 2–3 findings)
  7. Risk & test plan
    • What to verify; what tests to add/run

Suggested investment plan

  • Quick wins (small refactors/docs)
  • Medium refactors (module/interface reshaping)
  • Long-term (architecture boundary shifts)

Quality bar

  • Prefer fewer, deeper findings over a long list of nits.
  • Every recommendation must reduce overall complexity for future changes.
  • If you claim something is “complex”, explain what it forces readers/callers to know.

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

Що робить навичка ШІ Posd Code Review?

Review a codebase, directory, or PR diff using John Ousterhout’s “A Philosophy of Software Design” principles. Use when the user wants design/maintainability feedback: complexity (dependencies/obscurity), deep modules, information hiding/leakage, interface design (common case), layering, error-handling strategy, comments and naming/obviousness. Do NOT use for formatting-only or lint-only requests, or when the user is explicitly asking for performance benchmarking, a pure security audit, or purely stylistic rewrites.

Навіщо використовувати Posd Code Review у TypingMind?

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

Як встановити Posd Code Review у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/mzbac/skills/tree/main/skills/posd-code-review. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

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

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

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

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Posd Code Review — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Posd Code Review?

Навичку опубліковано на GitHub: mzbac. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

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

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

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

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

Усі

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

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