General Coding Standards
Universal coding standards applicable across all programming languages
Install / Use
npx skills add devhax-heavy-industries/crustchanInstalls into whichever agent you are using.
.clinerules
Cline rules
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Skill content
View source on GitHubname: General Coding Standards paths: "**/*.{ts,tsx,rs}" description: Universal coding standards applicable across all programming languages
You are an expert in software engineering, clean code principles, and best practices.
Naming Conventions
- Use descriptive and meaningful names
- Be consistent with naming patterns
- Avoid abbreviations and single letters (except loop counters)
- Use searchable names for constants
- Make the purpose clear from the name
Examples
// Good
const MAX_RETRY_ATTEMPTS = 3;
const userAuthenticationToken = generateToken();
function calculateCompoundInterest(principal, rate, time) {}
// Bad
const max = 3;
const tkn = generateToken();
function calc(p, r, t) {}
Function Design
- Keep functions small and focused (single responsibility)
- Limit function parameters (ideally 3 or fewer)
- Use descriptive function names that indicate action
- Avoid side effects when possible
- Return early to reduce nesting
# Good
def calculate_order_total(items: List[OrderItem]) -> Decimal:
if not items:
return Decimal('0.00')
subtotal = sum(item.price * item.quantity for item in items)
return apply_taxes(subtotal)
# Bad
def process(data):
# 200 lines of mixed concerns
# Multiple responsibilities
# Hidden side effects
Code Organization
- Group related functionality together
- Use consistent file structure
- Separate concerns into modules/classes
- Keep files focused and reasonably sized
- Use clear folder hierarchies
packages/
package/
├── src/
│ ├── controllers/
│ ├── services/
│ ├── models/
│ ├── utils/
│ └── config/
├── tests/
├── docs/
└── scripts/
Error Prevention
- Validate inputs at boundaries
- Use type systems when available
- Handle edge cases explicitly
- Fail fast with clear messages
- Use defensive programming techniques
function divideNumbers(dividend: number, divisor: number): number {
if (divisor === 0) {
throw new Error('Division by zero is not allowed');
}
if (!Number.isFinite(dividend) || !Number.isFinite(divisor)) {
throw new Error('Invalid number provided');
}
return dividend / divisor;
}
Code Readability
- Write code for humans to read
- Use consistent formatting
- Add whitespace for visual separation
- Limit line length (80-120 characters)
- Use meaningful variable names
DRY Principle
- Don't Repeat Yourself
- Extract common functionality
- Use configuration over duplication
- Create reusable components
- Balance DRY with clarity
SOLID Principles
- Single Responsibility: One reason to change
- Open/Closed: Open for extension, closed for modification
- Liskov Substitution: Subtypes must be substitutable
- Interface Segregation: Many specific interfaces
- Dependency Inversion: Depend on abstractions
Best Practices
- Prefer composition over inheritance
- Write tests for your code
- Refactor regularly
- Use version control effectively
- Document architectural decisions
Related Skills
career-ops
72.3kOpen-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)
ai-job-search
43.5kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.6kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
guizang-ppt-skill
26.7kAI-agent Skill for generating polished HTML slide decks: editorial magazine and Swiss layouts, image prompts, social covers, and a WebGL/low-power presentation runtime.
Security Score
Audited on Invalid Date
