Reviewing credential handling in Azure SDK Java samples
Error pattern analysis for Java Azure SDK samples
Documentation compliance check for Java Azure SDK samples
Spring Boot integration review for Azure SDK Java samples
DO NOT USE FOR
General Java code review unrelated to Azure SDK samples
Production application code review
Azure service configuration
Context
Base template: Inherits from azure-sdk-sample-review for shared review patterns (credentials, error handling, documentation, infrastructure). This skill adds Java-specific rules below.
Use this skill when reviewing Java code samples for Azure SDKsintended for publication as Microsoft Azure samples. Focuses on:
This skill enforces 71 rules (8 CRITICAL, 26 HIGH, 33 MEDIUM, 4 LOW) across Azure SDK Java samples covering authentication, client patterns, data services, AI, messaging, infrastructure, Spring Boot, and documentation. Apply these patterns to ensure samples are secure, accurate, maintainable, and ready for publication.
References
References location: All reference files for this skill live inside the skill directory at .github/skills/data-plus-ai-sdk-java-sample-review/. Paths like references/file.md resolve to .github/skills/data-plus-ai-sdk-java-sample-review/references/file.md. Paths are relative to the skill folder, not the repo root.
1---2name: azure-sdk-java-sample-review3description: Reviews Azure SDK Java code samples for best practices, credential handling, error patterns, Spring Boot integration, and documentation compliance. Trigger: "review Java Azure SDK sample", "check Java sample", "Azure SDK Java review".4---56## USE FOR78- "review Java Azure SDK sample"9- "check Java sample for best practices"10- "Azure SDK Java code review"11- Reviewing credential handling in Azure SDK Java samples12- Error pattern analysis for Java Azure SDK samples13- Documentation compliance check for Java Azure SDK samples14- Spring Boot integration review for Azure SDK Java samples1516## DO NOT USE FOR1718- General Java code review unrelated to Azure SDK samples19- Production application code review20- Azure service configuration2122## Context2324> **Base template:** Inherits from [azure-sdk-sample-review](../azure-sdk-sample-review/SKILL.md) for shared review patterns (credentials, error handling, documentation, infrastructure). This skill adds Java-specific rules below.2526Use this skill when reviewing **Java code samples** for Azure SDKsintended for publication as Microsoft Azure samples. Focuses on:2728- **Azure SDK client patterns** (Track 2 `com.azure.*`, client builders, pipeline policies)29- **Authentication** (`DefaultAzureCredential`, managed identities, token management)30- **Service-specific best practices** (Cosmos DB, SQL, Storage, Service Bus, Key Vault, AI services)31- **Sample hygiene** (credentials, build artifacts, dependency audit, .gitignore)32- **Documentation accuracy** (README output, troubleshooting, setup instructions)33- **Infrastructure-as-code** (Bicep/Terraform with AVM modules)34- **azd integration** (azure.yaml structure, hooks, service definitions)35- **Spring Boot / Spring Cloud Azure** integration patterns3637---3839## Quick Pre-Review Checklist (5-Minute Scan)4041- [ ] **pom.xml / build.gradle**: Uses Track 2 Azure SDK packages (`com.azure:*`, not `com.microsoft.azure:*`)42- [ ] **Authentication**: Uses `DefaultAzureCredential` (not connection strings or hardcoded keys)43- [ ] **.gitignore**: Exists and includes `.env`, `target/`, `build/`, `*.class`, `.idea/`44- [ ] **No secrets**: No hardcoded credentials, API keys, or tokens in code45- [ ] **README.md**: Exists with prerequisites, setup steps, and expected output46- [ ] **LICENSE**: MIT license file present (required for Azure Samples)47- [ ] **Security**: No known critical/high CVEs in dependency tree48- [ ] **Java version**: Uses Java 17 or 21 LTS49- [ ] **Error handling**: `catch` blocks present with proper exception hierarchy50- [ ] **Resource cleanup**: Clients properly closed (try-with-resources or finally blocks)51- [ ] **BOM**: Uses `azure-sdk-bom` for version management52- [ ] **No mixed build tools**: Only Maven OR Gradle (not both)53- [ ] **Imports work**: No broken imports, all dependencies declared54- [ ] **Build succeeds**: `mvn compile` or `gradle build` completes without errors55- [ ] **Sample runs**: `mvn exec:java` or `java -jar` executes without crashes5657---5859## Blocker Issues (Auto-Reject)6061These issues always block publication. Samples with any of these must be rejected immediately:62631. **Hardcoded secrets**—Any production credentials, API keys, connection strings, or tokens in code642. **Missing authentication**—No auth implementation or uses insecure methods653. **No error handling**—Unchecked exceptions, no try/catch blocks, silent failures664. **Broken imports**—Missing dependencies, incorrect package names, class not found errors675. **Security vulnerabilities**—`mvn dependency-check:check` or Dependabot shows critical/high CVEs686. **Missing LICENSE**—No LICENSE file at ANY level of repo hierarchy (MIT required). âš ï¸ Check repo root before flagging.697. **.env file committed**—Live credentials in version control. âš ï¸ Verify with `git ls-files .env`—a .env on disk but in .gitignore is NOT committed.708. **Track 1 packages**—Uses legacy `com.microsoft.azure:*` packages instead of `com.azure:*`7172---7374## Severity Legend7576- **CRITICAL**: Security vulnerability or sample will not run. Must fix before any publication.77- **HIGH**: Major quality issue that will confuse users or cause production failures. Fix before merge.78- **MEDIUM**: Best practice violation. Should fix before publication for maintainability.79- **LOW**: Polish item, nice-to-have improvement.8081---8283## Detailed Rules848586### Language-Specific References (Java code examples)8788| # | Section | Reference File |89|---|---------|---------------|90| 1 | Project Setup — Java | [references/project-setup.md](references/project-setup.md) |91| 2 | SDK Client Patterns — Java | [references/sdk-client-patterns.md](references/sdk-client-patterns.md) |92| 3 | AI Services — Java | [references/ai-services.md](references/ai-services.md) |93| 4 | Data Services — Java | [references/data-services.md](references/data-services.md) |94| 5 | Messaging — Java | [references/messaging.md](references/messaging.md) |95| 6 | Key Vault — Java | [references/keyvault.md](references/keyvault.md) |96| 7 | Vector Search — Java | [references/vector-search.md](references/vector-search.md) |97| 8 | Error Handling — Java | [references/error-handling.md](references/error-handling.md) |98| 9 | Data Management — Java | [references/data-management.md](references/data-management.md) |99| 10 | Sample Hygiene — Java | [references/sample-hygiene.md](references/sample-hygiene.md) |100| 11 | Documentation — Java | [references/documentation.md](references/documentation.md) |101| 12 | Infrastructure — Java | [references/infrastructure.md](references/infrastructure.md) |102| 13 | azd — Java | [references/azd.md](references/azd.md) |103| 14 | Spring Boot (Java-unique) | [references/spring-boot.md](references/spring-boot.md) |104| 15 | CI/CD & Testing — Java | [references/cicd-testing.md](references/cicd-testing.md) |105| 16 | Advanced Configuration (Java-unique) | [references/advanced-config.md](references/advanced-config.md) |106107---108109## Companion Skills110111- **azure-sdk-typescript-sample-review** — TypeScript Azure SDK sample review112- **azure-sdk-dotnet-sample-review** — .NET 9/10 + Aspire Azure SDK sample review113- **azure-sdk-python-sample-review** — Python 3.9+ + async Azure SDK sample review114- **acrolinx-score-improvement** — Article quality, readability, style115116---117118## Summary119120This skill enforces **71 rules** (8 CRITICAL, 26 HIGH, 33 MEDIUM, 4 LOW) across Azure SDK Java samples covering authentication, client patterns, data services, AI, messaging, infrastructure, Spring Boot, and documentation. Apply these patterns to ensure samples are secure, accurate, maintainable, and ready for publication.121122## References123124> **References location:** All reference files for this skill live inside the skill directory at `.github/skills/data-plus-ai-sdk-java-sample-review/`. Paths like `references/file.md` resolve to `.github/skills/data-plus-ai-sdk-java-sample-review/references/file.md`. Paths are relative to the skill folder, not the repo root.125
Run npx skillmds@latest add azure-samples/azure-sdk-java-sample-review in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Reviews Azure SDK Java code samples for best practices, credential handling, error patterns, Spring Boot integration, and documentation compliance. Trigger: "review Java Azure SDK sample", "check Java sample", "Azure SDK Java review". It is listed under DevOps & Infra on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Azure-Samples (@azure-samples) published this skill. Their other Agent Skills are listed on their SkillMD profile.