> common-best-practices

Universal clean-code principles for any environment. (triggers: **/*.ts, **/*.tsx, **/*.go, **/*.dart, **/*.java, **/*.kt, **/*.swift, **/*.py, solid, kiss, dry, yagni, naming, conventions, refactor, clean code)

fetch
$curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/common-best-practices?format=md"
SKILL.mdโ€ขcommon-best-practices

Global Best Practices

Priority: P0 (FOUNDATIONAL)

๐Ÿ— Core Principles

  • SOLID: Follow SRP (One reason to change), OCP (Open to extension), LSP, ISP, DIP.
  • KISS/DRY/YAGNI: Favor readability. Abstract repeated logic. No "just in case" code.
  • Naming: Intention-revealing (isUserAuthenticated > checkUser). Follow language casing.

๐Ÿงน Code Hygiene

  • Size Limits: Functions < 30 lines. Services < 600 lines. Utils < 400 lines.
  • Early Returns: Use guard clauses to prevent deep nesting.
  • Comments: Explain why, not what. Refactor instead of commenting bad code.
  • Sanitization: Validate all external inputs.

๐Ÿšซ Anti-Patterns

  • Hardcoded Constants: Use named config/constants.
  • Deep Nesting: Avoid "Pyramid of Doom".
  • Global State: Prefer dependency injection.
  • Empty Catches: Always handle, log, or rethrow.

โ”Œ stats

installs/wk0
โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘
github stars341
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ
first seenMar 17, 2026
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

โ”Œ repo

HoangNguyen0403/agent-skills-standard
by HoangNguyen0403
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€

โ”Œ tags

โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€