Skip to content
Back to skills

Common Best Practices

ASecurity

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)

  • 43 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 30, 2026
developmentgojavaswift

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ComeOnOliver/skillshub --skill common-best-practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Common Best Practices?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Common Best Practices
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/comeonoliver-common-best-practices/badge)](https://www.skillsdirectory.com/skills/comeonoliver-common-best-practices)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: common-best-practices
description: "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)"
---

# 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

- **No hardcoded constants**: Use named config/env vars.
- **No deep nesting**: Guard clauses eliminate the Pyramid of Doom.
- **No global state**: Prefer dependency injection.
- **No empty catches**: Always handle, log, or rethrow.

## References

- [Code Structure Patterns](references/CODE_STRUCTURE.md) β€” file/function organization
- [Effectiveness Guide](references/EFFECTIVENESS.md) β€” practical application examples

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…