Prerequisites: First set up the MCP server in your IDE, then follow the workflows below.
Overview
Once configured, you will be able to:- Browse your organizationâs coding patterns and standards
- Get specific guidance for the type of code being written
- Apply consistent patterns during code generation
- Create new patterns from review feedback
Discovering Patterns
Get Organization Patterns
1
Browse All Patterns
Ask Claude: âWhat custom context does my organization have?âClaude will show you all available patterns with details like:
- Pattern type (custom instruction vs pattern)
- Scope where it applies (file types, directories)
- Usage statistics and related comments
2
Search by Topic
Use natural language to find specific patterns:
- âFind coding patterns related to error handlingâ
- âShow me security-related coding standardsâ
- âWhat React patterns does my organization use?â
3
Get Pattern Details
For detailed information about a specific pattern:
- âTell me more about the async/await patternâ
- âShow me examples of the input validation standardâ
- âWhy do we have this authentication pattern?â
Find Relevant Context
Context by File Type:- âWhat patterns apply to TypeScript files?â
- âShow me Python-specific coding standardsâ
- âAre there any React component guidelines?â
- âWhat security patterns should I follow for authentication?â
- âShow me database-related coding standardsâ
- âAre there API design patterns I should use?â
Using Patterns in Code
Apply Context During Development
1
Load Patterns Before Coding
Before starting work on a new feature or file:
- âLoad all patterns relevant to authentication codeâ
- âWhat coding standards should I follow for this React component?â
- âShow me organization patterns for error handlingâ
2
Get Context-Specific Guidance
When writing specific types of code:
- âIâm writing a REST API endpoint, what patterns should I follow?â
- âWhat security patterns apply to user input validation?â
- âHow should I handle database connections based on our patterns?â
3
Validate Against Standards
Before committing code:
- âDoes this code follow our organizationâs patterns?â
- âAre there any style violations in this component?â
- âCheck if my error handling matches our standardsâ
Pattern-Guided Code Generation
Start New Features:Practical Examples
Security Pattern Application
Organization Pattern:âAll API endpoints must validate input using Joi schemas before processingâIn Claude Code:
Style Guide Enforcement
Organization Pattern:âUse async/await instead of Promise.then() for better readabilityâIn Cursor:
Architecture Pattern Guidance
Organization Pattern:âAlways use React hooks instead of class componentsâResolution Workflow:
Advanced Workflows
The following sections cover advanced automation. For basic pattern usage, the steps above are sufficient.
Creating New Patterns
From Code Review Feedback:Team Onboarding
New Developer Setup:Pattern Evolution
Update Patterns Based on Usage:Best Practices
Quick Reference: When to Use Different Pattern Types
Quick Reference: When to Use Different Pattern Types
When to Use Custom Instructions
- Coding style preferences (âUse camelCase for variablesâ)
- Framework usage guidelines (âPrefer hooks over class componentsâ)
- Security requirements (âAlways validate user inputâ)
When to Use Patterns
- Architecture decisions (âUse microservices for new featuresâ)
- Design principles (âFavor composition over inheritanceâ)
- Code organization rules (âGroup related functions in modulesâ)
Pattern Effectiveness Tips
- Be specific: âUse Joi for API validationâ vs âValidate inputsâ
- Include context: Explain why the pattern exists
- Scope appropriately: Apply patterns to relevant file types only
- Keep current: Update patterns as practices evolve
Human Oversight
- Review auto-suggestions: Verify AI-generated code follows patterns correctly
- Update regularly: Keep patterns current with evolving best practices
- Monitor usage: Track which patterns are most/least effective
- Team alignment: Ensure all team members understand pattern reasoning