cloudflare-zero-trust-access

cloudflare-zero-trust-access is a skill for Claude Code from secondsky/claude-skills. It costs 41 tokens per session (2,525 once invoked), scanned A, original, MIT.

A guide to protecting Cloudflare Workers with Cloudflare Access, a service that checks a user's identity before allowing access to an application.

In plain words
What is it for?
Use it to validate JWTs, secure Worker routes and APIs, support service tokens, configure CORS, and add role-based access.
Why use it?
It provides patterns for authentication and access control without requiring you to build all identity handling yourself.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the cloudflare-zero-trust-access plugin — 1 skill shipped together

Good fit Use it to validate JWTs, secure Worker routes and APIs, support service tokens, configure CORS, and add role-based access.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/secondsky/claude-skills/cloudflare-zero-trust-access
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add secondsky/claude-skills --skill cloudflare-zero-trust-access
Clone the repo
git clone --depth 1 https://github.com/secondsky/claude-skills

Made for: Claude Code.

Or install cloudflare-zero-trust-access, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cloudflare-zero-trust-access

README.md
[![agentmods](https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-zero-trust-access.svg)](https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-zero-trust-access)
Your own site
<a href="https://agentmods.dev/skills/secondsky/claude-skills/cloudflare-zero-trust-access"><img src="https://agentmods.dev/badge/skills/secondsky/claude-skills/cloudflare-zero-trust-access.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,525 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.02525
Opus 5 $0.00020 $0.01262
Sonnet 5 $0.00008 $0.00505
Haiku 4.5 $0.00004 $0.00252

Measured 4d ago against content hash ff34ee51c4a6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

cloudflare-zero-trust-access scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/create-service-token.sh, scripts/test-access-jwt.sh, templates/cors-access.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/cloudflare-zero-trust-access/skills/cloudflare-zero-trust-access/SKILL.md · 349 lines

How it starts

The opening of the file, as written. The whole thing — 349 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cloudflare Zero Trust Access Skill

Integrate Cloudflare Zero Trust Access authentication with Cloudflare Workers applications using proven patterns and templates.


Overview

This skill provides complete integration patterns for Cloudflare Access, enabling application-level authentication for Workers without managing your own auth infrastructure.

What is Cloudflare Access? Cloudflare Access is Zero Trust authentication that sits in front of your application, validating users before they reach your Worker. After authentication, Access issues JWT tokens that your Worker validates.

Key Benefits:

  • No auth infrastructure to maintain
  • Integrates with identity providers (Azure AD, Google, Okta, GitHub)
  • Service tokens for machine-to-machine auth
  • Built-in MFA and session management
  • Comprehensive audit logs

When to Use This Skill

Trigger this skill when tasks involve:

  • Authentication: Protecting Worker routes, securing admin dashboards, API authentication
  • Access Control: Role-based access (RBAC), group-based permissions, geographic restrictions
  • Service Auth: Backend services calling Worker APIs, CI/CD pipelines, cron jobs
  • Multi-Tenant: SaaS apps with organization-level authentication
  • CORS + Auth: Single-page applications calling protected APIs

Keywords to Trigger: cloudflare access, zero trust, access authentication, JWT validation, service tokens, cloudflare auth, hono access, workers authentication, protect worker routes, admin authentication


Integration Patterns

📖 New to Cloudflare Access? Load references/quick-start.md for step-by-step setup instructions (15-20 minutes).

Pattern 1: Hono Middleware (Recommended)

Use @hono/cloudflare-access for one-line Access integration.

When to Use:

  • Building with Hono framework
  • Need quick, production-ready setup
  • Want automatic JWT validation and key caching

Template: templates/hono-basic-setup.ts

Setup:

import { Hono } from 'hono'
import { cloudflareAccess } from '@hono/cloudflare-access'

const app = new Hono<{ Bindings: Env }>()

// Public routes
app.get('/', (c) => c.text('Public page'))

// Protected routes
app.use(
  '/admin/*',
  cloudflareAccess({
    domain: (c) => c.env.ACCESS_TEAM_DOMAIN,
  })
)

app.get('/admin/dashboard', (c) => {
  const { email } = c.get('accessPayload')
  return c.text(`Welcome, ${email}!`)
})

Read the full file on GitHub · 349 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 349 lines · 41 tokens per session scan A ff34ee51c4a6

Subscribe to this mod's changes

cloudflare-zero-trust-access is a skill published in the GitHub repository secondsky/claude-skills (215 stars, last pushed today), licensed MIT. It adds 41 tokens to every session and 2,525 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.