Skip to main content
Glama

AI Development Guidelines MCP Server

skills.md8.58 kB
# Professional Development Skills & Best Practices ## Core Development Skills ### 1. Problem Decomposition **Breaking down complex problems into manageable pieces** - Start with the big picture, then break into smaller components - Identify dependencies between components - Create a clear execution plan - Tackle one piece at a time - Validate each piece before moving forward **Example Approach:** ``` Large Feature → Components → Functions → Implementation ``` ### 2. Debugging Methodology **Systematic approach to finding and fixing bugs** #### The Scientific Method 1. **Reproduce**: Confirm the bug consistently occurs 2. **Isolate**: Narrow down where the problem occurs 3. **Hypothesize**: Form theories about the cause 4. **Test**: Verify or disprove each hypothesis 5. **Fix**: Implement the solution 6. **Verify**: Ensure the fix works and doesn't break anything else #### Debugging Tools - Print/console statements for quick insights - Debugger breakpoints for step-through analysis - Logging for production debugging - Stack traces for error context - Unit tests to isolate issues ### 3. Code Reading & Understanding **Effectively understanding existing codebases** #### Steps to Understand New Code 1. Read the README and documentation first 2. Understand the project structure and architecture 3. Identify the entry point (main.py, index.js, etc.) 4. Follow the flow of a typical request/operation 5. Look for patterns and conventions 6. Note dependencies and external services #### Questions to Ask - What problem does this code solve? - What are the main components? - How do components interact? - What are the data flows? - Where are the external dependencies? ### 4. Refactoring Skills **Improving code without changing functionality** #### When to Refactor - Code duplication (DRY violation) - Functions longer than ~50 lines - Deeply nested conditionals - Poor naming or unclear intent - Performance bottlenecks - Before adding new features #### Safe Refactoring Steps 1. Ensure tests exist (write them if needed) 2. Make small, incremental changes 3. Run tests after each change 4. Commit working states frequently 5. Use IDE refactoring tools when available #### Common Refactoring Patterns - Extract method/function - Rename for clarity - Extract class/module - Simplify conditionals - Remove dead code ### 5. API Design Skills **Creating clean, intuitive interfaces** #### RESTful API Design ``` GET /users # List users GET /users/:id # Get specific user POST /users # Create user PUT /users/:id # Update user DELETE /users/:id # Delete user ``` #### Good API Characteristics - **Consistent**: Predictable patterns across endpoints - **Intuitive**: Easy to understand without extensive docs - **Versioned**: Can evolve without breaking clients - **Well-documented**: Clear examples and descriptions - **Error-friendly**: Meaningful error messages ### 6. Database Design Skills **Structuring data effectively** #### Key Principles - Normalize to reduce redundancy - Index frequently queried fields - Use appropriate data types - Consider query patterns when designing - Plan for scalability #### Common Patterns ```sql -- One-to-Many CREATE TABLE users ( id SERIAL PRIMARY KEY, username VARCHAR(50) UNIQUE ); CREATE TABLE posts ( id SERIAL PRIMARY KEY, user_id INTEGER REFERENCES users(id), content TEXT ); -- Many-to-Many CREATE TABLE users_roles ( user_id INTEGER REFERENCES users(id), role_id INTEGER REFERENCES roles(id), PRIMARY KEY (user_id, role_id) ); ``` ### 7. Testing Skills **Writing effective tests** #### Test Pyramid ``` /\ /UI\ Few - Slow - Expensive /____\ /Integ-\ Medium number /ration \ /__________\ / Unit \ Many - Fast - Cheap /______________\ ``` #### Good Test Characteristics - **Independent**: Tests don't depend on each other - **Repeatable**: Same results every time - **Fast**: Quick feedback loop - **Comprehensive**: Cover edge cases - **Readable**: Clear what's being tested #### Test Structure (Arrange-Act-Assert) ```python def test_user_creation(): # Arrange username = "testuser" email = "test@example.com" # Act user = create_user(username, email) # Assert assert user.username == username assert user.email == email assert user.id is not None ``` ### 8. Security Awareness **Building secure applications** #### Key Security Principles - **Least Privilege**: Grant minimum necessary permissions - **Defense in Depth**: Multiple layers of security - **Fail Securely**: Default to denying access - **Never Trust Input**: Validate and sanitize everything - **Keep Secrets Secret**: Use environment variables and vaults #### Common Vulnerabilities (OWASP Top 10) 1. Injection (SQL, Command, etc.) 2. Broken Authentication 3. Sensitive Data Exposure 4. XML External Entities (XXE) 5. Broken Access Control 6. Security Misconfiguration 7. Cross-Site Scripting (XSS) 8. Insecure Deserialization 9. Using Components with Known Vulnerabilities 10. Insufficient Logging & Monitoring ### 9. Performance Optimization **Making applications fast and efficient** #### Optimization Strategy 1. **Measure First**: Profile before optimizing 2. **Identify Bottlenecks**: Focus on the slowest parts 3. **Optimize Smartly**: Target high-impact areas 4. **Measure Again**: Verify improvements 5. **Consider Trade-offs**: Balance speed, memory, complexity #### Common Optimizations - Database query optimization (indexes, query structure) - Caching (Redis, in-memory, CDN) - Lazy loading and pagination - Async/parallel processing - Code-level optimizations (algorithms, data structures) ### 10. Documentation Skills **Communicating through code and docs** #### Code Documentation ```python def calculate_discount(price: float, discount_percent: float) -> float: """ Calculate the discounted price. Args: price: Original price before discount discount_percent: Discount percentage (0-100) Returns: Final price after applying discount Raises: ValueError: If discount_percent is not between 0 and 100 Example: >>> calculate_discount(100.0, 20.0) 80.0 """ if not 0 <= discount_percent <= 100: raise ValueError("Discount must be between 0 and 100") return price * (1 - discount_percent / 100) ``` #### README Structure ```markdown # Project Name Brief description of what the project does ## Features - Feature 1 - Feature 2 ## Installation Step-by-step setup instructions ## Usage Code examples ## API Documentation Endpoint descriptions ## Contributing How to contribute ## License ``` ## Soft Skills for Developers ### 1. Communication - Write clear commit messages and PR descriptions - Document complex decisions - Ask questions when unclear - Provide context in bug reports ### 2. Collaboration - Review code constructively - Accept feedback graciously - Share knowledge with team - Help unblock teammates ### 3. Time Management - Break work into small tasks - Estimate realistically - Focus on one thing at a time - Take breaks to maintain productivity ### 4. Continuous Learning - Read documentation thoroughly - Study other people's code - Stay updated with best practices - Experiment with new technologies ## Development Workflow ### Daily Development Process ``` 1. Pull latest changes 2. Create feature branch 3. Write failing test (TDD) 4. Implement feature 5. Make test pass 6. Refactor if needed 7. Run all tests 8. Commit with clear message 9. Push and create PR 10. Address review feedback 11. Merge when approved ``` ### Project Kickoff Checklist - [ ] Understand requirements clearly - [ ] Design system architecture - [ ] Set up development environment - [ ] Configure linters and formatters - [ ] Set up CI/CD pipeline - [ ] Create project documentation - [ ] Define coding standards - [ ] Plan testing strategy ## Tools Mastery ### Essential Developer Tools - **Version Control**: Git (branching, merging, rebasing) - **Code Editor**: VS Code, PyCharm, etc. (shortcuts, extensions) - **Terminal**: Bash/Zsh (navigation, pipes, scripts) - **Debugger**: Language-specific debuggers - **Database Tools**: SQL clients, ORMs - **API Testing**: Postman, curl, httpie - **Package Managers**: pip, npm, cargo, etc. ### Keyboard Shortcuts to Master - Navigate files quickly - Multi-cursor editing - Code completion and snippets - Refactoring shortcuts - Debugging controls - Terminal integration

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anip1805-dotcom/MCPCodeAI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server