mcpField
C
code-style

code-style

github.com/frappeDevelopment159920 installsUpdated 2d ago
Repository

About code-style

A set of code organization and style rules for developers aiming to keep code concise and readable. It covers function and file structure, ordering, comments, and when to introduce abstractions.

Key features

  1. 01Keep functions small and focused
  2. 02Split long files by responsibility
  3. 03Place public functions near the top
  4. 04Comment on surprising behavior and why
  5. 05Avoid premature abstractions

Use cases

  1. 01Set code review conventions for a team
  2. 02Refactor functions with multiple jobs
  3. 03Plan how to split a long file

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/frappe/skills --skill code-style

After installing, type/code-stylein Claude Code to confirm it loaded.

Details

From the project README

Code Style Rules

  • Keep functions small. Split when a function has multiple jobs or needs sections to be readable.
  • Keep files under 300 lines when practical. Split by responsibility, not by arbitrary layer.
  • Prefer object-oriented code over scattered functions.
  • Put higher-order/public functions near the top of the file; keep low-level utilities at the bottom.
  • Write terse, simple English comments. Explain why something is surprising; do not narrate obvious code.
  • Do not add abstractions until there are repeated concrete uses.

Comments

Markdown supported