Skip to main content
skill CX Codex

doppler-secret-validation — Claude Code skill: secret checks

The doppler-secret-validation skill helps store secrets in Doppler, verify retrieval, and test API authentication. Use it to check a token before relying on it in a project.

MIT 135 installs ★ 3 updated 2026-10-25

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add terrylica/cc-skills --skill doppler-secret-validation -a claude-code
Open on GitHub

What doppler-secret-validation does

The skill checks a token’s format before storage, adds it to a Doppler project and config, then verifies that it can be retrieved and passed through doppler run. The scripts/validate_secret.py script checks storage and environment injection. For an API authentication check, it provides scripts/test_api_auth.py, which can be adapted to the API in use.

Add a secret with doppler secrets set SECRET_NAME="value" --project PROJECT --config CONFIG. For local development, doppler setup can bind a directory to a project and config so later doppler run commands can omit those options. The skill recommends keeping secrets scoped to a single command and masking them rather than printing their full values.

You need the Doppler CLI and access to the target project. The CLI does not accept --note, so add secret notes through the Doppler dashboard. GitHub tokens are an exception: the skill says not to inject GH_TOKEN or GITHUB_TOKEN from Doppler into a directory.

What it helps with

  • check a token’s format before storing it
  • add a secret to a Doppler project and config
  • verify secret retrieval and injection through doppler run
  • test API authentication with a stored token
  • compare a secret across dev, stg, and prd configs

Example prompts for the agent

  • Check this token’s format, then add it to Doppler under project private-config and config prd.
  • Verify that PYPI_TOKEN can be retrieved from Doppler and passed through doppler run.
  • Test API authentication using PYPI_TOKEN and https://upload.pypi.org/legacy/.

How to install doppler-secret-validation

1Skills CLI (Vercel)

npx skills add terrylica/cc-skills --skill doppler-secret-validation -a claude-code

2Manually: put the files in place

~/.claude/skills/doppler-secret-validation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/doppler-secret-validation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about doppler-secret-validation

How do I install doppler-secret-validation in Claude Code?

Run npx skills add terrylica/cc-skills --skill doppler-secret-validation -a claude-code. The skill file is at ~/.claude/skills/doppler-secret-validation/SKILL.md.

What does doppler-secret-validation do?

It guides you through storing a secret in Doppler, checking that it can be retrieved, and testing API authentication with it.

What do I need to validate a Doppler secret?

You need the Doppler CLI and access to the relevant project and config. API checks use scripts/test_api_auth.py, which you adapt to the API being tested.

Source text

SKILL.md · MIT
---
name: doppler-secret-validation
description: Validate and test Doppler secrets. TRIGGERS - add to Doppler, store secret, validate token, test credentials.
allowed-tools: Read, Bash
---

# Doppler Secret Validation

> **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

## Overview

Workflow for securely adding, validating, and testing API tokens and credentials in Doppler secrets management.

## When to Use This Skill

Use this skill when:

- User provides API tokens or credentials (PyPI, GitHub, AWS, etc.)
- User mentions "add to Doppler", "store secret", "validate token"
- User wants to test authentication before production use
- User needs to verify secret storage and retrieval

## Workflow

### Step 1: Test Token Format (Before Adding to Doppler)

Before storing in Doppler, validate token format:

```bash
# Check token format, length, prefix
python3 -c "token = 'TOKEN_VALUE'; print(f'Prefix: {token[:20]}...'); print(f'Length: {len(token)}')"
```

**Common token formats**:

- PyPI: `pypi-...` (179 chars)
- GitHub: `ghp_...` (40+ chars)
- AWS: 20-char access key + 40-char secret

### Step 2: Add Secret to Doppler

```bash
doppler secrets set SECRET_NAME="value" --project PROJECT --config CONFIG
```

**Example**:

```bash
doppler secrets set PYPI_TOKEN="pypi-AgEI..." \
  --project private-config --config prd
```

**Important**: CLI doesn't support `--note`. Add notes via dashboard:

1. <https://dashboard.doppler.com>
2. Navigate: PROJECT → CONFIG → SECRET_NAME
3. Edit → Add descriptive note

### Step 3: Validate Storage

Use the bundled validation script:

```bash
/usr/bin/env bash << 'VALIDATE_EOF'
ROOT="$(cc-plugin-root devops-tools)"
cd "$ROOT/skills/doppler-secret-validation"
uv run scripts/validate_secret.py \
  --project PROJECT \
  --config CONFIG \
  --secret SECRET_NAME
VALIDATE_EOF
```

This validates:

1. Secret exists in Doppler
2. Secret retrieval works
3. Environment injection works via `doppler run`

**Example**:

```bash
uv run scripts/validate_secret.py \
  --project private-config \
  --config prd \
  --secret PYPI_TOKEN
```

### Step 4: Test API Authentication

Use the bundled auth test script (adapt test_api_authentication() for specific API):

```bash
/usr/bin/env bash << 'CONFIG_EOF'
ROOT="$(cc-plugin-root devops-tools)"
doppler run --project PROJECT --config CONFIG -- \
  "$ROOT/skills/doppler-secret-validation/scripts/test_api_auth.py" \
    --secret SECRET_NAME \
    --api-url API_ENDPOINT
CONFIG_EOF
```

**Example (PyPI)**:

```bash
doppler run --project private-config --config prd -- \
  uv run scripts/test_api_auth.py \
    --secret PYPI_TOKEN \
    --api-url https://upload.pypi.org/legacy/
```

