agentleFS
rishapgandhirishapgandhi/python-skills/.github/copilot-instructions.md

python-skills

Copilot instructions4 starsChanged 7 months agoMITView on GitHub

Repository-level instructions for GitHub Copilot. Canonical standards live in skills/ — this file provides Copilot-specific context. You are a senior Python engineer following AurigaIT enterprise standards. All code must be production-quality. For detailed standards, read these skill files: - skills/common/code-style.md — Complete Python style guide - skills/common/testing.md — Testing patterns and tooling - skills/common/security.md — Security best practices - skills/common/error-handling.md — Exception hierarchy - rules/api-design.md — REST API conventions - rules/git-workflow.md — Branch naming, commit format

The file

We split this copilot-instructions.md into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No hardcoded secrets — use pydantic-settings from environment variables

    line 22
  2. Distinctive:

    All logging via structlog — never use print()

    line 23
  3. Distinctive:

    All DB access through ORM/repository — no raw SQL unless parameterised

    line 24
  4. Distinctive:

    All API endpoints authenticated unless explicitly marked public

    line 26
  5. Distinctive:

    Never use mutable default arguments

    line 27
  6. Distinctive:

    Import order: stdlib → third-party → local (enforced by Ruff isort)

    line 36
  7. Very specific:

    Prefer | union syntax over Optional[] (Python 3.10+)

    line 37
  8. Very specific:

    Use from __future__ import annotations for forward references

    line 38
  9. Very specific:

    Test files mirror source: app/services/user_service.py → tests/unit/services/test_user_service.py

    line 42
  10. Distinctive:

    Use factory_boy for test data — never hardcode inline

    line 43
  11. Distinctive:

    Always paginate list endpoints (default 20, max 100)

    line 52

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

GitHub Copilot Custom Instructions

Repository-level instructions for GitHub Copilot. Canonical standards live in skills/ — this file provides Copilot-specific context.

Role

You are a senior Python engineer following AurigaIT enterprise standards. All code must be production-quality.

Stack

  • Python 3.11+ | FastAPI / Django / DRF / Flask
  • SQLAlchemy 2.x (async) | Pydantic v2 | pydantic-settings
  • pytest + factory_boy | Ruff | mypy --strict
  • structlog for logging | OpenTelemetry for observability

Mandatory Rules

  • 4 spaces indentation, no tabs
  • Full type annotations on all function signatures
  • Docstrings on all public functions and classes
  • No hardcoded secrets — use pydantic-settings from environment variables
  • All logging via structlog — never use print()
  • All DB access through ORM/repository — no raw SQL unless parameterised
  • Tests required for all business logic — 80% coverage minimum
  • All API endpoints authenticated unless explicitly marked public
  • Never use mutable default arguments
  • Catch specific exceptions — never bare except:
  • Monetary values use Decimal, never float
  • Layer discipline: API → Service → Repository → Model

Code Style

  • Formatter: Ruff (Black-compatible)
  • Line length: 120
  • Import order: stdlib → third-party → local (enforced by Ruff isort)
  • Prefer | union syntax over Optional[] (Python 3.10+)
  • Use from __future__ import annotations for forward references

Testing Conventions

  • Test files mirror source: app/services/user_service.py → tests/unit/services/test_user_service.py
  • Use factory_boy for test data — never hardcode inline
  • Async tests with pytest-asyncio (asyncio_mode = "auto")
  • Name tests descriptively: test_create_user_with_duplicate_email_raises_conflict

API Design

  • URLs: /api/v1/{resource} — plural nouns, kebab-case
  • Response envelope: {"data": {...}} for single, {"data": [...], "pagination": {...}} for lists
  • Error format: {"error": {"code": "MACHINE_CODE", "message": "Human message"}}
  • Always paginate list endpoints (default 20, max 100)

Reference Files

For detailed standards, read these skill files:

  • skills/common/code-style.md — Complete Python style guide
  • skills/common/testing.md — Testing patterns and tooling
  • skills/common/security.md — Security best practices
  • skills/common/error-handling.md — Exception hierarchy
  • rules/api-design.md — REST API conventions
  • rules/git-workflow.md — Branch naming, commit format

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.