High-quality, complete code implementation rules for repository search and analysis applications. Emphasizes atomization, clean architecture, and full feature delivery with no placeholders or incomplete work.
A comprehensive skill for building high-quality, production-ready code with emphasis on complete implementations, clean architecture, and maintainable solutions. Perfect for repository search and analysis applications.
This skill enforces strict development standards focused on:
When implementing any feature:
1. **Deliver Complete Code Only**
- Never use placeholders, stubs, or "TODO" comments
- Every function, component, and feature must be fully implemented
- Code must be production-ready and immediately functional
2. **Solution-Focused Communication**
- Provide direct solutions without unnecessary disclaimers
- Skip phrases like "I apologize" or "As an AI"
- Users understand your capabilities—focus on delivering value
3. **Full Feature Implementation**
- Implement every requested feature completely and correctly
- Test all edge cases and scenarios
- Ensure all dependencies and imports are included
1. **Atomization and Reusability**
- Break down code into small, single-responsibility components
- Create highly modular, reusable pieces
- Each component should do one thing exceptionally well
- Favor composition over large monolithic structures
2. **Readability Over Performance**
- Use clear, descriptive variable and function names
- Maintain consistent code structure and formatting
- Apply DRY (Don't Repeat Yourself) principles rigorously
- Comment the "why" behind complex logic, not the "what"
3. **Code Verification**
- Review all code before submission
- Verify all imports and dependencies are included
- Check for type safety and proper error handling
- Ensure code follows language-specific best practices
1. **Pre-Implementation Planning**
- Present pseudocode or architectural outline before coding
- Discuss approach for complex features
- Confirm understanding of requirements
2. **Clarification First**
- Ask questions when requirements are ambiguous
- Confirm understanding rather than making assumptions
- Discuss architectural decisions that impact the codebase
1. **Robust Error Handling**
- Implement comprehensive try/catch patterns
- Handle all edge cases and failure scenarios
- Provide meaningful error messages
- Never let unhandled exceptions crash the application
2. **Security Best Practices**
- Validate all user inputs
- Sanitize data before processing
- Follow OWASP guidelines for web applications
- Implement proper authentication and authorization
- Protect against common vulnerabilities (XSS, SQL injection, etc.)
3. **Fix, Don't Apologize**
- When errors occur, correct them immediately
- Explain the fix briefly and move forward
- Learn from mistakes to prevent recurrence
1. **Respect Existing Patterns**
- Follow established architecture (MVVM, MVC, Clean Architecture)
- Maintain consistency with existing code style
- Use the same patterns and conventions as the codebase
2. **Dependency Management**
- Consult before adding new libraries or frameworks
- Justify new dependencies with clear benefits
- Use specified tools (SwiftUI, Next.js, TypeScript, etc.)
- Never introduce unnecessary dependencies
3. **Framework-Specific Best Practices**
- For Swift: Use modern Swift features, SwiftUI best practices
- For TypeScript: Leverage type system fully, use modern ES features
- For Node.js: Follow async/await patterns, handle streams properly
- For GitHub Actions: Use caching, matrix builds, secure secrets
1. **Unit Testing**
- Write tests for all core functions and business logic
- Aim for high code coverage (80%+ for critical paths)
- Test edge cases and error conditions
- Use appropriate testing frameworks (Jest, XCTest, etc.)
2. **Integration Testing**
- Verify system components work together correctly
- Test API endpoints and database interactions
- Validate data flow between layers
- Test third-party integrations (CSV parsing, GitHub API)
3. **CI/CD Integration**
- Set up automated testing in GitHub Actions
- Configure linting and type checking
- Implement automated deployment pipelines
- Add code quality gates
1. **Code-Level Documentation**
- Add docstrings to all public functions and classes
- Explain complex algorithms and business logic
- Document parameters, return values, and exceptions
- Keep comments updated with code changes
2. **Automated Documentation**
- Use documentation generation tools (DocC, TSDoc, JSDoc)
- Generate API documentation automatically
- Keep documentation in sync with code
3. **Project Documentation**
- Maintain clear README with setup instructions
- Document architecture and design decisions
- Provide examples and usage guidelines
- Keep documentation concise and scannable
1. **Code Review Culture**
- Write self-documenting code for easier reviews
- Respond constructively to feedback
- Review others' code thoroughly and respectfully
2. **Version Control**
- Write meaningful, descriptive commit messages
- Create focused, single-purpose commits
- Use feature branches for new work
- Keep main/master branch stable and deployable
3. **User Engagement**
- Ask clarifying questions early
- Suggest improvements proactively
- Respect user decisions on architecture and approach
- Provide options with trade-offs when multiple solutions exist
When building a search interface:
```typescript
// ❌ BAD: Monolithic component
function SearchPage() {
// 500 lines of mixed logic
}
// ✅ GOOD: Atomized components
function SearchPage() {
return (
<SearchLayout>
<SearchInput onSearch={handleSearch} />
<FilterPanel filters={filters} />
<SearchResults results={results} />
<Pagination currentPage={page} />
</SearchLayout>
);
}
```
```typescript
// ❌ BAD: Placeholder
async function fetchRepositories(query: string) {
// TODO: Implement repository fetching
return [];
}
// ✅ GOOD: Complete implementation
async function fetchRepositories(query: string): Promise<Repository[]> {
try {
const response = await fetch(`/api/repositories?q=${encodeURIComponent(query)}`);
if (!response.ok) {
throw new Error(`Failed to fetch repositories: ${response.statusText}`);
}
const data = await response.json();
return data.repositories;
} catch (error) {
console.error('Repository fetch error:', error);
throw new Error('Failed to load repositories. Please try again.');
}
}
```
```typescript
// ✅ GOOD: Input validation and sanitization
function sanitizeSearchQuery(query: string): string {
// Remove potential injection characters
const sanitized = query
.trim()
.replace(/[<>]/g, '')
.substring(0, 200); // Limit length
if (!sanitized) {
throw new Error('Search query cannot be empty');
}
return sanitized;
}
```
Your implementation meets this skill's standards when:
1. Zero placeholders or incomplete code exist
2. All components are small, focused, and reusable
3. Error handling covers all edge cases
4. Security best practices are applied throughout
5. Tests validate core functionality and integrations
6. Documentation explains the "why" behind decisions
7. Code follows established patterns and conventions
8. All requested features work correctly end-to-end
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/cursorrules-database-development-guidelines/raw