pilotswarm-azure-lessons
Skill14 starsChanged 8 months agoMITView on GitHub
Workarounds for common Azure issues: RBAC with Conditional Access, PostgreSQL region restrictions, Key Vault + CSI Driver setup.
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Workaround: Use az rest to call the ARM RBAC API directly, bypassing Graph entirely:
- Distinctive: line 42
When using AKV + Secrets Store CSI in AKS:
- Very specific: line 43
Create the vault with --enable-rbac-authorization true
- Very specific: line 46
Use a SecretProviderClass manifest with objectType: secret entries
- Very specific: line 63
When package.json uses file: links to a peer package (e.g., "pilotswarm-sdk": "file:../pilotswarm/packages/sdk"), the Docker build context …
- Very specific: line 66
If package.docker.json references "^0.1.6" (npm), the deployed image gets the
- Very specific: line 82
Add the local copies to .gitignore.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
PilotSwarm Azure Lessons Learned
Verified workarounds for Azure issues encountered during PilotSwarm deployments.
RBAC with Corporate Conditional Access
In enterprise tenants with conditional access policies, az role assignment create may fail with
AADSTS530084 because the command calls the Graph API to resolve principal/role
IDs, and conditional access token protection policies block that call.
Workaround: Use az rest to call the ARM RBAC API directly,
bypassing Graph entirely:
ASSIGNMENT_ID=$(uuidgen | tr '[:upper:]' '[:lower:]')
az rest --method PUT \
--url "https://management.azure.com<SCOPE>/providers/Microsoft.Authorization/roleAssignments/${ASSIGNMENT_ID}?api-version=2022-04-01" \
--body "{
\"properties\": {
\"roleDefinitionId\": \"<SUBSCRIPTION_SCOPE>/providers/Microsoft.Authorization/roleDefinitions/<ROLE_GUID>\",
\"principalId\": \"<PRINCIPAL_OBJECT_ID>\",
\"principalType\": \"ServicePrincipal\"
}
}"Common role definition GUIDs:
- Key Vault Secrets User:
4633458b-17de-408a-b874-0445c86b69e6 - Key Vault Secrets Officer:
b86a8fe4-44ce-4948-aee5-eccb2c155cd7 - Storage Blob Data Contributor:
ba92f5b4-2d11-453d-a403-e96b0029c9fe
Note: az role assignment create may report an error even when the assignment
actually succeeds. A subsequent attempt returning RoleAssignmentExists confirms it worked.
Azure Key Vault with Secrets Store CSI Driver
When using AKV + Secrets Store CSI in AKS:
- Create the vault with
--enable-rbac-authorization true - Assign
Key Vault Secrets Officerto yourself (the operator) for storing secrets - Assign
Key Vault Secrets Userto the workload identity managed identity for reading secrets - Use a
SecretProviderClassmanifest withobjectType: secretentries - Mount secrets as env vars via
secretObjectsin the SecretProviderClass - The CSI driver requires a volume mount even if you only use env vars
Docker Image Platform Mismatch
Building Docker images on macOS (Apple Silicon) produces ARM64 images by default.
AKS nodes run linux/amd64. Always use --platform linux/amd64 when building:
docker build --platform linux/amd64 -f deploy/Dockerfile.worker -t <tag> .Without this, pods will fail with no match for platform in manifest on image pull.
Local Package Parity in Docker Builds
When package.json uses file: links to a peer package (e.g., "pilotswarm-sdk": "file:../pilotswarm/packages/sdk"),
the Docker build context cannot follow symlinks outside the build root.
If package.docker.json references "^0.1.6" (npm), the deployed image gets the
published version — which may be behind the local source.
Fix: Copy the peer packages into the build context and use file: references in package.docker.json:
# Before docker build
cp -r ../pilotswarm/packages/sdk pilotswarm-sdk-local
cp -r ../pilotswarm/packages/app pilotswarm-app-local"pilotswarm-sdk": "file:pilotswarm-sdk-local",
"pilotswarm": "file:pilotswarm-app-local"Add the local copies to .gitignore.
In this repository50 other files it gives its agents.
- packages/sdk/examples/repo-workspaces/seed/home/AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- agent-repair-loopSkill
- duroxide-orchestration-versioningSkill
- editorial-standardsSkill
- finance-research-standardsSkill
- valuation-methodsSkill
- pilotswarm-architectureSkill
- deployment-safetySkill
- incident-responseSkill
- add-activitySkill
- add-eventSkill
- add-testSkill
- add-toolSkill
- agent-versioningSkill
- azure-ps-test-runner-vmSkill
- debug-orchestrationSkill
- debug-testSkill
- horizondb-idiosyncrasiesSkill
- horizon-facts-eval-sweepSkill
- investigate-duroxide-runtimeSkill
- pilotswarm-aks-deploySkill
- pilotswarm-aks-resetSkill
- pilotswarm-new-env-deploySkill
- pilotswarm-perfSkill
- pilotswarm-portal-app-regSkill
- pilotswarm-portal-auth-assignmentsSkill
- pilotswarm-releaseSkill
- pilotswarm-tuiSkill
- pilotswarm-vpn-client-profileSkill
- schema-migrationSkill
- notesSkill
- share-a-fileSkill
- cost-latency-analysisSkill
- graph-debugSkill
- orchestration-session-lifecycleSkill
- resourcemgrSkill
- sweeperSkill
- canvas-appsSkill
- html-visualsSkill
- pilotswarm-agent-versioningSkill
- pilotswarm-aks-identitySkill
- pilotswarm-azure-deployerSkill
- pilotswarm-cli-builderSkill
- pilotswarm-duroxide-versioningSkill
- pilotswarm-hybrid-datastoreSkill
- pilotswarm-knowledge-harvesterSkill
- pilotswarm-portal-builderSkill
- pilotswarm-sdk-builderSkill
- pilotswarm-three-tierSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

