agentleFS
thunderphonethunderphone/skills/setup-api-key/SKILL.md

setup-api-key

Skill0 starsChanged 57 days agoMITView on GitHub

Set up, rotate, verify, or troubleshoot a ThunderPhone API key. Use when someone asks where ThunderPhone keys live, how to configure THUNDERPHONE_API_KEY, how to authenticate a REST request, or why an API request returns 401 or 403.

  • Reads credentials

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use azure-speech-to-text, dashscope and 1 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • GopyrSkill

    azure-speech-to-text

    Also in 3 projects that use this

  • GopyrSkill

    dashscope

    Also in 3 projects that use this

  • StandedSkill

    seedance-2-5

    Seedance2.5 skill for AI video production. Use whenever a user mentions Seedance2.5, Seedance 2.5, AI video, short videos, marketing videos, product demos, talking-head videos, video prompts, storyboards, scene cards, B-roll, video repair, or continuity QA. Turn supplied scripts, briefs, assets, footage notes, or approved storyboards into grounded Seedance-ready plans, prompts, and checks; do not invent product claims, fabricate people, or claim platform controls without checking the active Seedance interface.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Store the value once: Put the sk_live_... value in a secret manager or protected environment variable named THUNDERPHONE_API_KEY.

    line 22
  2. Very specific:

    Send both standard headers: Every request made from this pack identifies its source with X-ThunderPhone-Client: skills/setup-api-key@1.0.

    line 25
  3. Very specific:

    Rotate without downtime: Create the replacement, update and verify every consumer, then delete the old key with DELETE …

    line 64
  4. Distinctive:

    Ask before revoking a key if its consumers are unknown.

    line 66
  5. Distinctive:

    Treat the API response and API-key guide as authoritative.

    line 84
  6. Distinctive:

    Do not fabricate a key, log one, or ask a user to paste one into chat.

    line 86
  7. Distinctive:

    Use placeholders for resource IDs and inspect each write response before the next write.

    line 87

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Set up a ThunderPhone API key

  1. Choose the creation path. In the dashboard, open Organization → Keys. To automate key creation, use POST /v1/developer/api-keys with an authenticated human admin session. Organization API keys cannot manage API keys.
{
  "name": "production"
}
  1. Store the value once. Put the sk_live_... value in a secret manager or protected environment variable named THUNDERPHONE_API_KEY. Never paste it into source, chat, shell history, screenshots, logs, or a committed .env.
  2. Send both standard headers. Every request made from this pack identifies its source with X-ThunderPhone-Client: skills/setup-api-key@1.0. The Python and TypeScript SDKs read THUNDERPHONE_API_KEY and send the authentication header automatically.
  3. Verify the credential with a read-only agents request.
curl --fail-with-body https://api.thunderphone.com/v1/agents \
  -H "Authorization: Bearer $THUNDERPHONE_API_KEY" \
  -H "X-ThunderPhone-Client: skills/setup-api-key@1.0"
import os, requests

r = requests.get(
    "https://api.thunderphone.com/v1/agents",
    headers={
        "Authorization": f"Bearer {os.environ['THUNDERPHONE_API_KEY']}",
        "X-ThunderPhone-Client": "skills/setup-api-key@1.0",
    },
    timeout=30,
)
r.raise_for_status()
print(len(r.json()))
const response = await fetch("https://api.thunderphone.com/v1/agents", {
  headers: {
    Authorization: `Bearer ${process.env.THUNDERPHONE_API_KEY}`,
    "X-ThunderPhone-Client": "skills/setup-api-key@1.0",
  },
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
console.log((await response.json()).length);
  1. Rotate without downtime. Create the replacement, update and verify every consumer, then delete the old key with DELETE /v1/developer/api-keys/{key_id}. Ask before revoking a key if its consumers are unknown.

Verify

The agents request should return 200. Confirm that logs contain the client header but never the bearer value.

Errors

SymptomCauseFix
401Missing, malformed, revoked, or wrong-environment keyRead the value from the intended secret store and retain the Bearer prefix.
403Valid key lacks the required organization role or an account gate appliesUse a human admin session for key management; inspect the response for the named gate.
HTML or DNS errorWrong hostUse https://api.thunderphone.com, not the dashboard host.
Key appears in outputUnsafe debuggingStop, redact the output, rotate the exposed key, and remove it from persisted history.

Source and safety rules

  • Treat the API response and API-key guide as authoritative.
  • Confirm key-management fields in the developer API-key reference.
  • Do not fabricate a key, log one, or ask a user to paste one into chat.
  • Use placeholders for resource IDs and inspect each write response before the next write.

See references/authentication.md for the header contract and a safe rotation checklist.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.