Official agent skill

Azure Static Web Apps

by github in github/awesome-copilot

Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI.

OfficialMITAuto-check passedDevOps & Cloud

Install Azure Static Web Apps

skills CLI
$ npx skills add github/awesome-copilot --skill azure-static-web-apps -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/awesome-copilot azure-static-web-apps --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/azure-static-web-apps .claude/skills/azure-static-web-apps && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
azure-static-web-apps
GitHub stars
40k
Used in
1 other repo
Token cost
~2.4k tokens
SKILL.md length
564 words
Files
1
Skills in repo
417
Repo updated
First seen
Licence
MIT

At a glance

Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI.

  • Works in 4 steps: swa init - Required first step -… → swa start - Run local emulator at… → swa login - Authenticate with Azure → …
  • Deploying static sites to Azure
  • SKILL.md covers Overview, General Instructions, Command-line Reference and Scenarios, plus 1 more section
  • Calls npx and npm; reaches aka.ms; needs AZURE_STATIC_WEB_APPS_API_TOKEN and SWA_CLI_DEPLOYMENT_TOKEN

What it does

Azure Static Web Apps is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development, configuring staticwebapp.config.json, adding Azure Functions APIs to SWA, or setting up GitHub Actions CI/CD for Static Web Apps.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering CI/CD and Static sites and blogs. It works with Microsoft Azure, Azure Functions and GitHub Actions. The repository describes itself as: Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot. The licence is MIT.

When your agent uses it

  • Deploying static sites to Azure
  • Setting up SWA local development
  • Configuring staticwebapp.config.json
  • Adding Azure Functions APIs to SWA

Example prompts

  • “Use the azure-static-web-apps skill to help create, configure, and deploy Azure Static Web Apps using the SWA CLI”
  • “/azure-static-web-apps”

Requirements

  • Node.js
  • A credential in SWA_CLI_DEPLOYMENT_TOKEN
  • A credential in AZURE_STATIC_WEB_APPS_API_TOKEN

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. swa init - Required first step - auto-detects framework and creates swa-cli.config.json
  2. swa start - Run local emulator at http://localhost:4280
  3. swa login - Authenticate with Azure
  4. swa deploy - Deploy to Azure

What it can do on your machine

Read from SKILL.md and the folder at commit 727ff2e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npx
    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • aka.ms

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • AZURE_STATIC_WEB_APPS_API_TOKEN
    • SWA_CLI_DEPLOYMENT_TOKEN
    • GITHUB_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Azure Static Web Apps loads about 2.4k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 564 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/awesome-copilot at commit 727ff2e, republished under its MIT licence (© github). 564 words, ~2,373 tokens.

