binance-mcp-server
Copilot instructions50 starsChanged 18 months agoMITView on GitHub
This guide establishes development standards and best practices for our tech stack: Python, FastAPI, FastMCP. Following these practices ensures maintainable, sustainable, and high-quality systems. when building the mcp server follow the guidelines available at https://modelcontextprotocol.io/quickstart/server using the #fetch tool
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
33 rules. About 0 are common, 27 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈27
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 7
Always prioritize readability and clarity.
- Distinctive: line 9
Write code with good maintainability practices, including comments on why certain design decisions were made.
- Distinctive: line 12
If possible use available tools to search libary documentation to write and suggestion updated code.
- Distinctive: line 13
Use consistent naming conventions and follow language-specific best practices.
- Distinctive: line 14
Write concise, efficient, and idiomatic code that is also easily understandable.
- Distinctive: line 20
Use the typing module for type annotations (e.g., List[str], Dict[str, int]).
- Distinctive: line 21
Create meaningful docstrings (Google style recommended)
- Very specific: line 24
Place function and class docstrings immediately after the def or class keyword.
- Distinctive: line 25
Use blank lines to separate functions, classes, and code blocks where appropriate.
- Distinctive: line 28
Prefer explicit code over implicit
- Very specific: line 29
Use virtual environments venv
- Very specific: line 30
Use uv as a package manager for Python projects
- Distinctive: line 32
Follow SOLID principles for OOP code
- Distinctive: line 34
Use enums for related constants
- Distinctive: line 37
Write unit tests with pytest (aim for >80% coverage)
- Distinctive: line 39
Use test fixtures for reusable test components
- Distinctive: line 42
Always include test cases for critical paths of the application.
- Distinctive: line 45
Write unit tests for functions and document them with docstrings explaining the test cases.
- Very specific: line 51
Use a structured format: <type>(<scope>): <subject>
- Distinctive: line 52
Keep first line under 72 characters
- Distinctive: line 53
Add detailed description after subject when needed
- Very specific: line 69
Use module/component name when applicable (auth, users, ui, etc.)
- Very specific: line 70
Use * for changes spanning multiple modules
- Distinctive: line 83
Never commit secrets or sensitive data
- Distinctive: line 84
Verify changes before committing (run tests)
- Distinctive: line 85
Keep commits small and focused
- Distinctive: line 107
Follow OWASP security guidelines
- Distinctive: line 113
Document system architecture and data flows
- Distinctive: line 114
Create API documentation (auto-generated + manual)
- Distinctive: line 116
Use diagrams for complex systems (C4 model recommended)
- Distinctive: line 120
Use pull requests for all changes
- Distinctive: line 127
Document architectural decisions (ADRs)
- Distinctive: line 128
Create onboarding guides for new team members
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions - Best Development Practices
This guide establishes development standards and best practices for our tech stack: Python, FastAPI, FastMCP. Following these practices ensures maintainable, sustainable, and high-quality systems. when building the mcp server follow the guidelines available at https://modelcontextprotocol.io/quickstart/server using the #fetch tool
General Instructions
- Always prioritize readability and clarity.
- For algorithm-related code, include explanations of the approach used.
- Write code with good maintainability practices, including comments on why certain design decisions were made.
- Handle edge cases and write clear exception handling.
- For libraries or external dependencies, mention their usage and purpose in comments.
- If possible use available tools to search libary documentation to write and suggestion updated code.
- Use consistent naming conventions and follow language-specific best practices.
- Write concise, efficient, and idiomatic code that is also easily understandable.
Python Development
Code Style & Structure
- Structure projects using a clear module hierarchy
- Use the typing module for type annotations (e.g., List[str], Dict[str, int]).
- Create meaningful docstrings (Google style recommended)
- Break down complex functions into smaller, more manageable functions.
- Maintain proper indentation (use 4 spaces for each level of indentation).
- Place function and class docstrings immediately after the
deforclasskeyword. - Use blank lines to separate functions, classes, and code blocks where appropriate.
Python Best Practices
- Prefer explicit code over implicit
- Use virtual environments
venv - Use
uvas a package manager for Python projects - Implement comprehensive error handling with specific exception types
- Follow SOLID principles for OOP code
- Leverage dataclasses for data containers
- Use enums for related constants
Testing and Edge Cases
- Write unit tests with pytest (aim for >80% coverage)
- Implement integration and end-to-end tests
- Use test fixtures for reusable test components
- Mock external dependencies and services
- Practice TDD where applicable
- Always include test cases for critical paths of the application.
- Account for common edge cases like empty inputs, invalid data types, and large datasets.
- Include comments for edge cases and the expected behavior in those cases.
- Write unit tests for functions and document them with docstrings explaining the test cases.
Version Control & Commit Practices
Commit Message Structure
- Use a structured format:
<type>(<scope>): <subject> - Keep first line under 72 characters
- Add detailed description after subject when needed
- Reference issue numbers where applicable
Commit Types
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code change that neither fixes a bug nor adds a featureperf: Performance improvementstest: Adding or modifying testschore: Build process or tooling changesci: CI configuration changesrevert: Reverting previous changes
Scope Guidelines
- Use module/component name when applicable (
auth,users,ui, etc.) - Use
*for changes spanning multiple modules - Optional but recommended for clarity
Commit Message Examples
feat(auth): implement OAuth2 login flowfix(api): correct status code for validation errorsdocs(readme): update deployment instructionsrefactor(models): simplify user schematest(endpoints): add tests for profile update
Commit Content Best Practices
- Make atomic commits (one logical change per commit)
- Separate refactoring commits from feature commits
- Never commit secrets or sensitive data
- Verify changes before committing (run tests)
- Keep commits small and focused
Smart Commit Messages
- Include details that reflect code modifications:
feat(database): add migration for user preferences tablefix(validation): handle null values in email validatorrefactor(services): extract authentication logic to dedicated module
- Reference performance impacts if applicable:
perf(queries): optimize user search by adding index (50% faster)
Code Change Analysis for Commits
- For API changes:
feat(api): add endpoint for user preferences [POST /users/{id}/preferences] - For UI changes:
feat(ui): implement responsive navigation menu - For dependency updates:
chore(deps): update FastAPI to 0.95.0 - For schema changes:
feat(models): add email verification fields to User model - For bug fixes:
fix(auth): prevent token refresh after password change [CVE-2023-1234]
Security
- Store secrets in environment variables or secure vaults
- Implement proper authentication and authorization
- Regularly update dependencies
- Scan for vulnerabilities
- Follow OWASP security guidelines
Project Management
Documentation
- Maintain comprehensive README.md files
- Document system architecture and data flows
- Create API documentation (auto-generated + manual)
- Implement change logs
- Use diagrams for complex systems (C4 model recommended)
Code Review Process
- Establish code review checklist
- Use pull requests for all changes
- Enforce style guidelines through automation
- Focus reviews on logic and architecture
- Provide constructive feedback
Knowledge Sharing
- Schedule regular knowledge sharing sessions
- Document architectural decisions (ADRs)
- Create onboarding guides for new team members
- Maintain a technical wiki or knowledge base
- Encourage pair programming for complex features
Conclusion
These practices provide a foundation for building maintainable, sustainable systems using our tech stack. Adapt these guidelines to your specific project needs while maintaining the core principles of clean code, good documentation, and responsible development practices.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

