Skip to main content
ClaudeWave
Skill7.9k repo starsupdated 4d ago

secret

Install in Claude Code
Copy
git clone --depth 1 https://github.com/YaoApp/yao /tmp/secret && cp -r /tmp/secret/tools/secret ~/.claude/skills/secret
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Secret Management

Agents can read user-configured secrets at runtime using the `tai tool` CLI.
Secrets are encrypted at rest (AES-256-GCM) and decrypted only when read.

## Available Tools

| Tool | Description |
|------|-------------|
| `secret_list` | List secret names and descriptions (no values) |
| `secret_read` | Read a single secret value by name |

## Usage

### Bash

```bash
# List available secrets
tai tool secret_list

# Read a secret
TOKEN=$(tai tool secret_read '{"name": "GITHUB_TOKEN"}' | jq -r '.value')
git clone "https://${TOKEN}@github.com/org/repo.git"
```

### Node.js

```javascript
const { execSync } = require("child_process");

function readSecret(name) {
  const raw = execSync(
    `tai tool secret_read '${JSON.stringify({ name })}'`,
    { encoding: "utf-8" }
  );
  return JSON.parse(raw).value;
}

const token = readSecret("GITHUB_TOKEN");
```

### Python

```python
import json
import subprocess

def read_secret(name: str) -> str:
    result = subprocess.run(
        ["tai", "tool", "secret_read", json.dumps({"name": name})],
        capture_output=True, text=True, check=True,
    )
    return json.loads(result.stdout)["value"]

token = read_secret("GITHUB_TOKEN")
```

### PowerShell

```powershell
function Read-Secret {
    param([string]$Name)
    $json = @{ name = $Name } | ConvertTo-Json -Compress
    $result = tai tool secret_read $json | ConvertFrom-Json
    return $result.value
}

$token = Read-Secret -Name "GITHUB_TOKEN"
```

## Security Rules

1. **Never print or log secret values** — Do not write secrets to stdout, stderr, or any log file.
2. **Never write secrets to files** — Exception: SSH keys may be written to `~/.ssh/` with `chmod 600` permissions.
3. **Never send secrets to the LLM** — Secret values must not appear in prompt content, system messages, or tool call results that are forwarded to the model.
4. **Scope isolation** — Secrets are scoped per user per agent. An agent can only access secrets configured for it.
5. **Audit trail** — Every `secret_read` call is logged in the audit trail with the caller's identity.
yao-agentSkill

Agent management expert. ALWAYS invoke this skill when you need to list available agents, download or reference agent source code, deploy agent code to the host, or query the LLM connector matrix. Do not guess agent structures — use this skill first.

yao-audioSkill

Audio expert. ALWAYS invoke this skill when the user asks to transcribe, recognize, or convert speech/audio to text.

yao-boardSkill

Kanban board and task query expert. ALWAYS invoke this skill when the user asks about boards, tasks, task status, or project progress. Do not guess task state — use this skill first.

yao-docSkill

Yao process documentation expert. ALWAYS invoke this skill when the user needs to discover available processes, read process signatures, or validate process names. Do not guess process APIs — use this skill first.

yao-imageSkill

Image expert. ALWAYS invoke this skill when you need to read, analyze, describe, or generate images. Use for screenshots, photos, charts, diagrams, AI-generated images, or any visual content.

yao-processSkill

Yao process execution expert. ALWAYS invoke this skill when the user needs to call a Yao process, query data models, run scripts, or check process permissions. Do not call processes without checking this skill first.

yao-secretSkill

Secret management expert. ALWAYS invoke this skill when you need to read API keys, tokens, or other secrets configured by the user. Never hardcode credentials — use this skill to retrieve them securely.

yao-webSkill

Web information retrieval expert. ALWAYS invoke this skill when the user needs to search the web, fetch a URL, or access real-time information beyond training data. Do not guess or use stale knowledge — use this skill first.