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…
от mzbac★ 27 звёзд на GitHubОб этом скилле
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
- Identify the system’s main responsibilities and “shape”:
- Key entrypoints, main services/packages, public APIs, domain layer, IO boundaries.
- 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 --statrg -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,
Установить posd-code-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл 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?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл posd-code-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic