Code Style

frappe/skills/skills/code-style

by frappe0bef982e933705c30706efc1db3bc3bc5e7aca62No licenseListed Oct 9, 2026Updated Oct 9, 2026

Code style rules for readable, maintainable implementation. Load this skill always when writing or editing code, and whenever the user asks about code style, refactoring shape, function/file size, object-oriented structure, helper ordering, or comments. For Frappe-specific work, prefer frappe-app-dev.

Instructions onlySoftware Development
AI-generated overview

Provides code style rules for readable, maintainable implementation when writing or editing code.

What it does
This skill supplies a short set of code style rules covering function size, file length, object-oriented structure, helper ordering, and comment style. It is an instructions-only reference with no scripts or assets, meant to be loaded while writing or editing code. It produces guidance rather than files or code artifacts.
When to use it
Use it when writing or editing code, or when the user asks about code style, refactoring shape, function or file size, object-oriented structure, helper ordering, or comments. For Frappe-specific work, the skill itself points to a different skill instead.
Requirements
None beyond the agent; it is instructions only and ships no scripts.

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.

Source and attribution

Source:frappe/skillsinskills/code-styleat commit0bef982

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal