agentleFS
AnalyticAceAnalyticAce/binance-mcp-server/.github/copilot-instructions.md

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
  1. Distinctive:

    Always prioritize readability and clarity.

    line 7
  2. Distinctive:

    Write code with good maintainability practices, including comments on why certain design decisions were made.

    line 9
  3. Distinctive:

    If possible use available tools to search libary documentation to write and suggestion updated code.

    line 12
  4. Distinctive:

    Use consistent naming conventions and follow language-specific best practices.

    line 13
  5. Distinctive:

    Write concise, efficient, and idiomatic code that is also easily understandable.

    line 14
  6. Distinctive:

    Use the typing module for type annotations (e.g., List[str], Dict[str, int]).

    line 20
  7. Distinctive:

    Create meaningful docstrings (Google style recommended)

    line 21
  8. Very specific:

    Place function and class docstrings immediately after the def or class keyword.

    line 24
  9. Distinctive:

    Use blank lines to separate functions, classes, and code blocks where appropriate.

    line 25
  10. Distinctive:

    Prefer explicit code over implicit

    line 28
  11. Very specific:

    Use virtual environments venv

    line 29
  12. Very specific:

    Use uv as a package manager for Python projects

    line 30
  13. Distinctive:

    Follow SOLID principles for OOP code

    line 32
  14. Distinctive:

    Use enums for related constants

    line 34
  15. Distinctive:

    Write unit tests with pytest (aim for >80% coverage)

    line 37
  16. Distinctive:

    Use test fixtures for reusable test components

    line 39
  17. Distinctive:

    Always include test cases for critical paths of the application.

    line 42
  18. Distinctive:

    Write unit tests for functions and document them with docstrings explaining the test cases.

    line 45
  19. Very specific:

    Use a structured format: <type>(<scope>): <subject>

    line 51
  20. Distinctive:

    Keep first line under 72 characters

    line 52
  21. Distinctive:

    Add detailed description after subject when needed

    line 53
  22. Very specific:

    Use module/component name when applicable (auth, users, ui, etc.)

    line 69
  23. Very specific:

    Use * for changes spanning multiple modules

    line 70
  24. Distinctive:

    Never commit secrets or sensitive data

    line 83
  25. Distinctive:

    Verify changes before committing (run tests)

    line 84
  26. Distinctive:

    Keep commits small and focused

    line 85
  27. Distinctive:

    Follow OWASP security guidelines

    line 107
  28. Distinctive:

    Document system architecture and data flows

    line 113
  29. Distinctive:

    Create API documentation (auto-generated + manual)

    line 114
  30. Distinctive:

    Use diagrams for complex systems (C4 model recommended)

    line 116
  31. Distinctive:

    Use pull requests for all changes

    line 120
  32. Distinctive:

    Document architectural decisions (ADRs)

    line 127
  33. Distinctive:

    Create onboarding guides for new team members

    line 128

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

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 def or class keyword.
  • 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 uv as 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 feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Performance improvements
  • test: Adding or modifying tests
  • chore: Build process or tooling changes
  • ci: CI configuration changes
  • revert: 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 flow
  • fix(api): correct status code for validation errors
  • docs(readme): update deployment instructions
  • refactor(models): simplify user schema
  • test(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 table
    • fix(validation): handle null values in email validator
    • refactor(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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.