microsoft / microsoft/GitHub-Copilot-for-Azure
Add lifecycle hooks automation skill (azd hooks best practices)
- Dominant language
- Python
- Stars
- 250
- Forks
- 204
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 67
Description
## Summary
There is no skill covering azd lifecycle hooks. This is a gap identified from an analysis of proposed azd skills (Azure/azure-dev#6501).
## Proposed Skill: hooks-automation
**Trigger scenarios:**
- Writing pre/post hooks for azd lifecycle events
- Debugging hook failures (PowerShell, bash, Python)
- Hook ordering and execution flow
- Common hook patterns (data seeding, config transforms, health checks)
**Coverage needed:**
- Hook types: preprovision, postprovision, predeploy, postdeploy, predown, postdown, prerestore, postrestore, prepackage, postpackage
- Hook configuration in azure.yaml (shell, run, continueOnError, interactive)
- Language-specific guidance: PowerShell, bash, Python
- Common patterns: database migrations, environment variable injection, API key rotation, smoke tests
- Error handling and debugging: \Continue, exit codes, stderr capture
- Windows vs Linux differences in hook execution
**Context:** PowerShell hook failures account for ~5% of all azd errors. The \zure-prepare\ skill mentions hooks in triggers but provides no guidance on writing, debugging, or managing them.
Contributor guide
Research direction
Start with the proposed hooks-automation skill scope and the azure.yaml hook configuration described in the issue, then review the referenced azd skills analysis in Azure/azure-dev#6501. Done means the skill covers the listed hook types, configuration options, language guidance, common patterns, error handling, debugging, and Windows/Linux differences.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, bash, powershell, python
- Domain
- cloud, devops, documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100