terrylica/cc-skills

doppler-secret-validation

Validate and test Doppler secrets.

View source

How to use

  1. Copy the installation command and review the source package before installing it in your own agent environment.
  2. Check the source document for required tools, credentials and supported hosts.
  3. Describe your input and desired deliverable; review the output against the source material.
npx skills add https://github.com/terrylica/cc-skills --skill doppler-secret-validation

Before you start

  • Installation does not include a model subscription, API allowance or permission to access your files.
  • Repository stars and installation counts describe activity, not an independent quality or security test.
Original skill document

Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.

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 testapiauthentication() 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 for comprehensive patterns

Troubleshooting

IssueCauseSolution
Secret not foundWrong project/config specifiedVerify with doppler secrets ls --project X --config
Auth test fails with 401Token expired or invalidRegenerate token, re-add to Doppler
doppler run hangsCLI waiting for inputAdd --no-interactive flag
Token prefix mismatchWrong token type usedCheck expected format (pypi-, ghp-, AKIA, etc.)
Validation script not foundWrong directory contextUse cc-plugin-root devops-tools to find the plugin root, then cd to the skill directory
Secret retrieval emptySecret name typoList secrets: doppler secrets ls --project X
Multiple configs confusionSecrets differ across envsUse explicit --config flag for each command

Post-Execution Reflection

After this skill completes, reflect before closing the task:

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

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

from this repository

More skills

All skills
terrylica
Community

academic-pdf-to-gfm

Convert academic PDF papers to GitHub-renderable GFM markdown with math equations. TRIGGERS - PDF, GitHub markdown, math

1h installs
1
GitHub stars
2
Updated
Nov 5
terrylica
Community

adr-code-traceability

Add ADR references to code for traceability. TRIGGERS - ADR traceability, code reference, document decision in code.

1h installs
1
GitHub stars
2
Updated
Nov 5
terrylica
Community

arxiv-source-first-paper-ingest

Read an arXiv paper faithfully by fetching the authors' own LaTeX source instead of OCR-ing the PDF. Extracts every display equation with its label, environment and enclosing proposition, renders each to MathML, and proves usability by compiling each formula with a real TeX engine. Use when you need a paper's formulas exactly — to replicate a method, implement a loss function or custom objective, verify a quoted number, or check a claim against what the authors actually wrote. TRIGGERS - read th

1h installs
1
GitHub stars
2
Updated
Nov 5
terrylica
Community

azure-provision

Bootstrap Azure automation when interactive az login is blocked by a Conditional Access policy (error 530035, "Device state: Unregistered"). Mints a service principal through the Azure Portal session ONCE — using Microsoft Graph over a captured token, not DOM clicking — then provisions resource groups, Cognitive Services / AI Language / Speech resources and their keys entirely via az/REST, writing key AND endpoint together into the SCS vault. Use when az login fails but the portal works, when mo

1h installs
1
GitHub stars
2
Updated
Nov 5