# 05-env-and-auth

05-env-and-auth sets up environment variables and tests API connectivity in claude-code workspaces. Creates a documented .env.example and builds a test script for Bun.

- prompt · `type=prompt` · Claude Code, ChatGPT · ★ 3444 repo stars
- Author: codeaashu
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codeaashu/claude-code/tree/HEAD/prompts/05-env-and-auth.md
- Updated: 2026-10-14
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/prompts/05-env-and-auth

## What it does

This prompt guides Claude Code through configuring authentication in the `claude-code` repository. The agent inspects `src/` to catalog configuration variables, debug toggles, and custom endpoints. It then writes a structured `.env.example` grouped by purpose.

The task inspects `src/services/api/client.ts` to trace client setup. It documents backend routing between direct API tokens, OAuth sessions, AWS Bedrock, Google Vertex AI, and Azure Foundry. It also generates `scripts/test-auth.ts` and documents how to bypass browser OAuth locally.

Executing the test script requires `bun` installed in your terminal environment.

## Requirements
- Works with: AWS

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/commands/05-env-and-auth.md`

### ChatGPT

**How to use**
- Paste the text at the start of a chat or into project instructions

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/codeaashu/claude-code/tree/HEAD/prompts/05-env-and-auth.md

## When to use it
- audit source files to extract every active environment variable
- build a clean `.env.example` file with configuration comments
- generate `scripts/test-auth.ts` to validate Anthropic credentials
- trace backend selection across Direct API, Bedrock, and Vertex AI
- document stubs to bypass interactive OAuth during development

## Example prompts
- Run the instructions in 05-env-and-auth to audit our environment variables
- Inspect the src/ directory and assemble a fresh .env.example
- Generate scripts/test-auth.ts and verify the Anthropic connection via Bun

## Similar
- [audit-env-variables](https://affpapa.org/en/nevibecode/skills/audit-env-variables.md) — skill · ★ 1357 repo stars
- [env-setup-wizard](https://affpapa.org/en/nevibecode/skills/env-setup-wizard.md) — skill · 308 installs
- [vtex-io-auth-tokens-and-context](https://affpapa.org/en/nevibecode/skills/vtex-io-auth-tokens-and-context.md) — skill · 1200 installs
- [pinme-auth](https://affpapa.org/en/nevibecode/skills/pinme-auth.md) — skill · 519 installs
- [adding-auth](https://affpapa.org/en/nevibecode/skills/adding-auth.md) — skill · 417 installs
- [better-auth-security-best-practices](https://affpapa.org/en/nevibecode/skills/better-auth-security-best-practices.md) — skill · 52200 installs

From the same set: [codeaashu/claude-code](https://affpapa.org/en/nevibecode/by/codeaashu/claude-code.md) — 17 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
