AI Summary1. Maintainability over Speed: Prioritize long-term code health over initial development velocity 2. Simplicity First: Choose the simplest solution that meets requirements (YAGNI principle) 3. Explicit over Implicit: Make intentions clear through code structure and naming
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to install the "coding-principles" skill in my project. Please run this command in my terminal: # Install skill into your project (2 files) mkdir -p .claude/skills/coding-principles && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/coding-principles/SKILL.md "https://raw.githubusercontent.com/shinpr/claude-code-workflows/main/skills/coding-principles/SKILL.md" && mkdir -p .claude/skills/coding-principles/references && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/coding-principles/references/security-checks.md "https://raw.githubusercontent.com/shinpr/claude-code-workflows/main/skills/coding-principles/references/security-checks.md" Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.
Description
Language-agnostic coding principles for maintainability, readability, and quality. Use when implementing features, refactoring code, or reviewing code quality.
Core Philosophy
• Maintainability over Speed: Prioritize long-term code health over initial development velocity • Simplicity First: Choose the simplest solution that meets requirements (YAGNI principle) • Explicit over Implicit: Make intentions clear through code structure and naming • Delete over Comment: Remove unused code instead of commenting it out
Continuous Improvement
• Refactor related code within each change set — address style, naming, or structure issues in the files being modified • Improve code structure incrementally • Keep the codebase lean and focused • Delete unused code immediately
Readability
• Use meaningful, descriptive names drawn from the problem domain • Use full words in names; abbreviations are acceptable only when widely recognized in the domain • Use descriptive names; single-letter names are acceptable only for loop counters or well-known conventions (i, j, x, y) • Extract magic numbers and strings into named constants • Keep code self-documenting where possible
Parameter Management
• Recommended: 0-2 parameters per function • For 3+ parameters: Use objects, structs, or dictionaries to group related parameters • Example (conceptual): ` // Instead of: createUser(name, email, age, city, country) // Use: createUser(userData) `
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster