# cloudflare-tunnel

A skill that hands the agent working curl recipes for services protected by Cloudflare Access, using a service token and its two headers.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 909 installs · ★ 81
- Author: okou-ai
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/okou-ai/okou-skills/tree/HEAD/cloudflare-tunnel/SKILL.md
- Updated: 2026-10-20
- HTML: https://affpapa.org/en/nevibecode/skills/cloudflare-tunnel

## What it does

Use it when an endpoint sits behind a Cloudflare Access policy and you need to call it from the shell. The skill gives the agent the header pair to attach: `CF-Access-Client-Id` and `CF-Access-Client-Secret`, with the client ID ending in `.access`.

Recipes cover GET, a POST that reads its JSON body from `/tmp/request.json`, saving a response to `/tmp/output.file`, basic auth via `-u`, and stacking a service `Authorization: Bearer` on top. A troubleshooting table maps 403 to bad headers or a token missing from the Access policy, 401 to the service's own credentials, and a refused connection to `cloudflared` not running.

You need a service token from Zero Trust and `cloudflared` on the host. The `-k` flag switches off certificate checks for self-signed setups; leave it on and a man in the middle goes unnoticed, so fix the cert instead when it matters.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add okou-ai/okou-skills --skill cloudflare-tunnel -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/cloudflare-tunnel/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/cloudflare-tunnel/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add okou-ai/okou-skills --skill cloudflare-tunnel -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/cloudflare-tunnel/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add okou-ai/okou-skills --skill cloudflare-tunnel -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/cloudflare-tunnel/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install okou-ai/okou-skills cloudflare-tunnel
```

2. **Manually: put the files in place**
- File: `.github/skills/cloudflare-tunnel/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add okou-ai/okou-skills --skill cloudflare-tunnel -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/okou-ai/okou-skills --path cloudflare-tunnel
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/cloudflare-tunnel/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add okou-ai/okou-skills --skill cloudflare-tunnel -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/okou-ai/okou-skills/tree/HEAD/cloudflare-tunnel/SKILL.md

## When to use it
- call an Access-protected API from `curl`
- send a POST with a JSON body to a gated service
- download a file from a host behind an Access policy
- pair a Cloudflare service token with a Bearer token
- diagnose a 403 or 401 response

## Example prompts
- Fetch `https://your-protected-service.example.com/api/endpoint` through Cloudflare Access and show me the response
- POST the body in `/tmp/request.json` to the protected endpoint
- I keep getting 403 from the service behind Cloudflare — work out why

## Similar
- [wizard](https://affpapa.org/en/nevibecode/skills/wizard.md) — skill · 553369 installs
- [hyperframes-cli](https://affpapa.org/en/nevibecode/skills/heygen-com-hyperframes-cli.md) — skill · 1300000 installs
- [setup-pre-commit](https://affpapa.org/en/nevibecode/skills/setup-pre-commit.md) — skill · 489289 installs
- [using-git-worktrees](https://affpapa.org/en/nevibecode/skills/using-git-worktrees.md) — skill · 217153 installs
- [finishing-a-development-branch](https://affpapa.org/en/nevibecode/skills/finishing-a-development-branch.md) — skill · 214439 installs
- [orca-cli](https://affpapa.org/en/nevibecode/skills/orca-cli.md) — skill · 353600 installs

From the same set: [okou-ai/okou-skills](https://affpapa.org/en/nevibecode/by/okou-ai/okou-skills.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
