Claude Code module design with a small public interface
State the module's purpose, expose the methods callers need, and test observable behavior at the interface.
中文Install in Claude Code
Open existing code or a design draft in Claude Code. The fixture reviews an interface proposal without launching LiCode services.
- Review `.claude/skills/codebase-design/SKILL.md` and its requirements at the pinned GitHub commit.
- Create `.claude/skills/codebase-design/` in your project and save the reviewed file as `.claude/skills/codebase-design/SKILL.md`.
- Start Claude Code from that project's root, then select `/codebase-design` in the slash menu.
Example task
Use {module: 'ReadingQueue', actions: 'append next', internal: 'priority buckets'}. Callers only add books and retrieve the next one.What to check
Document {module: 'ReadingQueue', public: 'append next', exposeBuckets: false}. Verify the next book through the public next method.
Original SKILL.md on GitHub · Updated
Frequently asked question
When should a public method be added?
Add one when callers have a distinct requirement that existing methods cannot express. Keep ordering and storage decisions inside the module.