USE FOR
- "review Go Azure SDK sample"
- "check Go sample for best practices"
- "Azure SDK Go code review"
- Reviewing credential handling in Azure SDK Go samples
- Idiomatic error handling and context propagation review for Go Azure SDK samples
- Documentation compliance check for Go Azure SDK samples
DO NOT USE FOR
- General Go 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 Go-specific rules below.
Use this skill when reviewing Go code samples for Azure SDKs intended for publication as Microsoft Azure samples. Focuses on:
- Azure SDK client patterns (
github.com/Azure/azure-sdk-for-go/sdk/*)
- Authentication (
azidentity.NewDefaultAzureCredential, managed identities)
- Service-specific best practices (Cosmos DB, SQL, Storage, Service Bus, Key Vault, AI services)
- Sample hygiene (credentials, .gitignore, dependency audit)
- Documentation accuracy (README output, troubleshooting, setup instructions)
- Infrastructure-as-code (Bicep/Terraform with AVM modules)
- azd integration (azure.yaml structure, hooks)
- Go idioms (error handling, context propagation, interfaces, goroutine safety)
Total rules: 75 (11 CRITICAL, 24 HIGH, 32 MEDIUM, 8 LOW)
Severity Legend
- CRITICAL: Security vulnerability or sample will not run. Must fix before any publication.
- HIGH: Major quality issue. Fix before merge.
- MEDIUM: Best practice violation. Should fix before publication.
- LOW: Polish item, nice-to-have improvement.
Quick Pre-Review Checklist (5-Minute Scan)
Blocker Issues (Auto-Reject)
These issues always block publication:
- Hardcoded secrets—Any production credentials, API keys, connection strings, or tokens in code
- Missing authentication—No auth implementation or uses insecure methods
- No error handling—Unchecked error returns, discarded errors with
_
- Broken imports—Missing dependencies, incorrect import paths
- Security vulnerabilities—
govulncheck shows known CVEs
- Missing LICENSE—No LICENSE file at ANY level of repo hierarchy (MIT required). âš ï¸ Check repo root before flagging.
- .env file committed—Live credentials in version control. âš ï¸ Verify with
git ls-files .env
- Legacy SDK packages—Uses
github.com/Azure/azure-sdk-for-go/services/* instead of sdk/*
Detailed Rules
Language-Specific References (Go code examples)
| # |
Section |
Reference File |
| 1 |
Project Setup — Go |
references/project-setup.md |
| 2 |
SDK Client Patterns — Go |
references/sdk-client-patterns.md |
| 3 |
AI Services — Go |
references/ai-services.md |
| 4 |
Data Services — Go |
references/data-services.md |
| 5 |
Messaging — Go |
references/messaging.md |
| 6 |
Key Vault — Go |
references/keyvault.md |
| 7 |
Vector Search — Go |
references/vector-search.md |
| 8 |
Error Handling — Go |
references/error-handling.md |
| 9 |
Data Management — Go |
references/data-management.md |
| 10 |
Sample Hygiene — Go |
references/sample-hygiene.md |
| 11 |
Documentation — Go |
references/documentation.md |
| 12 |
azd — Go |
references/azd.md |
| 13 |
CI/CD & Testing — Go |
references/cicd-testing.md |
| 14 |
Go Idioms (Go-unique) |
references/go-idioms.md |
| — |
Comprehensive Checklist & Links |
references/checklist-and-references.md |
Companion Skills
- azure-sdk-typescript-sample-review — TypeScript Azure SDK sample review patterns
- azure-sdk-dotnet-sample-review — .NET 9/10 + Aspire patterns
- azure-sdk-java-sample-review — Java 17/21 + Spring Boot patterns
- azure-sdk-python-sample-review — Python 3.9+ + async patterns
- azure-sdk-rust-sample-review — Rust 2021 edition patterns
- acrolinx-score-improvement — Article quality, readability, style
Summary
This skill reviews Azure SDK Go samples for security, idiomatic Go patterns, Azure SDK best practices, and documentation compliance. 75 rules across 15 categories ensure samples are secure, idiomatic, maintainable, and ready for publication in the Azure Samples organization.
References
References location: All reference files for this skill live inside the skill directory at .github/skills/data-plus-ai-sdk-go-sample-review/. Paths like references/file.md resolve to .github/skills/data-plus-ai-sdk-go-sample-review/references/file.md. Paths are relative to the skill folder, not the repo root.
1---2name: azure-sdk-go-sample-review3description: Reviews Azure SDK Go code samples for best practices, credential handling, idiomatic error handling, context propagation, and documentation compliance. Trigger: "review Go Azure SDK sample", "check Go sample", "Azure SDK Go review".4---56## USE FOR78- "review Go Azure SDK sample"9- "check Go sample for best practices"10- "Azure SDK Go code review"11- Reviewing credential handling in Azure SDK Go samples12- Idiomatic error handling and context propagation review for Go Azure SDK samples13- Documentation compliance check for Go Azure SDK samples1415## DO NOT USE FOR1617- General Go code review unrelated to Azure SDK samples18- Production application code review19- Azure service configuration2021## Context2223> **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 Go-specific rules below.2425Use this skill when reviewing **Go code samples** for Azure SDKs intended for publication as Microsoft Azure samples. Focuses on:2627- **Azure SDK client patterns** (`github.com/Azure/azure-sdk-for-go/sdk/*`)28- **Authentication** (`azidentity.NewDefaultAzureCredential`, managed identities)29- **Service-specific best practices** (Cosmos DB, SQL, Storage, Service Bus, Key Vault, AI services)30- **Sample hygiene** (credentials, .gitignore, dependency audit)31- **Documentation accuracy** (README output, troubleshooting, setup instructions)32- **Infrastructure-as-code** (Bicep/Terraform with AVM modules)33- **azd integration** (azure.yaml structure, hooks)34- **Go idioms** (error handling, context propagation, interfaces, goroutine safety)3536**Total rules: 75** (11 CRITICAL, 24 HIGH, 32 MEDIUM, 8 LOW)3738## Severity Legend3940- **CRITICAL**: Security vulnerability or sample will not run. Must fix before any publication.41- **HIGH**: Major quality issue. Fix before merge.42- **MEDIUM**: Best practice violation. Should fix before publication.43- **LOW**: Polish item, nice-to-have improvement.4445---4647## Quick Pre-Review Checklist (5-Minute Scan)4849- [ ] **go.mod**: Uses `github.com/Azure/azure-sdk-for-go/sdk/*` packages (not legacy `services/*`)50- [ ] **Authentication**: Uses `azidentity.NewDefaultAzureCredential` (not connection strings)51- [ ] **.gitignore**: Exists and includes `.env`, `.env.*`, vendor/, binaries52- [ ] **No secrets**: No hardcoded credentials, API keys, or tokens in code53- [ ] **README.md**: Exists with prerequisites, setup steps, and expected output54- [ ] **LICENSE**: MIT license file present (required for Azure Samples)55- [ ] **Security**: `govulncheck ./...` passes with no known vulnerabilities56- [ ] **Go version**: go.mod specifies Go 1.22+57- [ ] **Error handling**: Every error return is checked (`if err != nil`)58- [ ] **Resource cleanup**: Clients properly closed with `defer` statements59- [ ] **go.sum**: Committed (not .gitignored)60- [ ] **Builds**: `go build ./...` and `go vet ./...` pass6162---6364## Blocker Issues (Auto-Reject)6566These issues always block publication:67681. **Hardcoded secrets**—Any production credentials, API keys, connection strings, or tokens in code692. **Missing authentication**—No auth implementation or uses insecure methods703. **No error handling**—Unchecked error returns, discarded errors with `_`714. **Broken imports**—Missing dependencies, incorrect import paths725. **Security vulnerabilities**—`govulncheck` shows known CVEs736. **Missing LICENSE**—No LICENSE file at ANY level of repo hierarchy (MIT required). âš ï¸ Check repo root before flagging.747. **.env file committed**—Live credentials in version control. âš ï¸ Verify with `git ls-files .env`758. **Legacy SDK packages**—Uses `github.com/Azure/azure-sdk-for-go/services/*` instead of `sdk/*`7677---7879## Detailed Rules808182### Language-Specific References (Go code examples)8384| # | Section | Reference File |85|---|---------|---------------|86| 1 | Project Setup — Go | [references/project-setup.md](references/project-setup.md) |87| 2 | SDK Client Patterns — Go | [references/sdk-client-patterns.md](references/sdk-client-patterns.md) |88| 3 | AI Services — Go | [references/ai-services.md](references/ai-services.md) |89| 4 | Data Services — Go | [references/data-services.md](references/data-services.md) |90| 5 | Messaging — Go | [references/messaging.md](references/messaging.md) |91| 6 | Key Vault — Go | [references/keyvault.md](references/keyvault.md) |92| 7 | Vector Search — Go | [references/vector-search.md](references/vector-search.md) |93| 8 | Error Handling — Go | [references/error-handling.md](references/error-handling.md) |94| 9 | Data Management — Go | [references/data-management.md](references/data-management.md) |95| 10 | Sample Hygiene — Go | [references/sample-hygiene.md](references/sample-hygiene.md) |96| 11 | Documentation — Go | [references/documentation.md](references/documentation.md) |97| 12 | azd — Go | [references/azd.md](references/azd.md) |98| 13 | CI/CD & Testing — Go | [references/cicd-testing.md](references/cicd-testing.md) |99| 14 | Go Idioms (Go-unique) | [references/go-idioms.md](references/go-idioms.md) |100| — | Comprehensive Checklist & Links | [references/checklist-and-references.md](references/checklist-and-references.md) |101102---103104## Companion Skills105106- **azure-sdk-typescript-sample-review** — TypeScript Azure SDK sample review patterns107- **azure-sdk-dotnet-sample-review** — .NET 9/10 + Aspire patterns108- **azure-sdk-java-sample-review** — Java 17/21 + Spring Boot patterns109- **azure-sdk-python-sample-review** — Python 3.9+ + async patterns110- **azure-sdk-rust-sample-review** — Rust 2021 edition patterns111- **acrolinx-score-improvement** — Article quality, readability, style112113---114115## Summary116117This skill reviews **Azure SDK Go samples** for security, idiomatic Go patterns, Azure SDK best practices, and documentation compliance. 75 rules across 15 categories ensure samples are secure, idiomatic, maintainable, and ready for publication in the Azure Samples organization.118119## References120121> **References location:** All reference files for this skill live inside the skill directory at `.github/skills/data-plus-ai-sdk-go-sample-review/`. Paths like `references/file.md` resolve to `.github/skills/data-plus-ai-sdk-go-sample-review/references/file.md`. Paths are relative to the skill folder, not the repo root.122