Skip to content
Back to skills

Coding Practices

ASecurity

Code quality practices: error handling, validation, logging, and DRY. Use when writing or reviewing code.

  • 666 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 8, 2026
developmenttypescript

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill coding-practices --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Coding Practices?

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

Security grade badge for Coding Practices
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-coding-practices/badge)](https://www.skillsdirectory.com/skills/majiayu000-coding-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: coding-practices
description: Code quality practices: error handling, validation, logging, and DRY. Use when writing or reviewing code.
---

# Coding Practices

Guidelines for writing maintainable, robust, and self-documenting code.

## Quick Start

```typescript
// Self-documenting with proper error handling
function createUser(email: string, age: number): User {
  if (!email.includes("@")) throw new Error("Invalid email");
  if (age < 0 || age > 150) throw new Error("Invalid age");
  return { email, age };
}
```

## Key Principles

- Use meaningful names (self-documenting code)
- Comments explain "why", not "what"
- DRY: abstract when used 3+ times
- Validate all input data
- Handle all error cases with proper Error objects
- Never ignore errors
- Use named constants instead of magic values
- Avoid circular dependencies

## References

See [rules.md](references/rules.md) for complete guidelines with 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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.