Claude-skill-registry general

General development guidelines prioritizing readability over performance, with rules for meaningful comments. Use when writing any code in this project.

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/general" ~/.claude/skills/majiayu000-claude-skill-registry-general && rm -rf "$T"
manifest: skills/data/general/SKILL.md
source content

General Development Guidelines

Apply these general guidelines to all code.

Priorities

Focus 80% on readability and 20% on performance.

In order of importance:

  1. Correctness and functionality
  2. Readability & Maintainability
  3. Performance

Comments

Add comments only when they explain WHY, not WHAT. The code itself should be readable enough to show WHAT it does.

DO NOT comment obvious operations

// Bad
// increment counter
counter++;

DO comment

  • Business logic reasoning
  • Non-obvious decisions
  • Workarounds or edge cases
  • Complex algorithms (brief summary of approach)

Example of a good comment

// Using ceil() here because partial units must be charged as full units per billing policy
const billableUnits = Math.ceil(usage / unitSize);