Download SKILL.mdSave it as .claude/skills/azure-static-web-apps/SKILL.md (or your agent's skills folder).
name
azure-static-web-apps
description
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development, configuring staticwebapp.config.json, adding Azure Functions APIs to SWA, or setting up GitHub Actions CI/CD for Static Web Apps.

Overview

Azure Static Web Apps (SWA) hosts static frontends with optional serverless API backends. The SWA CLI (swa) provides local development emulation and deployment capabilities.

Key features:

  • Local emulator with API proxy and auth simulation
  • Framework auto-detection and configuration
  • Direct deployment to Azure
  • Database connections support

Config files:

  • swa-cli.config.json - CLI settings, created by swa init (never create manually)
  • staticwebapp.config.json - Runtime config (routes, auth, headers, API runtime) - can be created manually

General Instructions

Installation
bash
npm install -D @azure/static-web-apps-cli

Verify: npx swa --version

Quick Start Workflow

IMPORTANT: Always use swa init to create configuration files. Never manually create swa-cli.config.json.

  1. swa init - Required first step - auto-detects framework and creates swa-cli.config.json
  2. swa start - Run local emulator at http://localhost:4280
  3. swa login - Authenticate with Azure
  4. swa deploy - Deploy to Azure
Configuration Files

swa-cli.config.json - Created by swa init, do not create manually:

  • Run swa init for interactive setup with framework detection
  • Run swa init --yes to accept auto-detected defaults
  • Edit the generated file only to customize settings after initialization

Example of generated config (for reference only):

json
{
  "$schema": "https://aka.ms/azure/static-web-apps-cli/schema",
  "configurations": {
    "app": {
      "appLocation": ".",
      "apiLocation": "api",
      "outputLocation": "dist",
      "appBuildCommand": "npm run build",
      "run": "npm run dev",
      "appDevserverUrl": "http://localhost:3000"
    }
  }
}

staticwebapp.config.json (in app source or output folder) - This file CAN be created manually for runtime configuration:

json
{
  "navigationFallback": {
    "rewrite": "/index.html",
    "exclude": ["/images/*", "/css/*"]
  },
  "routes": [
    { "route": "/api/*", "allowedRoles": ["authenticated"] }
  ],
  "platform": {
    "apiRuntime": "node:20"
  }
}

Command-line Reference

swa login

Authenticate with Azure for deployment.

bash
swa login                              # Interactive login
swa login --subscription-id <id>       # Specific subscription
swa login --clear-credentials          # Clear cached credentials

Flags: --subscription-id, -S | --resource-group, -R | --tenant-id, -T | --client-id, -C | --client-secret, -CS | --app-name, -n

swa init

Configure a new SWA project based on an existing frontend and (optional) API. Detects frameworks automatically.

bash
swa init                    # Interactive setup
swa init --yes              # Accept defaults
swa build

Build frontend and/or API.

bash
swa build                   # Build using config
swa build --auto            # Auto-detect and build
swa build myApp             # Build specific configuration

Flags: --app-location, -a | --api-location, -i | --output-location, -O | --app-build-command, -A | --api-build-command, -I

swa start

Start local development emulator.

bash
swa start                                    # Serve from outputLocation
swa start ./dist                             # Serve specific folder
swa start http://localhost:3000              # Proxy to dev server
swa start ./dist --api-location ./api        # With API folder
swa start http://localhost:3000 --run "npm start"  # Auto-start dev server

Common framework ports:

FrameworkPort
React/Vue/Next.js3000
Angular4200
Vite5173

Key flags:

  • --port, -p - Emulator port (default: 4280)
  • --api-location, -i - API folder path
  • --api-port, -j - API port (default: 7071)
  • --run, -r - Command to start dev server
  • --open, -o - Open browser automatically
  • --ssl, -s - Enable HTTPS
swa deploy

Deploy to Azure Static Web Apps.

bash
swa deploy                              # Deploy using config
swa deploy ./dist                       # Deploy specific folder
swa deploy --env production             # Deploy to production
swa deploy --deployment-token <TOKEN>   # Use deployment token
swa deploy --dry-run                    # Preview without deploying

Get deployment token:

  • Azure Portal: Static Web App → Overview → Manage deployment token
  • CLI: swa deploy --print-token
  • Environment variable: SWA_CLI_DEPLOYMENT_TOKEN

Key flags:

  • --env - Target environment (preview or production)
  • --deployment-token, -d - Deployment token
  • --app-name, -n - Azure SWA resource name
Show full SKILL.md (225 more words)Show less
swa db

Initialize database connections.

bash
swa db init --database-type mssql
swa db init --database-type postgresql
swa db init --database-type cosmosdb_nosql

Scenarios

Create SWA from Existing Frontend and Backend

Always run swa init before swa start or swa deploy. Do not manually create swa-cli.config.json.

bash
# 1. Install CLI
npm install -D @azure/static-web-apps-cli

# 2. Initialize - REQUIRED: creates swa-cli.config.json with auto-detected settings
npx swa init              # Interactive mode
# OR
npx swa init --yes        # Accept auto-detected defaults

# 3. Build application (if needed)
npm run build

# 4. Test locally (uses settings from swa-cli.config.json)
npx swa start

# 5. Deploy
npx swa login
npx swa deploy --env production
Add Azure Functions Backend
  1. Create API folder:
bash
mkdir api && cd api
func init --worker-runtime node --model V4
func new --name message --template "HTTP trigger"
  1. Example function (api/src/functions/message.js):
javascript
const { app } = require('@azure/functions');

app.http('message', {
    methods: ['GET', 'POST'],
    authLevel: 'anonymous',
    handler: async (request) => {
        const name = request.query.get('name') || 'World';
        return { jsonBody: { message: `Hello, ${name}!` } };
    }
});
  1. Set API runtime in staticwebapp.config.json:
json
{
  "platform": { "apiRuntime": "node:20" }
}
  1. Update CLI config in swa-cli.config.json:
json
{
  "configurations": {
    "app": { "apiLocation": "api" }
  }
}
  1. Test locally:
bash
npx swa start ./dist --api-location ./api
# Access API at http://localhost:4280/api/message

Supported API runtimes: node:18, node:20, node:22, dotnet:8.0, dotnet-isolated:8.0, python:3.10, python:3.11

Set Up GitHub Actions Deployment
  1. Create SWA resource in Azure Portal or via Azure CLI
  2. Link GitHub repository - workflow auto-generated, or create manually:

.github/workflows/azure-static-web-apps.yml:

yaml
name: Azure Static Web Apps CI/CD

on:
  push:
    branches: [main]
  pull_request:
    types: [opened, synchronize, reopened, closed]
    branches: [main]

jobs:
  build_and_deploy:
    if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Build And Deploy
        uses: Azure/static-web-apps-deploy@v1
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          action: upload
          app_location: /
          api_location: api
          output_location: dist

  close_pr:
    if: github.event_name == 'pull_request' && github.event.action == 'closed'
    runs-on: ubuntu-latest
    steps:
      - uses: Azure/static-web-apps-deploy@v1
        with:
          azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
          action: close
  1. Add secret: Copy deployment token to repository secret AZURE_STATIC_WEB_APPS_API_TOKEN

Workflow settings:

  • app_location - Frontend source path
  • api_location - API source path
  • output_location - Built output folder
  • skip_app_build: true - Skip if pre-built
  • app_build_command - Custom build command

Troubleshooting

IssueSolution
404 on client routesAdd navigationFallback with rewrite: "/index.html" to staticwebapp.config.json
API returns 404Verify api folder structure, ensure platform.apiRuntime is set, check function exports
Build output not foundVerify output_location matches actual build output directory
Auth not working locallyUse /.auth/login/<provider> to access auth emulator UI
CORS errorsAPIs under /api/* are same-origin; external APIs need CORS headers
Deployment token expiredRegenerate in Azure Portal → Static Web App → Manage deployment token
Config not appliedEnsure staticwebapp.config.json is in app_location or output_location
Local API timeoutDefault is 45 seconds; optimize function or check for blocking calls

Debug commands:

bash
swa start --verbose log        # Verbose output
swa deploy --dry-run           # Preview deployment
swa --print-config             # Show resolved configuration

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/azure-static-web-apps of github/awesome-copilot.

Open the folder on GitHubat commit 727ff2e

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in github/awesome-copilot, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Azure Static Web Apps next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Azure Static Web Apps compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Azure Static Web Apps this skillgithub/awesome-copilot40k1 repos~2.4kAutomated safety check: PassMIT
Azure Bicep Skilltimothywarner-org/claude-code224—~2.9kAutomated safety check: PassMIT
Nuget Trusted Publishingdotnet/skills5.6k2 repos~2.3kAutomated safety check: PassMIT
Sdaf Orientation And SurfaceAzure/sap-automation145—~1.6kAutomated safety check: PassMIT
Sdaf Sovereign CloudAzure/sap-automation145—~1.4kAutomated safety check: PassMIT
Managing Workflow Secretsbitwarden/ai-plugins154—~4kAutomated safety check: PassCustom licence

Similar skills

  • Azure Bicep Skill

    timothywarner-org/claude-code

    A skill your agent uses when authoring, reviewing, or refactoring Azure Bicep code.

    224 GitHub stars~2.9k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check passed
  • Official

    Set up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens.

    5.6k GitHub starsUsed in 2 repos~2.3k tokens
    DevOps & CloudAuto-check passed
  • Sdaf Orientation And Surface

    Azure/sap-automation

    Official

    Orient a newcomer to the SAP Deployment Automation Framework (SDAF): explain the spine (control plane → workload zone → SAP system → software → install → operate/remove), summarise the three…

    145 GitHub stars~1.6k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Sdaf Sovereign Cloud

    Azure/sap-automation

    Official

    Explain the current SDAF sovereign-cloud deltas without inventing a generic "all sovereigns" runbook.

    145 GitHub stars~1.4k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Managing Workflow Secrets

    bitwarden/ai-plugins

    Official

    Bitwarden's canonical pattern for using a secret inside a GitHub Actions job: authenticate to Azure with the OIDC triad, pull the secret from an Azure Key Vault via the bitwarden/gh-actions…

    154 GitHub stars~4k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Vercel Deployments

    BagelHole/DevOps-Security-Agent-Skills

    Deploy frontend and full-stack apps on Vercel with previews, edge functions, environment promotion, and production guardrails.

    1.1k GitHub stars~1.8k tokensUpdated 4 mo ago
    DevOps & CloudAuto-check: notes

More from github/awesome-copilot

All 417 skills in this repo
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Azure Architecture Autopilot

    github/awesome-copilot

    Official

    Designs Azure infrastructure from a natural-language description, or diagrams an existing resource group, then refines the design through conversation and deploys it with Bicep.

    40k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Draw.io Diagram Generator

    github/awesome-copilot

    Official

    Generates, edits and validates draw.io files with correct mxGraph XML, covering flowcharts, architecture, sequence, ER and UML class diagrams.

    40k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed
  • Credit Risk Data Cleaning

    github/awesome-copilot

    Official

    Cleans raw credit data and screens variables before loan modeling, dropping unstable, noisy or redundant features and writing an Excel report of every step.

    40k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Daily Focus Board

    github/awesome-copilot

    Official

    Builds a warm, browser-based daily focus board the user updates by talking to their agent, with Eisenhower priorities, a brain-dump box and kind not-today carryover.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Python Pypi Package Builder

    github/awesome-copilot

    Official

    End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI.

    40k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Categories

Questions about Azure Static Web Apps

What does Azure Static Web Apps do?

Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Azure Static Web Apps is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI.

When should I use Azure Static Web Apps?

Azure Static Web Apps fits situations like: deploying static sites to Azure; setting up SWA local development; configuring staticwebapp.config.json; adding Azure Functions APIs to SWA.

How do I install Azure Static Web Apps in Claude Code?

Run `npx skills add github/awesome-copilot --skill azure-static-web-apps -a claude-code`. Or copy the skill folder (skills/azure-static-web-apps in github/awesome-copilot) into .claude/skills/azure-static-web-apps in your project. Claude Code loads it when a task matches its description.

How do I install Azure Static Web Apps in Codex?

Run `npx skills add github/awesome-copilot --skill azure-static-web-apps -a codex`. Or copy the skill folder (skills/azure-static-web-apps in github/awesome-copilot) into .agents/skills/azure-static-web-apps in your project. Codex loads it when a task matches its description.

Can I use Azure Static Web Apps in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/awesome-copilot --skill azure-static-web-apps -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/azure-static-web-apps, .gemini/skills/azure-static-web-apps, .github/skills/azure-static-web-apps and .opencode/skills/azure-static-web-apps in your project.

What does Azure Static Web Apps need to run?

Going by SKILL.md and its folder, Azure Static Web Apps needs the command-line tools its instructions call (npx and npm) and credentials named AZURE_STATIC_WEB_APPS_API_TOKEN, SWA_CLI_DEPLOYMENT_TOKEN and GITHUB_TOKEN. Our summary lists: Node.js; A credential in SWA_CLI_DEPLOYMENT_TOKEN; A credential in AZURE_STATIC_WEB_APPS_API_TOKEN.

Does Azure Static Web Apps access the network?

SKILL.md names 1 domain. In commands or code: aka.ms; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Azure Static Web Apps safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Azure Static Web Apps use?

Azure Static Web Apps is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Azure Static Web Apps use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Azure Static Web Apps?

Skills that share tags, products or a category with Azure Static Web Apps: Azure Bicep Skill (timothywarner-org/claude-code, 224 stars), Nuget Trusted Publishing (dotnet/skills, 5.6k stars), Sdaf Orientation And Surface (Azure/sap-automation, 145 stars) and Sdaf Sovereign Cloud (Azure/sap-automation, 145 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Azure Static Web Apps?

github (a GitHub organization, an official publisher) maintains it in github/awesome-copilot, which has 39,748 GitHub stars. The repository holds 417 skills in this directory. The repository was last updated on October 7, 2026.

Source: github/awesome-copilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.