agentleFS
Microsoft AzureKnown publisherAzure/azure-sdk-for-python/.github/copilot-instructions.md

azure-sdk-for-python

Copilot instructions5.6k starsChanged 21 months agoMITView on GitHub

Note: For general AI agent guidelines and repository overview, see AGENTS.md at the repository root. REFERENCE DOCUMENTATION: - Official pylint guide - Tool usage guide REFERENCE SOURCES: - Azure pylint guidelines - Pylint documentation ALLOWED ACTIONS: ✅ Fix warnings with 100% confidence ✅ Use existing file for all solutions ✅ Reference official guidelines FORBIDDEN ACTIONS: ❌ Fix warnings without complete confidence ❌ Create new files for solutions ❌ Import non-existent modules ❌ Add new dependencies/imports ❌ Make unnecessary large changes…

Trending

Quiet since April.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the Azure/azure-sdk-for-python repository that our weekly crawl found: only 13 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about Azure/azure-sdk-for-python

The biggest 5 of 13 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 13

Talked about on GitHub, Hacker News and Bluesky (13 times).

On GitHub · 11

6 more on GitHub

On Hacker News · 1

The file

Show its rules and text

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

15 rules. About 0 are common, 11 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this as the authoritative source for SDK development guidance

    line 15
  2. Distinctive:

    When using Copilot from Visual Studio or VS Code (not applicable when using Coding Agent on Github.com):

    line 20
  3. Distinctive:

    Use Python 3.10 compatible environment

    line 71
  4. Distinctive:

    Follow official fixing guidelines

    line 72
  5. Very specific:

    Run azpysdk mypy . from the package directory

    line 73
  6. Distinctive:

    Use the azure-sdk-python-mcp mcp tool to lookup a library's health status.

    line 79
  7. Distinctive:

    Always include the date of last update based on the Last Refresh date.

    line 80
  8. Distinctive:

    If links are available in the table, make the statuses (e.g.

    line 83
  9. Distinctive:

    Don't share information like SDK Owned

    line 84
  10. Distinctive:

    Repository: Use the current workspace as the local SDK repository unless the user specifies a different path.

    line 121
  11. Distinctive:

    Ask the user for clarification if repository path or configuration file is ambiguous.

    line 128
  12. Very specific:

    Use the apiVersions service-to-version map in sdk/<service>/azure-mgmt-<package>/_metadata.json for API-version checks, not the nullable …

    line 143
  13. Very specific:

    If the release date of the latest version in CHANGELOG.md is more than 3 weeks in the future from the current date, remind the author to …

    line 147
  14. Very specific:

    If subscription_id is not present in the client's __init__ signature, pyproject.toml must contain no_sub = true.

    line 159
  15. Distinctive:

    Do not apply this rename requirement to existing releases, or infer a first release from a missing baseline alone.

    line 167

≈ “Common” is an estimate: at least 1 in 5 of the 1,645 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

AZURE SDK FOR PYTHON - COPILOT INSTRUCTIONS

Note: For general AI agent guidelines and repository overview, see AGENTS.md at the repository root.


CORE PRINCIPLES

RULE 1: DO NOT REPEAT INSTRUCTIONS

NEVER repeat instructions when guiding users. Users should follow instructions independently.

RULE 2: REFERENCE OFFICIAL DOCUMENTATION

ALWAYS reference the Azure SDK Python Design Guidelines

  • Link to specific pages when answering guidelines questions
  • Use this as the authoritative source for SDK development guidance

RULE 3: VERIFY ENVIRONMENT FIRST

REQUIRED CONDITIONS:

  • To use Azure MCP tool calls, users must have PowerShell installed. Provide PowerShell installation instructions if not installed, and recommend restarting the IDE to start the MCP server.
  • When using Copilot from Visual Studio or VS Code (not applicable when using Coding Agent on Github.com):
    • Always run the azsdk_verify_setup tool first to validate the user's development environment for SDK MCP tools.
    • Do not proceed with any other tool execution until this step is complete.
    • Skip this check only for queries that do not require tool execution.

PYLINT OPERATIONS

RUNNING PYLINT

REFERENCE DOCUMENTATION:

COMMAND:

azpysdk pylint .

FIXING PYLINT WARNINGS

REFERENCE SOURCES:

ALLOWED ACTIONS: ✅ Fix warnings with 100% confidence ✅ Use existing file for all solutions ✅ Reference official guidelines

FORBIDDEN ACTIONS: ❌ Fix warnings without complete confidence ❌ Create new files for solutions ❌ Import non-existent modules ❌ Add new dependencies/imports ❌ Make unnecessary large changes ❌ Change code style without reason ❌ Delete code without clear justification


MYPY OPERATIONS

RUNNING AND FIXING MYPY

REFERENCE DOCUMENTATION:

REQUIREMENTS:

  • Use Python 3.10 compatible environment
  • Follow official fixing guidelines
  • Run azpysdk mypy . from the package directory

Python SDK Health tool

  • Use the azure-sdk-python-mcp mcp tool to lookup a library's health status.
  • Always include the date of last update based on the Last Refresh date.
  • Explanation of statuses can be found here: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/repo_health_status.md
  • Release blocking checks are MyPy, Pylint, Sphinx, and Tests - CI. These checks should all PASS. If not PASS, mention that the library is blocked for release.
  • If links are available in the table, make the statuses (e.g. PASS, WARNING, etc) you report linked. Avoid telling the user to check the links in the report themselves.
  • Don't share information like SDK Owned

Example

As of <Last Refresh date>, here is the health status for azure-ai-projects:

Overall Status: ⚠️ NEEDS_ACTION

✅ Passing Checks:

Pyright: PASS Sphinx: PASS Type Checked Samples: ENABLED SLA Questions and Bugs: 0

⚠️ Areas Needing Attention:

Pylint: WARNING Tests - Live: ❓ UNKNOWN Tests - Samples: ❌ DISABLED Customer-reported issues: 🔴 5 open issues

❌ Release blocking

Mypy: FAIL Tests - CI: FAIL

This library is failing two release blocking checks - Mypy and Tests - CI. The library needs attention primarily due to Pylint warnings, disabled sample tests, and open customer-reported issues.


Local SDK Generation and Package Lifecycle (TypeSpec)

AUTHORITATIVE REFERENCE

For all TypeSpec-based SDK workflows (generation, building, validation, testing, versioning, and release), follow #file:skills/azsdk-common-generate-sdk-locally/SKILL.md

DEFAULT BEHAVIORS

  • Repository: Use the current workspace as the local SDK repository unless the user specifies a different path.
  • Configuration: Identify tsp-location.yaml from files open in the editor. If unclear, ask the user.

PYTHON-SPECIFIC RULES

  • Skip build step: Python packages do not require compilation. After generation, proceed directly to validation and tests.

REQUIRED CONFIRMATIONS

Ask the user for clarification if repository path or configuration file is ambiguous.


MGMT SDK Code Review Rules

SCOPE

These rules apply to management-plane SDK packages located at sdk/*/azure-mgmt-*/.

REVIEW EXCLUSIONS

  • Skip the generated_samples/ and generated_tests/ folders entirely — do not review generated sample or test code.
  • Skip source code under azure/mgmt/**/ except _client.py — only review _client.py among the generated source files.

VERSION CONSISTENCY

  • The version string in _version.py must match the latest version listed in CHANGELOG.md.
  • Use the apiVersions service-to-version map in sdk/<service>/azure-mgmt-<package>/_metadata.json for API-version checks, not the nullable singular apiVersion. Missing or malformed maps are unverified evidence, not a reason to fall back to apiVersion.
  • Preview API versions must use preview SDK versions: if any value in apiVersions contains preview (case-insensitive), the generated package version file (sdk/<service>/azure-mgmt-<package>/azure/mgmt/<package>/_version.py) must define a beta version such as 1.0.0b1, not a stable version such as 1.0.0. This includes maps containing both stable and preview API versions.

CHANGELOG DATE

  • If the release date of the latest version in CHANGELOG.md is more than 3 weeks in the future from the current date, remind the author to verify and update the date.

PYPROJECT.TOML STABILITY FLAGS

  • Stable version (version string does not contain b):
    • is_stable in pyproject.toml must be true
    • classifiers must include "Development Status :: 5 - Production/Stable"
  • Preview version (version string contains b):
    • is_stable in pyproject.toml must be false
    • classifiers must include "Development Status :: 4 - Beta"

CLIENT SIGNATURE

  • The __init__ method of the client class in _client.py must include the parameters credential, subscription_id, and base_url in that order. Default values are not checked.
  • If subscription_id is not present in the client's __init__ signature, pyproject.toml must contain no_sub = true. If it does not, hint the user to add no_sub = true in pyproject.toml and regenerate the SDK.

CLIENT NAME CONSISTENCY

  • The client class name in _client.py, the client name referenced in README.md, and the title value in pyproject.toml must all be the same.

INITIAL-RELEASE CLIENT NAME

  • For a confirmed first release of a management SDK, the synchronous and asynchronous client class names must end with the exact suffix MgmtClient.
  • A noncompliant name is a Blocking finding. Ask the author to add or update the client-name customization in client.tsp to choose a descriptive name ending in MgmtClient, then regenerate the SDK.
  • Do not apply this rename requirement to existing releases, or infer a first release from a missing baseline alone. If first-release status or client declarations cannot be verified, report the check as unverified.

README CODE SNIPPETS

  • Code snippets in README.md must follow the real client class signatures and usage patterns. Verify that sample code matches the actual client API.

SDK release

For detailed workflow instructions, see SDK Release.

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.