agentleFS
BuilderIOBuilderIO/agent-native/.agents/skills/secrets/SKILL.md

secrets

Skill7.6k starsChanged 5 months agoMITView on GitHub

Connect external services and keep app credentials scoped. Use before adding an API key, OAuth connection, provider setup, or server-side request that needs a user's or workspace's credential.

  • Reads credentials

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check the workspace connection catalog first.

    line 20
  2. Distinctive:

    If the app truly needs its own API key, register it with the shared secrets surface.

    line 25
  3. Distinctive:

    Use deployment configuration only for a secret owned by the deployed app, such as a webhook verification secret.

    line 27
  4. Very specific:

    Use kind: "oauth" for an OAuth-backed connection and set oauthProvider and oauthConnectUrl for the shared Connect flow.

    line 56
  5. Very specific:

    Never read a user's or workspace's API key from process.env, or add a raw environment fallback to a scoped lookup.

    line 72

“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

Secrets

Rule

Credentials belong to the user, organization, workspace, or deployment that owns them. Reuse the strongest shared connection or credential flow available; never copy a value into app code or client-visible state.

Choose the credential source

  1. Check the workspace connection catalog first. If the provider is already connected, request the app grant and resolve its vault-backed credential reference through the workspace-connection API.
  2. For OAuth, use the shared authorization and token flow. Do not store access or refresh tokens as ordinary settings or API-key values.
  3. If the app truly needs its own API key, register it with the shared secrets surface. Do not build a parallel key form or storage table.
  4. Use deployment configuration only for a secret owned by the deployed app, such as a webhook verification secret. LLM inference keys are an app-owned exception: self-hosted apps may use provider keys from deployment env as a shared fallback, while scoped user or organization keys take precedence. Hosted-workspace deployments backed by a shared database must not share those env keys across apps or tenants. This exception does not authorize using env credentials to access user-owned provider data.

Register an app-local API key

Register the key once so Settings can manage it and the app can describe why it is needed. Supported scopes are user, org, and workspace; choose the narrowest scope that matches who owns the credential and how the app resolves it. Put the registration in a server module imported by a loaded server plugin.

import { registerRequiredSecret } from "@agent-native/core/secrets";

registerRequiredSecret({
  key: "EXAMPLE_SERVICE_API_KEY",
  label: "Example service API key",
  description: "Connects this app to the example service.",
  docsUrl: "https://example.com/api-keys",
  scope: "user",
  kind: "api-key",
  required: true,
});

Use kind: "oauth" for an OAuth-backed connection and set oauthProvider and oauthConnectUrl for the shared Connect flow. Set required only when the app cannot perform its primary workflow without that connection. A validator may check a key before save; never log or include the value in a validation error.

Resolve credentials on the server

Resolve credentials only inside server-side actions or server helpers, using the request's user and organization context. Keep a missing key separate from a failed credential-store lookup: ask the user to connect the provider only when the credential is absent; make a store failure retryable.

For an app-local key, use resolveSecretDetailed() from @agent-native/core/server in the request context. Check lookupFailed before checking value; do not turn a failed lookup into a setup prompt.

Never read a user's or workspace's API key from process.env, or add a raw environment fallback to a scoped lookup. Do not put credentials in action arguments or results, agent messages or hidden context, application state, browser storage, client bundles, logs, or error text. Send them only in the provider request that needs them, and redact provider responses before returning an error.

Related skills

  • security — protect access to app data and external requests.
  • actions — expose server-side operations to both the agent and UI.

Download now (ZIP)

Trending

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Aug 30: 0 new projectsWeek of Sep 6: 0 new projectsWeek of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projects
Aug 2026Sep 2026Oct 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about BuilderIO/agent-native

The biggest 5 of 61 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 61

Talked about on GitHub and Bluesky (61 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 11

6 more on Bluesky

Does it work?

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

Reviews can't be read right now.

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.