secondsky/claude-skills / plugins/cloudflare-zero-trust-access/skills/cloudflare-zero-trust-access
cloudflare-zero-trust-access
VerifiedCloudflare Zero Trust Access authentication for Workers. Use for JWT validation, service tokens, CORS, or encountering preflight blocking, cache race conditions, missing JWT headers.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.1 KB |
| references/access-policy-setup.md | markdown | 13.5 KB |
| references/common-errors.md | markdown | 15.1 KB |
| references/jwt-payload-structure.md | markdown | 12.8 KB |
| references/quick-start.md | markdown | 1.8 KB |
| references/service-tokens-guide.md | markdown | 15.3 KB |
| references/use-cases.md | markdown | 8.1 KB |
| references/value-proposition.md | markdown | 1.6 KB |
| scripts/create-service-token.shexecutable | script | 8.3 KB |
| scripts/test-access-jwt.shexecutable | script | 10.8 KB |
| templates/.env.example | other | 4.2 KB |
| templates/cors-access.ts | script | 8.1 KB |
| templates/hono-basic-setup.ts | script | 3.8 KB |
| templates/jwt-validation-manual.ts | script | 6.6 KB |
| templates/multi-tenant.ts | script | 10.1 KB |
| templates/service-token-auth.ts | script | 7.5 KB |
| templates/types.ts | script | 8.5 KB |
| templates/wrangler.jsonc | other | 3.9 KB |
templates/.env.example
View on GitHub# Cloudflare Zero Trust Access - Environment Variables
#
# Copy this to .env.local for local development
# DO NOT commit .env.local to git!
#
# For production, set these using Wrangler secrets:
# npx wrangler secret put ACCESS_TEAM_DOMAIN
# npx wrangler secret put ACCESS_AUD
# ============================================================================
# REQUIRED: Access Configuration
# ============================================================================
# Your Cloudflare Access team domain (without https://)
# Find this in: Zero Trust Dashboard > Settings > Custom Pages
# Example: your-team.cloudflareaccess.com
ACCESS_TEAM_DOMAIN=your-team.cloudflareaccess.com
# Application Audience (AUD) tag
# Find this in: Zero Trust Dashboard > Access > Applications > Your App
# Click on your application > Copy the "Application Audience" value
# Example: abc123def456ghi789jkl012mno345pqr678stu901vwx234yz
ACCESS_AUD=your-app-aud-tag-here
# ============================================================================
# OPTIONAL: Service Tokens (for machine-to-machine auth)
# ============================================================================
# Service Token Client ID
# Create in: Zero Trust Dashboard > Access > Service Auth > Create Service Token
# Example: abc123.access
# SERVICE_TOKEN_ID=
# Service Token Client Secret
# IMPORTANT: Only shown once when creating token! Store securely.
# SERVICE_TOKEN_SECRET=
# ============================================================================
# OPTIONAL: CORS Configuration
# ============================================================================
# Frontend application URL (for CORS)
# FRONTEND_URL=https://app.example.com
# ============================================================================
# OPTIONAL: Multi-Tenant Configuration
# ============================================================================
# Default tenant ID (if using multi-tenant pattern)
# DEFAULT_TENANT_ID=default
# ============================================================================
# DEVELOPMENT: Local Testing
# ============================================================================
# For local development with Wrangler
# Note: Access won't work locally without proper setup
# Consider mocking JWT for local dev
# Mock JWT for local testing (base64 encoded)
# MOCK_JWT_ENABLED=true
# MOCK_USER_EMAIL=dev@example.com
# ============================================================================
# SETUP INSTRUCTIONS
# ============================================================================
# 1. Copy this file:
# cp .env.example .env.local
# 2. Fill in your values:
# - ACCESS_TEAM_DOMAIN: From Zero Trust Dashboard
# - ACCESS_AUD: From your Access Application
# 3. For service tokens (optional):
# - Create token in Zero Trust Dashboard
# - Copy ID and Secret to SERVICE_TOKEN_ID and SERVICE_TOKEN_SECRET
# 4. For production:
# - DO NOT use .env files in production
# - Set secrets via Wrangler:
# npx wrangler secret put ACCESS_TEAM_DOMAIN
# npx wrangler secret put ACCESS_AUD
# npx wrangler secret put SERVICE_TOKEN_ID
# npx wrangler secret put SERVICE_TOKEN_SECRET
# 5. Add to .gitignore:
# echo ".env.local" >> .gitignore
# ============================================================================
# FINDING YOUR ACCESS CONFIGURATION
# ============================================================================
# ACCESS_TEAM_DOMAIN:
# 1. Go to https://one.dash.cloudflare.com/
# 2. Select your account
# 3. Go to Zero Trust > Settings > Custom Pages
# 4. Your team domain is shown at the top (e.g., "your-team.cloudflareaccess.com")
# ACCESS_AUD:
# 1. Go to Zero Trust > Access > Applications
# 2. Click on your application
# 3. Scroll down to "Application Audience"
# 4. Copy the AUD tag (long alphanumeric string)
# ============================================================================
# SECURITY NOTES
# ============================================================================
# ⚠️ NEVER commit .env.local or .env files to git
# ⚠️ NEVER hardcode secrets in your code
# ⚠️ Always use Wrangler secrets for production
# ⚠️ Rotate service tokens regularly (quarterly recommended)
# ⚠️ Use different credentials for dev/staging/production
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |