NC

nathankim0/clean-architecture-skills

Developer tools
119 stars Quality 62 Trend 9MIT

Two skills for AI coding agents: review architecture, spot code smells, and improve code in small steps.

Overview

Two skills for AI coding agents: review architecture, spot code smells, and improve code in small steps.

README

[!IMPORTANT] Architecture matters more, not less, when AI writes the code. AI agents produce code faster than anyone can review it, and they copy whatever structure they find. Clear boundaries tell an agent where a change belongs, keep its mistakes inside one layer, and let you swap a fake for a real backend by editing one file. Without them, every prompt adds a shortcut that the next prompt repeats.

Skills

Skill What it helps with
Clean Architecture Review dependency direction, layer boundaries, and SOLID. Keep business rules independent of infrastructure.
Kent Beck Style Find code smells, clarify names, and simplify code through small, behavior-preserving refactorings.

Use either skill independently, or combine them to review the design and then simplify the implementation. Each is a portable SKILL.md file; the same instructions are shared across agents.

Quick start

Claude Code

Run inside Claude Code. Install either plugin or both:

/plugin marketplace add nathankim0/clean-architecture-skills
/plugin install clean-architecture@clean-architecture-skills
/plugin install kent-beck-style@clean-architecture-skills

OpenAI Codex

Run in your terminal:

codex plugin marketplace add nathankim0/clean-architecture-skills
codex plugin add clean-architecture@clean-architecture-skills
codex plugin add kent-beck-style@clean-architecture-skills

Start a new Codex session. Use /plugins to browse the marketplace. For the IDE extension or a version without codex plugin, use manual installation.

Windows plugin installs require Git symlink support: enable Developer Mode or symlink privileges and clone with core.symlinks=true. If symlinks are unavailable, use manual skill-directory installation.

Using another agent? Jump to pi, OpenClaw, GitHub Copilot / Amp, or manual installation.

Usage

After installation, ask your agent to use a skill in a regular prompt:

Use clean-architecture to review the dependencies in src/domain.
Point out violations and explain why each boundary matters.
Use kent-beck-style to review this module.
Suggest small refactorings that preserve behavior and make the intent clearer.

For a combined review:

Review this feature with clean-architecture and kent-beck-style.
Check the dependency direction, then suggest the smallest changes
that would make the code easier to understand and maintain.

You can also ask for a new feature design, review YAGNI and KISS, improve names, or refactor a long method.

Supported agents

Choose one installation method per agent to avoid duplicate skills.

The approach

Dependencies point inward

Keep business rules independent. Source-code dependencies point inward, toward higher-level policies:

The circles show nested boundaries. Arrows represent source-code dependencies, not execution order. Dependencies can skip layers while keeping this direction. Neither a circular drawing nor exactly four layers is required; the dependency rule is. See Robert C. Martin’s original explanation.

Dependency inversion (DIP)

High-level policies and low-level details depend on abstractions; those abstractions do not depend on implementation details. As shown on the right of the image, define the port (interface) in the inner layer that needs it, and make the outer adapter implement it.

For example, GetUserUseCase references only UserRepository; the outer PostgresUserRepository implements that port. At runtime, the use case calls the supplied implementation through the port. This is how calls can go outward while source-code dependencies stay inward. Dependency injection (DI) supplies the implementation; injection alone does not satisfy DIP if the use case still depends on the concrete class.

Small refactorings

Improve code in small steps. Follow Kent Beck’s simple design priorities: pass the tests, reveal intention, avoid duplication, and keep unnecessary elements out. Use abstractions when they solve a real problem.

The Clean Architecture skill and Kent Beck Style skill contain the full review checklists, report formats, and TypeScript, Python, and Java/Kotlin examples.

Contributing

Issues and pull requests are welcome, especially concrete review examples, clearer guidance, and verified agent installation fixes.

  • Edit the shared instructions in plugins//skills//SKILL.md.
  • Edit each plugin’s .codex-plugin/plugin.json as the single manifest source. .claude-plugin/plugin.json is a relative symlink to it. The marketplace catalogs stay separate because their schemas differ.
  • Keep the English and Korean READMEs in sync.

Run the checks with Node.js 24 or later; no dependencies need to be installed:

node --test

GitHub Actions checks plugin metadata and executable skill examples on Linux and Windows.

References

License

MIT — use, modify, and share.

View the full README on GitHub

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add nathankim0/clean-architecture-skills
New to MCP? Start with the mcpskill.org guide →