| name | azure-sdk-rust-sample-review |
| description | Reviews Azure SDK Rust code samples for best practices, credential handling, ownership patterns, async runtime usage, error propagation, and documentation compliance. Trigger: "review Rust Azure SDK sample", "check Rust sample", "Azure SDK Rust review". |
| status | active |
| tags | ["review","rust","azure","sdk","sample","check","best","practices","code","reviewing"] |
| category | review |
USE FOR
- "review Rust Azure SDK sample"
- "check Rust sample for best practices"
- "Azure SDK Rust code review"
- Reviewing credential handling in Azure SDK Rust samples
- Ownership patterns and async runtime review for Rust Azure SDK samples
- Error propagation and documentation compliance check for Rust Azure SDK samples
DO NOT USE FOR
- General Rust 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 Rust-specific rules below.
Use this skill when reviewing Rust code samples for Azure SDKsintended for publication as Microsoft Azure samples. Focuses on Azure SDK-specific concerns: azure_* crates, DefaultAzureCredential, service-specific patterns, sample hygiene, documentation accuracy, infrastructure-as-code, azd integration, and Rust idioms (ownership, borrowing, error propagation, async runtimes, RAII cleanup).
âš ï¸ SDK Maturity Note: The Azure SDK for Rust is still evolving. Many crates are in preview/alpha. This skill focuses on stable patterns (auth, error handling, async, project structure). Always check crates.io and the Azure SDK for Rust GitHub repo for latest status.
Total rules: 66 (9 CRITICAL, 25 HIGH, 29 MEDIUM, 3 LOW)
Severity Legend
- CRITICAL: Security vulnerability or sample will not compile/run. Must fix before any publication.
- HIGH: Major quality issue that will confuse users or cause production failures. Fix before merge.
- MEDIUM: Best practice violation. Should fix before publication for maintainability.
- LOW: Polish item, nice-to-have improvement.
Quick Pre-Review Checklist (5-Minute Scan)
Blocker Issues (Auto-Reject)
These issues always block publication. Samples with any of these must be rejected immediately:
- 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—Uses
unwrap() or expect() in main code paths, no Result returns
- Broken imports—Missing dependencies, incorrect crate names,
cargo check fails
- Security vulnerabilities—
cargo audit shows critical or high 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.
- Panics in sample code—Uses
unwrap(), expect(), or panic!() in non-test code paths without justification
Detailed Rules
Language-Specific References (Rust code examples)
Companion Skills
- azure-sdk-typescript-sample-review — TypeScript-specific Azure SDK patterns (template this skill was adapted from)
- azure-sdk-dotnet-sample-review — .NET 9/10 + Aspire Azure SDK patterns
- azure-sdk-python-sample-review — Python 3.9+ + async Azure SDK patterns
Summary
This skill enforces 66 rules for Azure SDK Rust sample quality covering: authentication (DefaultAzureCredential, managed identity, token refresh), Rust idioms (ownership, RAII, async/tokio, error propagation), data services (Cosmos DB, Azure SQL, Storage), AI services (OpenAI, embeddings), infrastructure (Bicep/AVM, azd), and documentation accuracy. Apply these patterns to ensure samples are secure, idiomatic, well-documented, 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-rust-sample-review/. Paths like references/file.md resolve to .github/skills/data-plus-ai-sdk-rust-sample-review/references/file.md. Paths are relative to the skill folder, not the repo root.