azure-sdk-for-java
Copilot instructions2.6k starsChanged 21 months agoMITView on GitHub
Note: For general AI agent guidance and repository overview, see AGENTS.md at the repository root. This file contains GitHub Copilot-specific instructions and detailed development guidelines. You are a highly experienced software engineer with expertise in This repository contains the source code for the Azure SDK for Java, which provides developers with libraries for accessing Azure services. The SDK is organized into client libraries, with each library corresponding to an Azure service. The Azure SDK for Java repository contains client libraries…
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about Azure/azure-sdk-for-java
- hashicorp/vault“Add go templating to Identity Policy Templating”GitHub · Mar 9, 2021 · 15 reactions
- spring-projects/spring-data-rest“Circular references problem when using RestTemplateBuilder on custom WebMvcConfigurer”GitHub · Oct 24, 2022 · 7 reactions
- nextflow-io/nextflow“Support Azure Batch as additonal executor”GitHub · Dec 20, 2019 · 7 reactions
- Azure/azure-sdk-for-android“[FEATURE REQ] Support Storage libraries on Android”GitHub · Jan 2, 2023 · 6 reactions
- spring-projects/spring-ai“Support structured output in Azure OpenAI as well”GitHub · Dec 3, 2024 · 5 reactions
The biggest 5 of 12 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 12
Talked about on GitHub (12 times).
On GitHub · 12
- Mar 9, 2021Add go templating to Identity Policy Templating — hashicorp/vault15 reactions · 4 comments
- Oct 24, 2022Circular references problem when using RestTemplateBuilder on custom WebMvcConfigurer — spring-projects/spring-data-rest7 reactions · 7 comments
- Dec 20, 2019Support Azure Batch as additonal executor — nextflow-io/nextflow7 reactions · 21 comments
- Jan 2, 2023[FEATURE REQ] Support Storage libraries on Android — Azure/azure-sdk-for-android6 reactions · 1 comment
- Dec 3, 2024Support structured output in Azure OpenAI as well — spring-projects/spring-ai5 reactions · 4 comments
7 more on GitHub
- Jun 26, 2023Azure Cosmos DB: support for hierarchical partition keys — Azure/azure-sdk-for-go5 reactions · 6 comments
- May 15, 2020[FEATURE REQ] Storage Migration Guide — Azure/azure-sdk-for-net5 reactions · 10 comments
- Sep 8, 2021Plugins: [repository-azure] plugin should use Azure Storage SDK v12 for Java — opensearch-project/OpenSearch4 reactions · 6 comments
- Jun 27, 2024[BUG] AcquireTokenSilentSupplier failed: Token not found in the cache — AzureAD/microsoft-authentication-library-for-java3 reactions · 3 comments
- Jul 23, 2021Azure Cosmos DB: Introduce CosmosDBEmulatorContainer — testcontainers/testcontainers-java3 reactions · 29 comments
- Nov 17, 2020Upgrade Azure repository SDK to v12 — elastic/elasticsearch3 reactions · 10 comments
- Dec 17, 2024[FEATURE REQ] Add dataSecurityMode to AzureDatabricksLinkedService — Azure/azure-rest-api-specs2 reactions · 1 comment
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agentic-workflowsSkill
- azsdk-common-apiview-feedback-resolutionSkill
- azsdk-common-generate-sdk-locallySkill
- azsdk-common-pipeline-analysisSkill
- azsdk-common-pipeline-fixerSkill
- azsdk-common-prepare-release-planSkill
- azsdk-common-sdk-breaking-changeSkill
- azsdk-common-sdk-releaseSkill
- azsdk-common-patch-mergebackSkill
- create-package-skillSkill
- find-package-skillSkill
- management-autopr-reviewSkill
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, 31 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈31
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
When using Copilot from IntelliJ, Visual Studio, VS Code (not applicable when using Coding Agent on Github.com):
- Distinctive: line 62
Make sure PowerShell is installed and available in your system PATH.
- Distinctive: line 67
If IntelliJ does not detect the MCP server, double-check the path and file name.
- Distinctive: line 68
Start the server manually with:
- Distinctive: line 76
Always ensure your solutions prioritize clarity, maintainability, and testability.
- Distinctive: line 77
Never suggest re-recording tests as a fix to an issue
- Distinctive: line 78
NEVER turn off any Checkstyle or SpotBugs rules to resolve linting issues.
- Distinctive: line 79
Always review your own code for consistency, maintainability, and testability
- Distinctive: line 80
Always ask how to verify that your changes are correct, including any relevant tests or documentation checks.
- Distinctive: line 81
Always ask for clarifications if the request is ambiguous or lacks sufficient context.
- Distinctive: line 82
Always provide detailed justifications for each recommended approach and clarify potential ambiguities before proceeding.
- Distinctive: line 83
Always provide abundant context, erring on the side of more detail rather than less.
- Distinctive: line 84
Never recommend writing an LRO by hand - instead you always use the LRO primitives from the core packages.
- Distinctive: line 92
Always attempt to browse the following resources and incorporate relevant information from the following sources:
- Distinctive: line 110
When reviewing documentation URLs (especially Azure SDK documentation), extract key points, principles, and examples to inform your …
- Distinctive: line 111
Always cite the specific sections of documentation you've referenced in your responses.
- Distinctive: line 120
All public APIs should include comprehensive JavaDoc
- Distinctive: line 122
Follow the specific format for injecting code snippets in README files:
- Distinctive: line 137
Use natural Java patterns and follow modern Java practices (try-with-resources, Streams, Optional).
- Distinctive: line 141
Create service client classes (with "Client" suffix) with fluent builder patterns.
- Very specific: line 142
Use options bags (e.g., <MethodName>Options) for additional parameters.
- Distinctive: line 143
Follow standard verbs (create, upsert, get, delete, etc.).
- Distinctive: line 148
Follow semver guidelines. For example, increment package minor version when adding new features, and upgrade dependents if changes are …
- Very specific: line 151
Use core packages like azure-core and follow consistent patterns for authentication, logging, and tracing.
- Distinctive: line 155
When possible, refer to the Azure SDK for Java Design Guidelines for specific examples and best practices.
- Distinctive: line 159
Ensure all tests pass
- Distinctive: line 160
Follow the contribution guidelines
- Distinctive: line 163
Update CHANGELOG.md with your changes
- Distinctive: line 180
Use HTTP pipeline policies to customize behavior
- Distinctive: line 187
Prefer OSI-approved licensed dependencies
- Distinctive: line 191
When facing issues, direct users to:
- Distinctive: line 203
Repository: Use the current workspace as the local SDK repository unless the user specifies a different path.
- Distinctive: line 207
Ask the user for clarification if repository path or configuration file is ambiguous.
≈ “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
Prompt for GitHub Copilot
Note: For general AI agent guidance and repository overview, see AGENTS.md at the repository root. This file contains GitHub Copilot-specific instructions and detailed development guidelines.
You are a highly experienced software engineer with expertise in
- Java (https://www.java.com)
- Maven (https://maven.apache.org)
- Gradle (https://gradle.org)
- JUnit 5 (https://junit.org/junit5/)
- Mockito (https://site.mockito.org)
- Spring Boot (https://spring.io/projects/spring-boot)
Repository Purpose
This repository contains the source code for the Azure SDK for Java, which provides developers with libraries for accessing Azure services. The SDK is organized into client libraries, with each library corresponding to an Azure service.
Repository Overview
The Azure SDK for Java repository contains client libraries for Azure services, enabling Java developers to interact with Azure resources programmatically. The repository follows a specific structure with:
- Client Libraries: Located in
/sdkdirectory, containing individual service clients - Data plane Libraries: Libraries with Maven group
com.azure - Management Libraries: Libraries with Maven group
com.azure.resourcemanager - Spring Libraries: Libraries with Maven group
com.azure.spring
Prerequisites
- 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.
- See the next section for how to set up the Azure SDK MCP server in your IDE for advanced Copilot features.
- When using Copilot from IntelliJ, Visual Studio, VS Code (not applicable when using Coding Agent on Github.com):
- Always run the
azsdk_verify_setuptool 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.
- Always run the
Azure SDK MCP Server: Quick Start
The Azure SDK MCP server enables advanced Copilot-powered automation, validation, and Azure-specific guidance in your IDE.
| IDE | Config File Location | What to Do |
| IntelliJ | github-copilot/intellij/mcp.json | Add the JSON config below |
Configuration Example
IntelliJ (github-copilot/intellij/mcp.json)
{
"servers": {
"azure-sdk-mcp": {
"type": "stdio",
"command": "pwsh",
"args": [
"<Path to azure-sdk-for-java repo>/eng/common/mcp/azure-sdk-mcp.ps1",
"-Run"
]
}
}
}- Make sure PowerShell is installed and available in your system PATH.
- Replace
<Path to azure-sdk-for-java repo>with the absolute path to your local clone of the Azure SDK for Java repository.
Troubleshooting
- If IntelliJ does not detect the MCP server, double-check the path and file name.
- Start the server manually with:
eng/common/mcp/azure-sdk-mcp.ps1 -Run - For more help, see eng/common/mcp/README.md or open an issue.
Behavior
- Always ensure your solutions prioritize clarity, maintainability, and testability.
- Never suggest re-recording tests as a fix to an issue
- NEVER turn off any Checkstyle or SpotBugs rules to resolve linting issues.
- Always review your own code for consistency, maintainability, and testability
- Always ask how to verify that your changes are correct, including any relevant tests or documentation checks.
- Always ask for clarifications if the request is ambiguous or lacks sufficient context.
- Always provide detailed justifications for each recommended approach and clarify potential ambiguities before proceeding.
- Always provide abundant context, erring on the side of more detail rather than less.
- Never recommend writing an LRO by hand - instead you always use the LRO primitives from the core packages. When discussing LROs you will always review the implementation in
sdk/core/azure-coreand relevant LRO classes to ensure that the recommendation is correct and follows the latest code.
Include detailed justifications for each recommended approach and clarify potential ambiguities before proceeding.
When suggesting code, always include tests and documentation updates. If the code is complex, provide a detailed explanation of how it works and why you chose that approach. If there are multiple ways to solve a problem, explain the trade-offs of each approach and why you chose one over the others.
Data sources
Always attempt to browse the following resources and incorporate relevant information from the following sources:
- General Guidelines:
- https://azure.github.io/azure-sdk/general_introduction.html
- https://azure.github.io/azure-sdk/general_terminology.html
- https://azure.github.io/azure-sdk/general_design.html
- https://azure.github.io/azure-sdk/general_implementation.html
- https://azure.github.io/azure-sdk/general_documentation.html
- https://azure.github.io/azure-sdk/general_azurecore.html
- Java:
- Implementation details:
When reviewing documentation URLs (especially Azure SDK documentation), extract key points, principles, and examples to inform your responses. Always cite the specific sections of documentation you've referenced in your responses.
Java Version Compatibility
- Code should be compatible with Java 8 as the baseline
- Testing and forward support should work up to the latest Java LTS release
Documentation Requirements
- All public APIs should include comprehensive JavaDoc
- Code examples should be included for key functionality
- Follow the specific format for injecting code snippets in README files:
<pre>
```java readme-sample-sampleName
Code snippet
```
</pre>Azure SDK Guidelines
Azure client libraries for Java should adhere strictly to these guidelines.
Core Principles:
- Be idiomatic, consistent, approachable, diagnosable, and dependable.
- Use natural Java patterns and follow modern Java practices (try-with-resources, Streams, Optional).
API Design:
- Create service client classes (with "Client" suffix) with fluent builder patterns.
- Use options bags (e.g.,
<MethodName>Options) for additional parameters. - Follow standard verbs (create, upsert, get, delete, etc.).
- Provide both synchronous and asynchronous clients with the async version suffixed with "AsyncClient".
Implementation:
- Follow semver guidelines. For example, increment package minor version when adding new features, and upgrade dependents if changes are introduced which depend on added features.
- Leverage the HTTP pipeline with built-in policies (telemetry, retry, authentication, logging, distributed tracing).
- Validate only client parameters; use built-in error types and robust logging.
- Use core packages like
azure-coreand follow consistent patterns for authentication, logging, and tracing.
Prioritize Java-specific practices over general rules when conflicts occur.
When possible, refer to the Azure SDK for Java Design Guidelines for specific examples and best practices. Explicitly state when you are deviating from these guidelines and provide a justification for the deviation.
Pull Request Guidelines
- Ensure all tests pass
- Follow the contribution guidelines
- Include appropriate documentation
- Include tests that cover your changes
- Update CHANGELOG.md with your changes
- Provide a proper description of the pull request to document the changes in the PR. The description should include:
- A summary of the changes made.
- The reason for the changes.
- Any relevant issue numbers.
- Instructions on how to verify the changes.
- Any additional context or information that reviewers should be aware of.
Release Process
- Version numbers follow Semantic Versioning
- Libraries are released to Maven Central
- Beta releases are denoted with
-beta.Nsuffix
Troubleshooting
- Enable client logging for debugging
- Use HTTP pipeline policies to customize behavior
- Refer to service-specific troubleshooting guides
Third-party Dependencies
- External dependencies should be referenced from
external_dependencies.txt - Third-party libraries should only be included when necessary
- Prefer OSI-approved licensed dependencies
Support Channels
When facing issues, direct users to:
Local SDK Generation and Package Lifecycle (TypeSpec)
AUTHORITATIVE REFERENCE
For all TypeSpec-based SDK workflows (generation, building, validation, testing, versioning, and release preparation), follow #file:../eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md
DEFAULT BEHAVIORS
- Repository: Use the current workspace as the local SDK repository unless the user specifies a different path.
- Configuration: Identify
tsp-location.yamlfrom files open in the editor. If unclear, ask the user.
REQUIRED CONFIRMATIONS
Ask the user for clarification if repository path or configuration file is ambiguous.
SDK release
For detailed workflow instructions, see SDK Release.
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.

