campsite-demo
Skill0 starsChanged 28 days agoMITView on GitHub
Run or explain this repository''s specific campsite PostgreSQL portability demo. Use when asked to run the campsite demo, run the local campsite or campsites demo, explain the local demo, find your next escape, run campsite preflight or pre-flight, refresh the campsite demo client IP, prepare the campsite migration demo, or demonstrate local PostgreSQL to Azure Flexible Server. Local mode demonstrates PostGIS, full-text search, JSONB, typo tolerance, and availability without Azure access. Cloud mode checks exact versions, uses Entra and verified TLS, and gates firewall changes and migrations separately.
In this repository4 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
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
- Distinctive: line 9
Run this specific database-only demo, rather than asking the user to repeat its configuration.
- Distinctive: line 26
Do not deploy an app, provision resources, start/restart Docker Desktop, reset data, or change authentication/allowlists without explicit …
- Very specific: line 58
Ask explicit approval before adding any missing allowlist entries, preserving all existing entries.
- Distinctive: line 61
If the local container is stopped or not initialized, ask approval to run:
- Distinctive: line 67
If the IP rule needs refresh, show the subscription, server, old IP/rule, and new public IP, then ask approval to replace the managed rule …
- Very specific: line 95
If engine/extension versions differ, stop before migration.
- Very specific: line 131
Handle a typo: search for Lake Samamish Heron.
- Distinctive: line 142
Use the runbook's separate two-session procedure only when requested, with explicit permission for the bookings and cleanup.
- Distinctive: line 156
Before any restore or target verification with test writes, present the exact source/target, maintenance window, expected test writes, and …
- Distinctive: line 159
NOT migration approval. If the target has application tables, stop and ask whether to verify the existing demo instead.
- Distinctive: line 180
Keep the narrative to 4-5 minutes after setup.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Campsite demo
Run this specific database-only demo, rather than asking the user to repeat its configuration. Do not delegate routine execution. Work in PowerShell from the repository root. Read the runbook before executing.
Known configuration
| Setting | Value |
| Subscription | AzureSQL_bobward / 0efc44aa-c965-420f-aac4-fff305dbcc97 |
| Resource group / region | campsites-demo-rg / centralus |
| Flexible Server | bobward-campsites-pg18 |
| Database / Entra user | campsites / bobward@microsoft.com |
| Local endpoint | localhost:55432, user campsite_admin |
| Managed client firewall rule | campsites-demo-client |
| Local engine pin | PostgreSQL 18.6 (180006); verify against actual Azure SQL |
These are defaults, not permission to access a different target if they fail. Do not deploy an app, provision resources, start/restart Docker Desktop, reset data, or change authentication/allowlists without explicit approval. A plain "run the demo" means preflight, local search demonstration, and a migration approval gate, not permission to overwrite cloud data.
Prompt examples and mode selection
- "Run the local campsite demo" or
/campsite-demo local: go directly to section 2. Do not run Azure preflight, access Azure, or migrate data. - "What is the local campsite demo?": explain the section 2 walkthrough without executing commands.
- "Run the campsite demo preflight" or
/campsite-demo preflight: run section 1 only. - "Run the campsite migration demo" or
/campsite-demo migrate: run preflight, then follow section 3 with separate migration approval.
1. Preflight (also called pre-flight)
Run:
.\campsites\scripts\00-preflight.ps1This is read-only by default and uses PostgreSQL clients inside the existing
container. It checks Azure login/server state, local seeded data, current public
IPv4, one named firewall rule, an Entra SQL login with certificate-verified TLS,
exact major/minor engine equality, and availability/allowlisting of the local
extension versions. Inventory every installed non-core extension included by
pg_dump, not only the three used by the search demo. The local image also
installs fuzzystrmatch, postgis_tiger_geocoder, and postgis_topology; these
require matching Azure versions and allowlisting for a full database restore.
Ask explicit approval before adding any missing allowlist entries, preserving
all existing entries. It returns Ready only when these checks pass.
If the local container is stopped or not initialized, ask approval to run:
.\campsites\scripts\local.ps1 -Action StartIf the IP rule needs refresh, show the subscription, server, old IP/rule, and new public IP, then ask approval to replace the managed rule with that ONE IP:
.\campsites\scripts\00-preflight.ps1 -RefreshFirewallTo preview without writes, append -WhatIf. The script never creates a broad
range or AllowAzureServices rule. Reuse the same name on every refresh; do not
accumulate IP rules.
One-time transition: provisioning originally created
FirewallIPAddress_2026-10-18_9-53-50. Inspect current rules first. If it still
exists, ask separate explicit approval to retire that named single-IP rule as
part of the refresh, then add:
-RetireFirewallRuleName 'FirewallIPAddress_2026-10-18_9-53-50'The replacement is verified before the old rule is deleted. Never delete other users' rules. Other rules are reported and preserved. If rule propagation delays SQL access, wait briefly and rerun read-only preflight; do not broaden access.
For a different signed-in administrator use the explicit -EntraUser override
only after confirming the role exists on the target. Never print a token or
password, use credential-bearing command arguments, or weaken TLS to connect.
If engine/extension versions differ, stop before migration. Inspect actual
Azure pg_available_extension_versions, not just documentation. In particular,
the initial local PostGIS was 3.6.4 and the documented Azure default was 3.6.1.
Preserve old volumes when building a matching local environment. Do not claim
preflight passed when only connectivity or control-plane checks succeeded.
2. Demonstrate locally
The local demo is PostgreSQL in Docker at localhost:55432, not a website or
application. It uses 30 fictional campsites near real Washington locations and
three seeded reservations.
For "local" mode, run only these commands in order, without Azure access or
firewall changes. Stop and report the error if verification fails; do not
continue to the search demo or silently reseed data. If the database is not
configured or the container is stopped, ask approval to run -Action Start
as described in section 1, then retry.
.\campsites\scripts\local.ps1 -Action Verify
.\campsites\scripts\local.ps1 -Action DemoVerify runs local behavior checks with rolled-back row changes; identity
sequences can still advance because PostgreSQL sequences are not transactional.
Demo runs the three read-only queries in
03-demo.sql. For the full demo, execute
these commands after preflight.
Narrate the query results briefly:
- Find your next escape: "Find a pet-friendly lakeside campsite for four,
with kayaking, within 45 km of Seattle." PostGIS filters geographic distance,
full-text search matches
lake kayaking, JSONB filters pet-friendly and kayak-rental amenities, and capacity must be at least four. Expect exactly six matches ordered by distance, then name. - Handle a typo: search for
Lake Samamish Heron. Thepg_trgmsimilarity search finds the intendedLake Sammamish Herondespite the misspelling, returning up to three candidates with similarity scores. - Check availability: show up to five campsites without overlapping
reservations for July 11-13, 2030. Explain that
[arrival, departure)ranges permit checkout-day arrivals.
Report actual results and verification pass/fail; if the first query does not
return six matches, report the discrepancy instead of claiming success.
Distinguish the availability query from booking protection: verification checks
the exclusion constraint, but Demo does not run the two-session booking race.
Use the runbook's separate two-session procedure only when requested, with
explicit permission for the bookings and cleanup.
Close with the portability story: these same PostgreSQL features and queries can move to Azure Database for PostgreSQL without rewriting them. Local mode does not prove a migration occurred; report Azure checks and migration as not run. Do not claim performance gains from this tiny dataset.
3. Migrate only after approval
Load the migration workflow and follow its dump/restore, source snapshot, TLS, fingerprint, sequence, and verification steps. The Azure target is already provisioned: do not create another one.
Before any restore or target verification with test writes, present the exact source/target, maintenance window, expected test writes, and whether the target is empty. Obtain explicit migration approval. Preflight/firewall approval is NOT migration approval. If the target has application tables, stop and ask whether to verify the existing demo instead; never drop, clean, or overwrite it.
Rerun preflight immediately before migrating. Use the source container's PG18
clients (not older host pg_restore) and a custom-format archive stored in ignored
campsites\.local\. Do not pipe binary archives through PowerShell. If a migration
stage fails, stop and report it; leave the source intact.
4. Verify and present
For "verify" mode, run read-only preflight first. Ask permission before executing
the rolled-back cloud checks in 04-verify.sql; they perform temporary row writes
and can advance identity sequences despite rollback. Compare sequence state
immediately after restore, then confirm that verification leaves row
fingerprints unchanged and sequences safe for future inserts. Do not reset
sequences merely to hide expected verification advances.
Compare source/target fingerprints, counts, identities, engine and extension
versions, and run the same search SQL on Azure. Use the runbook's two-session
booking procedure with explicit permission for those bookings and cleanup.
Finish with measured migration duration and explicit pass/fail/not-run statuses. Keep the narrative to 4-5 minutes after setup. Never claim the app is deployed: this skill currently demonstrates the database only.
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.

