---
tags:
  - learning
  - concept
related:
  - "[[agent-skills-open-standard]]"
  - "[[../specs/2026-04-21-agent-profile-split/spec-agent-profile-split|spec 0021]]"
  - "[[connectors-only-pivot]]"
  - "[[../specs/2026-04-27-zeno-redefinition/spec-zeno-redefinition]]"
created: 2026-04-21
status: superseded
superseded_by: 0049
---

> **Superseded** by spec [[../specs/2026-04-27-zeno-redefinition/spec-zeno-redefinition|2026-04-27-zeno-redefinition]] (connectors-only positioning). Skills no longer exist as a runtime concept; credentials in Zeno today are owned by connectors (DB-stored, dashboard-managed). If skills return bundled with connectors, the credential boundary becomes the connector's, not the skill's. See [[connectors-only-pivot]].

# Skill-scoped credentials: self-contained auth inside the skill folder

A skill can carry its own credentials (AWS keys, API tokens, private keys) as files inside its directory. The skill's SKILL.md documents how to use them. No global env pollution, no cross-skill leakage.

## Context

Implemented for an example operator skill (e.g. `acme`): AWS read-only credentials, GitHub App private key, and Terraform IaC all live inside `profiles/<example>/skills/acme/`. The skill is entirely self-contained — clone the profile dir to a new machine and everything works.

## How It Works

Example layout:
```
profiles/<name>/skills/<skill-name>/
├── SKILL.md                  # entrypoint — tells the agent how to auth
├── aws.md / github.md        # reference docs (progressive disclosure)
├── .aws/
│   ├── credentials           # generated by Terraform, gitignored
│   └── config                # generated by Terraform, gitignored
├── github-app.pem            # GitHub App private key, gitignored
└── terraform/                # IaC to provision the credentials
    ├── main.tf
    ├── modules/readonly-user/
    └── README.md
```

The skill tells the agent to set env vars per-command:
```bash
export AWS_CONFIG_FILE=/app/profile/skills/<skill-name>/.aws/config
export AWS_SHARED_CREDENTIALS_FILE=/app/profile/skills/<skill-name>/.aws/credentials
aws --profile acme sts get-caller-identity
```

This avoids relying on the container's default `~/.aws/` (which other skills might own).

## How to Apply

When a skill needs credentials:
1. Store them inside the skill's folder (never in `.env` or `~/.aws/` — those are global).
2. Document in SKILL.md exactly how the agent should export/reference them.
3. If credentials need provisioning (IAM users, API keys), put the IaC (Terraform, scripts) inside the skill too.
4. The entire skill folder is gitignored via `profiles/*/` — credentials never touch git.
5. For AWS: use `AWS_CONFIG_FILE` / `AWS_SHARED_CREDENTIALS_FILE` env vars pointed at the skill's files. For GitHub: use `GH_TOKEN=$SKILL_TOKEN` prefix. For other services: similar env-var scoping.
