git-ape-onboarding
Automates the setup of Azure and GitHub credentials for Git-Ape deployment pipelines.
Install
mkdir -p .claude/skills/git-ape-onboarding && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15247" && unzip -o skill.zip -d .claude/skills/git-ape-onboarding && rm skill.zipInstalls to .claude/skills/git-ape-onboarding
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Onboard a repository, Azure subscription(s), and user identity for Git-Ape CI/CD using a skill-driven CLI playbook. Use for first-time setup of OIDC, federated credentials, RBAC, GitHub environments, and required secrets.Key capabilities
- →Configure Entra ID App Registration and service principal
- →Set up OIDC federated credentials for GitHub Actions
- →Assign RBAC role(s) on subscription scope
- →Create GitHub environments (`azure-deploy*`, `azure-destroy`)
- →Set required GitHub secrets (`AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_SUBSCRIPTION_ID`)
How it works
This skill bootstraps a repository for Git-Ape deployments by configuring Entra ID, OIDC federated credentials, Azure RBAC, and GitHub environments. It ensures all required secrets are set up for CI/CD.
Inputs & outputs
When to use git-ape-onboarding
- →Onboard new repository for CI/CD
- →Configure Azure service principal
- →Setup OIDC credentials
- →Create GitHub deployment environments
About this skill
Git-Ape Onboarding
Use this skill to bootstrap a repository for Git-Ape deployments by executing the onboarding workflow directly from Copilot Chat.
This skill is the source of truth for onboarding behavior. Do not depend on a standalone repository script for setup logic.
When to Use
- First-time setup of a repository for Git-Ape
- New subscription onboarding (single environment)
- Multi-environment onboarding (dev/staging/prod across different subscriptions)
- New user handoff where OIDC, RBAC, and GitHub environments must be created
What It Configures
This skill configures:
- Entra ID App Registration and service principal (or reuses existing)
- OIDC federated credentials for GitHub Actions
- RBAC role assignment(s) on subscription scope
- GitHub environments (
azure-deploy*,azure-destroy) - Required GitHub secrets (
AZURE_CLIENT_ID,AZURE_TENANT_ID,AZURE_SUBSCRIPTION_ID)
Prerequisites
Before onboarding, run the prereq-check skill to verify all required tools are installed and auth sessions are active:
/prereq-check
The prereq-check skill validates: az (≥ 2.50), gh (≥ 2.0), jq (≥ 1.6), git, and active Azure/GitHub auth sessions. If anything is missing, it shows platform-specific install commands.
Do NOT proceed with onboarding until prereq-check reports ✅ READY.
Additionally, the Azure identity used must have Owner or User Access Administrator on the target subscription(s), and the GitHub identity must have admin access to the target repository.
Execution Modes
Interactive (recommended for first-time use)
Invoke the skill from chat and let the agent gather missing parameters:
/git-ape-onboarding
Parameterized single environment
/git-ape-onboarding onboard https://github.com/org/repo on subscription 00000000-0000-0000-0000-000000000000 with Contributor
Parameterized multi-environment
/git-ape-onboarding onboard https://github.com/org/repo with dev on 11111111-1111-1111-1111-111111111111 as Contributor, staging on 22222222-2222-2222-2222-222222222222 as Contributor, prod on 33333333-3333-3333-3333-333333333333 as Contributor+UserAccessAdministrator
Command Playbook
When the agent executes this skill, it should run the equivalent Azure and GitHub CLI commands directly in this order:
- Validate prerequisites and current auth context.
- Resolve repo metadata:
gh repo view <org>/<repo>
gh api repos/<org>/<repo> --jq '{repo_id: .id, owner_id: .owner.id}'
gh api orgs/<org>/actions/oidc/customization/sub --jq '.use_default'
- Create or reuse the Entra app registration and service principal:
CLIENT_ID=$(az ad app create --display-name "$SP_NAME" --query appId -o tsv)
az ad sp create --id "$CLIENT_ID"
TENANT_ID=$(az account show --query tenantId -o tsv)
OBJECT_ID=$(az ad app show --id "$CLIENT_ID" --query id -o tsv)
- Build the OIDC subject prefix:
# default format
OIDC_PREFIX="repo:<org>/<repo>"
# if org customization returns false
OIDC_PREFIX="repository_owner_id:<OWNER_ID>:repository_id:<REPO_ID>"
- Create federated credentials for
main,pull_request,azure-deploy*, andazure-destroy. - Assign RBAC on each target subscription.
- Set GitHub repo or environment secrets.
- Create GitHub environments and branch policies when permissions allow.
- Capture compliance and Azure Policy preferences (see below).
- Collect explicit acknowledgments for experimental status and production safety.
- Activate workflows by renaming
.exampleymlto.yml(only if all acknowledgments confirmed; see Step 11 section below). - Verify federated credentials, role assignments, secrets, and workflow activation.
Step 9: Compliance & Azure Policy Preferences
After RBAC and environment setup, ask the user about compliance requirements and update the ## Compliance & Azure Policy section in .github/copilot-instructions.md:
-
Ask compliance framework:
Which compliance framework should Git-Ape use for policy recommendations? - General Azure best practices (recommended) - CIS Azure Foundations v3.0 - NIST SP 800-53 Rev 5 - None — skip policy recommendations -
Ask enforcement mode:
How should policies be enforced initially? - Audit only (recommended — evaluate compliance without blocking) - Enforce (Deny — block non-compliant deployments immediately) -
Update
copilot-instructions.mdwith the user's choices:- Edit the
## Compliance & Azure Policy→### Compliance Frameworkssection - Set the
### Policy Enforcement Modedefault to the user's choice - Commit the update as part of the onboarding changes
- Edit the
Step 11: Activate GitHub Workflows
After collecting acknowledgments for experimental status and production safety (see agent's "Acknowledgment Phase"), activate the Git-Ape workflows by renaming .exampleyml files to .yml in the .github/workflows/ directory.
Files to activate:
git-ape-plan.exampleyml→git-ape-plan.yml(validates template and shows what-if)git-ape-deploy.exampleyml→git-ape-deploy.yml(executes deployments)git-ape-destroy.exampleyml→git-ape-destroy.yml(tears down resources)git-ape-verify.exampleyml→git-ape-verify.yml(runs verification steps)
Rename commands (Unix/macOS/Linux):
cd .github/workflows
for f in *.exampleyml; do
target="${f%.exampleyml}.yml"
mv "$f" "$target"
echo "Renamed: $f -> $target"
done
Rename commands (Windows PowerShell):
cd .github\workflows
Get-ChildItem *.exampleyml | ForEach-Object {
$newName = $_.Name -replace '\.exampleyml$', '.yml'
Rename-Item -Path $_.FullName -NewName $newName
Write-Host "Renamed: $($_.Name) -> $newName"
}
Verification (all platforms):
ls .github/workflows/git-ape-*.yml
Should output:
git-ape-deploy.yml
git-ape-destroy.yml
git-ape-plan.yml
git-ape-verify.yml
Output after activation: Display summary:
✅ Workflows activated:
- git-ape-plan.yml (validates and plans deployments)
- git-ape-deploy.yml (executes deployments and integration tests)
- git-ape-destroy.yml (tears down resources when requested)
- git-ape-verify.yml (runs post-deployment verification)
Next steps:
1. Review .github/workflows/git-ape-*.yml for familiarity
2. Push changes to a feature branch and open a PR
3. Verify the plan workflow runs and shows what-if analysis in the PR comment
4. For first deployment, merge to main and monitor git-ape-deploy.yml execution
Safe-Execution Rules
- Echo target repository and subscription(s) before execution.
- Require explicit user confirmation before running onboarding.
- Never print secret values in chat output.
- Require explicit acknowledgments before activating workflows — User must confirm Git-Ape is experimental, will review plans, and won't deploy to production.
- Only activate workflows if ALL acknowledgments are confirmed — Renaming happens only after explicit "Yes" to all three questions.
- If user refuses any acknowledgment, complete onboarding but skip workflow activation. User can enable later manually.
- Summarize what was created or updated (app registration, federated credentials, role assignments, GitHub environments, workflows activated).
- If onboarding fails, surface the failing step and command context, then stop.
Suggested Agent Flow
- Run
/prereq-checkto validate tools and auth. Stop if it doesn't report ✅ READY. - Confirm target repo URL, onboarding mode, and role model.
- Validate current Azure/GitHub auth context (subscription, tenant, GitHub org).
- Ask for final confirmation.
- Execute the required Azure CLI and GitHub CLI commands directly from this playbook (Steps 1-8).
- Ask compliance framework and enforcement mode preferences (Step 9 in playbook).
- Update
copilot-instructions.mdwith compliance preferences. - Display experimental warning and collect acknowledgments (three explicit "Yes" answers required).
- If all acknowledgments confirmed, execute workflow activation (Step 11 in playbook).
- If any acknowledgment refused, skip workflow activation (workflows remain
.exampleyml). - Summarize outcome, activated workflows (if any), and suggest verification commands.
Known Gotchas
GitHub Org Custom OIDC Subject Template (e.g. Azure org)
Some GitHub organizations (notably the Azure org) override the default OIDC subject
claim template to use numeric ID-based subjects instead of name-based ones.
The skill auto-detects this by calling:
gh api "orgs/{org}/actions/oidc/customization/sub" --jq ".use_default"
- Returns
true→ standard format:repo:Azure/git-ape:pull_request - Returns
false→ ID format:repository_owner_id:6844498:repository_id:1184905165:pull_request
If OIDC login fails with AADSTS700213: No matching federated identity record, the
federated credential subjects don't match what GitHub is presenting. Fix by re-running
onboarding (the skill will auto-detect and use the correct format), or manually updating
existing credentials:
# Get repo/owner IDs
gh api repos/Azure/git-ape --jq '{repo_id: .id, owner_id: .owner.id}'
# Update each federated credential with correct subject
az ad app federated-credential update \
--id <APP_OBJECT_ID> \
--federated-credential-id <CRED_ID> \
--parameters '{"subject":"repository_owner_id:<OWNER_ID>:repository_id:<REPO_ID>:pull_request"}'
Disabled Subscriptions
Azure subscriptions in a Disabled state are read-only — RBAC assignments will fail.
Verify subscription state before onboarding:
az account show --subscription <SUB_ID> --query "{name:name,state:state}" -o table
# Test write access:
az group list --subscription <SUB_ID> --query "length(@)" -o tsv
Verification Commands
# Azure context
az account show --query "{name:name,id:id,tenantId
---
*Content truncated.*
When not to use it
- →When the prereq-check skill does not report ✅ READY
- →When the Azure identity does not have Owner or User Access Administrator on target subscription(s)
- →When the GitHub identity does not have admin access to the target repository
Prerequisites
Limitations
- →The Azure identity used must have Owner or User Access Administrator on the target subscription(s)
- →The GitHub identity must have admin access to the target repository
- →Azure subscriptions in a Disabled state are read-only
How it compares
This skill automates the complex setup of CI/CD infrastructure across Azure and GitHub, providing a consistent and verified onboarding process compared to manual configuration.
Compared to similar skills
git-ape-onboarding side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| git-ape-onboarding (this skill) | 0 | 3mo | Review | Advanced |
| windows-builder | 3 | 6mo | No flags | Advanced |
| aios-devops | 0 | 6mo | No flags | Intermediate |
| cloud-architect | 6 | 4mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by weiflycc-cmd
View all by weiflycc-cmd →You might also like
windows-builder
hashicorp
Build Windows images with Packer using WinRM communicator and PowerShell provisioners. Use when creating Windows AMIs, Azure images, or VMware templates.
aios-devops
automacoescomerciaisintegradas
GitHub Repository Manager & DevOps Specialist (Gage). Use for repository operations, version management, CI/CD, quality gates, and GitHub push operations. ONLY agent authorized...
cloud-architect
sickn33
Expert cloud architect specializing in AWS/Azure/GCP multi-cloud infrastructure design, advanced IaC (Terraform/OpenTofu/CDK), FinOps cost optimization, and modern architectural patterns. Masters serverless, microservices, security, compliance, and disaster recovery. Use PROACTIVELY for cloud architecture, cost optimization, migration planning, or multi-cloud strategies.
hybrid-cloud-networking
wshobson
Configure secure, high-performance connectivity between on-premises infrastructure and cloud platforms using VPN and dedicated connections. Use when building hybrid cloud architectures, connecting data centers to cloud, or implementing secure cross-premises networking.
database-admin
sickn33
Expert database administrator specializing in modern cloud databases, automation, and reliability engineering. Masters AWS/Azure/GCP database services, Infrastructure as Code, high availability, disaster recovery, performance optimization, and compliance. Handles multi-cloud strategies, container databases, and cost optimization. Use PROACTIVELY for database architecture, operations, or reliability engineering.
hybrid-cloud-architect
sickn33
Expert hybrid cloud architect specializing in complex multi-cloud solutions across AWS/Azure/GCP and private clouds (OpenStack/VMware). Masters hybrid connectivity, workload placement optimization, edge computing, and cross-cloud automation. Handles compliance, cost optimization, disaster recovery, and migration strategies. Use PROACTIVELY for hybrid architecture, multi-cloud strategy, or complex infrastructure integration.