Claude Code Plugins

Community-maintained marketplace

Feedback

coding-practices

@eser/stack
83
0

Coding practices including error handling, input validation, logging, self-documenting code, and DRY principles. Use when writing code, handling errors, or improving code quality.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name coding-practices
description Coding practices including error handling, input validation, logging, self-documenting code, and DRY principles. Use when writing code, handling errors, or improving code quality.

Coding Practices

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

Quick Start

// 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 for complete guidelines with examples.