### Step 5: Document Usage

After validation, document the usage pattern for the user:

```bash
/usr/bin/env bash << 'CONFIG_EOF_2'
# Pattern 1: Doppler run (recommended for CI/scripts)
doppler run --project PROJECT --config CONFIG -- COMMAND

# Pattern 2: Manual export (for troubleshooting)
export SECRET_NAME=$(doppler secrets get SECRET_NAME \
  --project PROJECT --config CONFIG --plain)
CONFIG_EOF_2
```

### Step 5b: Directory-Scoped Doppler Config (Local Development)

For per-directory credentials, bind the directory to a Doppler project/config once with `doppler setup`; every later `doppler run` in that directory picks it up without `--project`/`--config`:

```bash
cd ~/project && doppler setup --project myproject --config prd --no-interactive
doppler run -- COMMAND
```

**GitHub tokens are the exception**: do not inject `GH_TOKEN`/`GITHUB_TOKEN` from Doppler into a directory (ADR 2026-06-21). GitHub multi-account auth is driven by the repo's `origin` host-alias, and a token resolves fresh per-repo via `~/.claude/tools/bin/gh-token-for-repo`.

## Common Patterns

### Multiple Configs (dev, stg, prd)

Add secret to multiple environments:

```bash
# Production
doppler secrets set TOKEN="prod-value" --project foo --config prd

# Development
doppler secrets set TOKEN="dev-value" --project foo --config dev
```

### Verify Secret Across Configs

```bash
/usr/bin/env bash << 'CONFIG_EOF_3'
for config in dev stg prd; do
  echo "=== $config ==="
  doppler secrets get TOKEN --project foo --config $config --plain | head -c 20
  echo "..."
done
CONFIG_EOF_3
```

## Security Guidelines

1. **Never log full secrets**: Use `${SECRET:0:20}...` masking
2. **Prefer doppler run**: Scopes secrets to single command
3. **Use --plain only for piping**: Human-readable view masks secrets
4. **Separate configs per environment**: dev/stg/prd isolation

## Bundled Resources

- **scripts/validate_secret.py** - Complete validation suite (existence, retrieval, injection)
- **scripts/test_api_auth.py** - Template for API authentication testing
- **references/doppler-patterns.md** - Common CLI patterns and examples

## Reference

- Doppler docs: <https://docs.doppler.com/docs>
- CLI install: `brew install dopplerhq/cli/doppler`
- See [doppler-patterns.md](./references/doppler-patterns.md) for comprehensive patterns

---

## Troubleshooting

| Issue                       | Cause                          | Solution                                                                                    |
| --------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------- |
| Secret not found            | Wrong project/config specified | Verify with `doppler secrets ls --project X --config`                                       |
| Auth test fails with 401    | Token expired or invalid       | Regenerate token, re-add to Doppler                                                         |
| doppler run hangs           | CLI waiting for input          | Add `--no-interactive` flag                                                                 |
| Token prefix mismatch       | Wrong token type used          | Check expected format (pypi-, ghp-, AKIA, etc.)                                             |
| Validation script not found | Wrong directory context        | Use `cc-plugin-root devops-tools` to find the plugin root, then `cd` to the skill directory |
| Secret retrieval empty      | Secret name typo               | List secrets: `doppler secrets ls --project X`                                              |
| Multiple configs confusion  | Secrets differ across envs     | Use explicit --config flag for each command                                                 |

## Post-Execution Reflection

After this skill completes, reflect before closing the task:

0. **Locate yourself.** — Find this SKILL.md's canonical path before editing.
1. **What failed?** — Fix the instruction that caused it.
2. **What worked better than expected?** — Promote to recommended practice.
3. **What drifted?** — Fix any script, reference, or dependency that no longer matches reality.
4. **Log it.** — Evolution-log entry with trigger, fix, and evidence.

Do NOT defer. The next invocation inherits whatever you leave behind.

© terrylica · MIT · terrylica/cc-skills

Similar skills

All skills for DevOps and infrastructure →

From the same set79

The whole set →
gmail-access The gmail-access skill connects the agent to a Gmail command-line client so it can pull messages, search a mailbox, save what it finds and stage drafts. Handy when the thread you need sits next to the code you are working on. CX Codex +1 137installs skill-architecture skill-architecture guides skill creation and updates, YAML structure checks, and common troubleshooting. Task templates help you choose a workflow before editing files. CX Codex +1 137installs slash-command-factory slash-command-factory generates Claude Code slash command Markdown files with YAML frontmatter through a question workflow or ten presets. CX Codex +1 136installs backtesting-py-oracle backtesting-py-oracle configures backtesting.py to match ClickHouse SQL sweep results on range bars. Fixes trade count mismatches and timing discrepancies in multi-position testing. CX Codex +1 135installs link-validation link-validation runs an offline lychee pass over a project's markdown and reports broken relative links, root-relative paths and anchors. Handy right before you commit docs. CX Codex +1 135installs session-recovery session-recovery troubleshoots missing Claude Code sessions when claude -r reports no conversations found or files save to incorrect paths. CX Codex +1 135installs session-chronicle session-chronicle connects findings, decisions, and code changes to session UUIDs. Use it when you need to trace where work came from or record session provenance. CX Codex +1 135installs notion-sdk notion-sdk — a skill for managing Notion via the official Python SDK. Creates pages and databases, queries information, adds content blocks — all programmatically. CX Codex +1 133installs

Project sponsors

Companies that keep this analytics open