code-design

Category: Development & Coding | Uploader: gotgenesgotgenes | Downloads: 0 | Version: v1.0(Latest)

TypeScript conventions, code design principles (SOLID, self-documenting code, file organization), structural design heuristics (dependency width, LoD, output arguments), pnpm rules, ES2024 target, and Pi SDK patterns. Load during implementation, refactoring, or code review. --- # Code Style Load this skill when implementing, refactoring, or reviewing TypeScript code. ## Self-Documenting Code Code should be its own primary documentation. Prefer names that reveal intent — for functions, methods, classes, variables, and modules. **Names over comments:** If a comment is needed to explain _what_ code does, extract a well-named function or rename the symbol. Comments should explain _why_ — the reasoning or non-obvious context behind a decision. **Scope-appropriate naming:** Name length should correspond to scope. Short names (`i`, `x`, `fn`) are fine for small scopes (loop counters, short lambdas). Exported functions, module-level variables, and class names warrant longer, descriptive names. **Doc comments:** Add JSDoc/docstrings where the ecosystem expects them — typically on public/exported APIs. Do not add doc comments when the name and signature already convey usage. ## Code Organization

Changelog: Source: GitHub https://github.com/gotgenes/pi-packages

Directory Structure

Current level: tree/main/.pi/skills/code-design/

  • 📄 SKILL.md 7.3 KB

SKILL.md

Login to download/like/favorite ❤ 10 | ★ 0
Comments 0

Please login before commenting.

Loading comments...