zavalivesite-demo
Skill4 starsChanged 4 months agoMITView on GitHub
Build / prep / run / teardown lifecycle for the "SQL and AI for Developers in Action" (azuresqlcontainer) live-site demo — the Azure SQL preview container, one-command demo prep, idempotent container start, connectivity test, and teardown. Use when the user asks to prep/build/start/recreate/test/reset/teardown the live site (Zava On-Call Console) demo environment. NOT for incident triage — that is the live-site-sql skill.
In this repository6 other files it gives its agents.
- demo-runbookSkill
- html-slide-to-pngSkill
- hyperscaleaiSkill
- live-site-sqlSkill
- zavacliniqSkill
- zavahospitalSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 137
Start / Stop / Open app: demo\Start-LiveSite.ps1, demo\Stop-LiveSite.ps1, demo\Open-LiveSite.ps1
- Very specific: line 152
Read prep-run.log for the step banners, then confirm end state:
- Very specific: line 174
When done: tear down the demo (Teardown-LiveSite.ps1).
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ZavaLiveSite Demo — Build & Run Lifecycle Skill
Operational playbook for standing up, running, and tearing down the
azuresqlcontainerdemo. Owner: Bob Ward · SQL and AI for Developers in Action. This covers the environment lifecycle. For on-stage incident triage (mitigate/diagnose incident N) use the separatelive-site-sqlskill. For the presenter beats and the full prompt catalog seeazuresqlcontainer/PRESENTER-RUNBOOK.md.
When to invoke
Trigger on any of:
- "prep the demo" / "prepare the demo environment"
- "build the demo" / "build from scratch"
- "start the SQL container" / "start the live site"
- "pull the latest image" / "recreate the container"
- "test SQL connectivity"
- "insert incident 5012" / "insert the incident"
- "run hybrid search for incident 5012" / "test the hybrid search"
- "reset for beat 2" / "reset the agent test state"
- "tear down / teardown the demo" / "remove the container"
Verified facts (this workspace: c:\sqlaiinaction)
| Fact | Value |
| SQL container name | azsql-zavalivesite |
| Host port | 14330 (→ container 1433) |
| Database | zavalivesitedb |
| Preview image | sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest |
| Preview registry auth | token docker login from a creds file (NOT az acr login) |
| Registry creds file | c:\temp\azuesqldeveloperpreviewcreds.txt (lines Username: / Password:; never committed) |
| sqlcmd | C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\SQLCMD.EXE |
| Engine reported | Edition SQL Azure, EngineEdition=5, ProductVersion 12.0.2000.8 (correct for the Azure SQL DB engine) |
| AI chat model | phi4-mini (3.8B) via Ollama+Caddy — CPU-only ~74s warm. Do NOT use phi4 (14B); it exceeds this demo's configured @timeout of 180s on CPU (the sp_invoke_external_rest_endpoint product max is 230s). |
| AI embed model | mxbai-embed-large (1024-dim) |
Azure SQL Database engine specifics (EngineEdition 5) — do not relearn these
- All logins use
sa. There is nosqladminbootstrap — the engine won't create a sysadmin login the way box SQL Server does.sais the server admin. 00_setup.sqlmust not runsp_configure/RECONFIGURE— the engine raisesMsg 40510 'CONFIG not supported'.sp_invoke_external_rest_endpointis on by default, so no server toggle is needed (unlike SQL Server 2025 box / MI).- No GPU on this host — the chat model runs 100% CPU, which is why the model choice (phi4-mini, not phi4) matters.
Secret handling — non-negotiable
- Never route the SA password through the model,
vscode_askQuestions, or a command argument. Have the user type it at a maskedRead-Hostprompt directly in the terminal. - The SA password supplied to any deploy/prep step must match the password
the running container was created with, or
salogin fails. - Non-secret values (image, container name, port) are known — pass them as
parameters; only the SA password is interactive. Everything connects as sa;
there is no separate
sqladminlogin (the Azure SQL Database engine doesn't support creating one the way box SQL Server does).
Agent-harness gotchas (why the "simple" way fails for the agent)
The presenter's real flow is trivial: set 3 env vars once, run the script. But across agent tool calls:
- CWD resets between calls → always use absolute script paths, never
.\. - Env vars don't persist across calls → don't rely on
$env:SQLAI_*set in a prior call; pass values inline in the same command. - Output capture truncates →
Tee-Objectthe run to a log file and read the log withread_fileinstead of trusting inline output.
Canonical commands (absolute paths; run exactly these)
Prep the demo — the one-command presenter flow (Build → deploy-prestage → Reset-ForBeat2 → Warmup-Ai → Verify-Build → Start-LiveSite). Prompts for the two passwords, then runs non-interactively and logs everything:
$sa=Read-Host 'SA password (match container)' -AsSecureString
& 'C:\sqlaiinaction\azuresqlcontainer\local\build\Prepare-DemoEnvironment.ps1' `
-SqlImage 'sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest' `
-SaCredential $sa `
*>&1 | Tee-Object -FilePath 'C:\sqlaiinaction\azuresqlcontainer\local\build\prep-run.log'Then read ...\build\prep-run.log to confirm each step. Add -SkipStart to stop
before launching the AppHost.
Build from scratch — 12-step idempotent bootstrap:
& 'C:\sqlaiinaction\azuresqlcontainer\local\build\Build.ps1'Start the container — idempotent: running → no-op, stopped → start, missing → create:
& 'C:\sqlaiinaction\azuresqlcontainer\local\build\container\Start-AzureSqlContainer.ps1'-Pull→ remove container + local image, re-pull fresh, run (get an updated image).-Recreate(-Force) → remove container, rebuild from the local image (e.g. move ports).- Creating prompts for the SA password (masked, in-terminal) unless
$env:SQLAI_SA_PASSWORDis set.
Test connectivity — clean version/edition line (uses $env:SQLAI_SA_PASSWORD):
& 'C:\sqlaiinaction\azuresqlcontainer\local\diagnostics\Test-AzureSqlConnection.ps1'Or a one-shot check without the script:
& sqlcmd -S localhost,14330 -U sa -P "$env:SQLAI_SA_PASSWORD" -C -b -h -1 -W -Q "SELECT CONVERT(varchar(30),SERVERPROPERTY('ProductVersion')) + ' | ' + CONVERT(varchar(40),SERVERPROPERTY('Edition'));"Insert incident 5012 — runs the five-feature INSERT for Beat 2. If the password environment variable is unavailable, prompts for it securely in the terminal:
& 'C:\sqlaiinaction\azuresqlcontainer\local\demo\Insert-Incident.ps1'Run hybrid search for incident 5012 — executes the Beat 3 hybrid-search query and prints its result set. The actual execution plan remains a manual SSMS step:
& 'C:\sqlaiinaction\azuresqlcontainer\local\demo\Run-HybridSearch.ps1'Remove just the SQL container (clean redeploy):
& 'C:\sqlaiinaction\azuresqlcontainer\local\build\container\Remove-AzureSqlContainer.ps1'-RemoveImage also drops the image; -PruneVolumes prunes volumes.
Full teardown (AppHost + dab-* + SQL container):
& 'C:\sqlaiinaction\azuresqlcontainer\local\build\Teardown-LiveSite.ps1'App + reset helpers (run from local\):
- Start / Stop / Open app:
demo\Start-LiveSite.ps1,demo\Stop-LiveSite.ps1,demo\Open-LiveSite.ps1 - Rewind to pre-Beat-1:
demo\Reset-ForBeat2.ps1 - One-command reset + re-insert 5012:
demo\Reset-AgentTestState.ps1 - Warm the models:
demo\Warmup-Ai.ps1
Flags cheat-sheet — Start-AzureSqlContainer
| Goal | Flag |
| Everyday start (leave a running container alone) | (none) |
| Pick up a newer preview image | -Pull (remove container + image → re-pull → run) |
| Rebuild from the local image (move port / reset) | -Recreate (alias -Force) |
After prep — verify
Read prep-run.log for the step banners, then confirm end state:
docker psshowsazsql-zavalivesiteup and (if started)dab-*containers.Test-AzureSqlConnection.ps1returns the Azure SQL version line.zavalivesitedbexists with a seededIncidentArchivecorpus.
Now run the demo (what to do next)
Prep ends with the app running. To present:
- Open the console — browser to http://localhost:8080 (or say
open the live site→Open-LiveSite.ps1). Incident #5012 shows its empty/placeholder state. - Walk the beats — the six-beat flow (schema → INSERT → hybrid search → agent
mitigation → cloud) and the exact prompt/action per beat are in
PRESENTER-RUNBOOK.md. Most beats are manual VS Code / MSSQL actions. - Beat 4 (the AI moment) — in Copilot Chat run
Mitigate incident 5012 @live-site-sql. That hands off to thelive-site-sqlagent/skill (triage protocol), NOT this skill. Then refresh the browser to see the mitigation card populate. - Between rehearsals —
reset the agent test state(Reset-AgentTestState.ps1) rewinds + re-inserts #5012 in one command. Orreset for beat 2for the incident rewind only. - Quick agent-path smoke test (optional) —
Test-AgentPath.ps1 -WithReset.
When done: tear down the demo (Teardown-LiveSite.ps1).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

