GitHub Copilot SDK on Azure
Build, deploy, and modify GitHub Copilot SDK applications on A
7 steps · start to finish.
- 0Step 0
Codebase Detection — MANDATORY FIRST CHECK
▶CRITICAL: This check MUST run before any other step when an existing codebase is present.
# Check package.json for Copilot SDK markers if [ -f package.json ]; then if grep -q '@github/copilot-sdk\|copilot-sdk' package.json; then echo "DETECTED: @github/copilot-sdk in package.json — proceeding with this skill" fi fi # Scan TypeScript/JavaScript source files for runtime markers if grep -r 'CopilotClient\|createSession\|sendAndWait' --include='*.ts' --include='*.js' . 2>/dev/null | grep -q .; then echo "DETECTED: CopilotClient or createSession in source files — proceeding with this skill" fiMarker Where to check @github/copilot-sdkpackage.jsondependencies or devDependenciescopilot-sdkpackage.jsonname or dependenciesCopilotClientSource files ( .ts,.js)createSession+sendAndWaitSource files ( .ts,.js)If NO markers are found in an existing codebase → route to
azure-prepareinstead.Generic prompts that MUST trigger this skill when markers are detected:
Prompt pattern Why this skill "Deploy this app to Azure" Codebase contains @github/copilot-sdk"Add a new feature to this app" Requires SDK-aware implementation patterns "Update this app" / "Modify this app" Must preserve SDK integration patterns "Ship this to production" Needs copilot-specific infrastructure and token management - 1Step 1
Environment Setup
▶for cli in azd docker node npm az; do command -v "$cli" >/dev/null 2>&1 || { echo "ERROR: $cli not installed"; exit 1; } done
- 2Step 2
Route
▶Determine the action based on the user's intent:
- 4Step 4
Model Configuration
▶Choose one of three model paths:
- 5Step 5
Deploy
▶Invoke the sub-skills in order (skip azure-prepare Step 0 routing — scaffolding is already done):
- 6Step 6
Iterate on Errors (max 3 rounds)
▶If provisioning or deployment fails:
- 7Step 7
Write Results
▶if [ -f /tmp/scaffold.log ]; then cp /tmp/scaffold.log /app/results/scaffold_log.txt else echo "No scaffold step performed (modify/deploy-existing route)" > /app/results/scaffold_log.txt