agentleFS
selamy-labsselamy-labs/agent-skills/skills/credential-proxy/SKILL.md

credential-proxy

Skill0 starsChanged 4 days agoMITView on GitHub

Use when a workload (agent, sandbox, container, CI job) must call an authenticated upstream (LLM/provider/cloud API) but should not hold the credential itself. Keep the secret in a proxy that injects it, so a compromised workload cannot exfiltrate the key.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Keep upstream credentials OUT of the workload.

    line 8
  2. Distinctive:

    Secret source: read the key from a secret store / systemd credentials / a k8s secret mounted ONLY to the proxy — never an env var in the …

    line 39
  3. Distinctive:

    Inject on ingress, strip on egress: add the upstream auth header.

    line 41
  4. Distinctive:

    Hygiene: never log the secret; TLS on both hops.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Credential Proxy

Keep upstream credentials OUT of the workload. Put a small reverse proxy between the workload and the upstream API; the proxy holds the secret and injects it. The workload authenticates to the proxy (cheap, internal) and never sees the upstream key.

When to use

  • An agent / sandbox / container / CI job needs an LLM or provider API key.
  • The credential is high-value: painful to rotate, billing-attached, or broadly scoped.
  • You want one place to rotate, audit, rate-limit, or kill-switch upstream access.

The shape

workload  ──▶  proxy (holds the secret)  ──▶  upstream API
   no key      injects Authorization          Anthropic / OpenAI / cloud
  • The workload calls proxy/<provider>/... with no upstream key.
  • The proxy injects the Authorization / API-key header from a secret store.
  • The proxy streams the response back and strips anything sensitive.

Why it is worth it

  • Blast radius: a compromised workload cannot exfiltrate the key — it never had it.
  • Central rotation: rotate in one place; workloads are unaffected.
  • Control point: the proxy is the natural choke point for logging, rate limits, quotas, and a kill switch.

Build requirements

  • Secret source: read the key from a secret store / systemd credentials / a k8s secret mounted ONLY to the proxy — never an env var in the workload.
  • Inject on ingress, strip on egress: add the upstream auth header; drop any client-supplied auth; never reflect the key back.
  • Authenticate the workload→proxy hop: per-client token or mTLS. A proxy any workload on the network can use with no auth is just credential laundering — that is the failure mode to avoid.
  • Limits: cap request and response body size; enforce per-client rate limits/quotas.
  • Streaming: flush SSE/chunked responses promptly; do not buffer the whole stream.
  • Hygiene: never log the secret; TLS on both hops.

Verify (real artifact)

  • The workload has NO upstream key in its env or mounted secrets (inspect it — absent).
  • A real request through the proxy still authenticates upstream and returns a response.
  • Rotating/killing the secret at the proxy immediately affects all workloads (one place).
  • The proxy rejects an unauthenticated client.

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.