05-env-and-auth — Claude Code prompt: what it does, how to install
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.
no license ★ 3,444 updated 2026-10-14
.claude/commands/05-env-and-auth.mdWhat 05-env-and-auth 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.
What it helps with
- audit source files to extract every active environment variable
- build a clean
.env.examplefile with configuration comments - generate
scripts/test-auth.tsto validate Anthropic credentials - trace backend selection across Direct API, Bedrock, and Vertex AI
- document stubs to bypass interactive OAuth during development
Example prompts for the agent
- 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
How to install 05-env-and-auth
Manually: put the files in place
.claude/commands/05-env-and-auth.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about 05-env-and-auth
How to install 05-env-and-auth in Claude Code?
Place the prompt contents in .claude/commands/05-env-and-auth.md. You can then invoke it directly in your Claude Code workspace.
What does 05-env-and-auth do?
It commands Claude Code to audit repository auth logic, create .env.example, and write a test script that validates your Anthropic credentials.
Which authentication backends does this prompt review?
The instructions check direct API keys, Claude subscription OAuth, AWS Bedrock, Google Vertex AI, and Azure Foundry.