Agent skill
claude-framework
CLAUDE Framework coding standards for code quality, naming conventions, error handling, security, testing, database, and logging
Install this agent skill to your Project
npx add-skill https://github.com/vineethsoma/agent-packages/tree/main/skills/claude-framework
SKILL.md
CLAUDE Framework
Production-ready coding standards for building maintainable, secure, and well-tested software.
Code Quality (C-1 to C-5)
- C-1: Single Responsibility Principle - each function/class does ONE thing
- C-2: DRY (Don't Repeat Yourself) - no code duplication
- C-3: KISS (Keep It Simple) - simplicity over complexity
- C-4: Functions maximum 20 lines (split if longer)
- C-5: Prefer composition over inheritance
Naming Conventions (N-1 to N-6)
- N-1: Use descriptive names that explain intent
- N-2: Functions = verbs:
calculateTotal(),validateUserInput() - N-3: Variables = nouns:
userAccount,totalPrice - N-4: Booleans start with is/has/can/should:
isValid,hasPermission - N-5: Constants in UPPER_SNAKE_CASE:
MAX_RETRY_ATTEMPTS - N-6: Avoid abbreviations: use
usernotusr
Error Handling (E-1 to E-5)
- E-1: Handle ALL possible error scenarios
- E-2: Use specific error types/messages
- E-3: Log errors with context information
- E-4: NEVER allow silent failures
- E-5: Fail fast - validate inputs early
Security (SEC-1 to SEC-5)
- SEC-1: Validate ALL inputs at system boundaries
- SEC-2: Sanitize output data
- SEC-3: Use environment variables for secrets
- SEC-4: Never hardcode sensitive information
- SEC-5: Implement proper authentication and authorization
Testing Standards (T-1 to T-5)
- T-1: Write failing test first, then implement (TDD)
- T-2: Minimum 80% code coverage for new code
- T-3: Test happy path, error scenarios, and edge cases
- T-4: Descriptive test names explaining what is tested
- T-5: Arrange-Act-Assert pattern clearly separated
Test Quality (TQ-1 to TQ-5)
- TQ-1: Use realistic test data, no magic numbers
- TQ-2: One assertion per test where possible
- TQ-3: Ensure test isolation
- TQ-4: Tests must be deterministic (no flaky tests)
- TQ-5: Tests should run fast (mock external dependencies)
Database (DB-1 to DB-4)
- DB-1: Use transactions for multi-step operations
- DB-2: Optimize queries (avoid N+1 problems)
- DB-3: Document indexing strategy
- DB-4: Create migration and rollback scripts
Logging (L-1 to L-4)
- L-1: Structured logging (JSON format)
- L-2: NEVER log sensitive data
- L-3: Include correlation IDs for tracing
- L-4: Use appropriate log levels: DEBUG, INFO, WARN, ERROR
Code Structure Requirements
- Organize imports clearly (stdlib, third-party, local)
- Define constants at module level
- Use pure functions where possible
- Implement proper error boundaries
- Include comprehensive JSDoc/comments for complex logic
- Follow consistent indentation (2 or 4 spaces)
- Maximum 120 characters per line
Quality Assurance Checklist
Before delivering code, verify:
- ✅ Functions under 20 lines
- ✅ Single responsibility maintained
- ✅ No code duplication
- ✅ Clear naming conventions followed
- ✅ All errors handled with specific types
- ✅ Input validation implemented
- ✅ Output sanitization applied
- ✅ Tests written and passing (80%+ coverage)
- ✅ Security considerations addressed
- ✅ Performance implications considered
- ✅ Documentation updated
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
mcp-specialist
MCP server lifecycle management, catalog maintenance, and agent tool provisioning Use when working with management, provision, server, specialist.
agent-package-manager
Agent for creating and managing APM agent packages with kebab-case naming enforcement Use when working with agent, compliance, create, lifecycle, manager.
docker-compose
Docker Compose management for orchestrating MCP servers and multi-container applications. Use when deploying MCP servers, managing container lifecycles, or configuring service dependencies.
retrospective-workflow
Systematic post-story retrospective process with automated metrics gathering, structured feedback collection, and Agent Package Manager handoff generation
vector-search
Semantic search using vector embeddings and similarity metrics. Apply when implementing search with embeddings (OpenAI, Sentence Transformers) or distance-based ranking. Covers cosine similarity, Euclidean distance, dot product, and threshold selection.
secure-development
Security best practices for production applications including PII protection, input validation, SQL injection prevention, XSS mitigation, and secure logging. Apply when handling user data, authentication, or external inputs.
Didn't find tool you were looking for?