Add API vault files

This commit is contained in:
nano
2026-05-28 23:00:53 +08:00
parent 437e0bf927
commit 80b0061f81
2 changed files with 176 additions and 0 deletions

67
SKILL.md Normal file
View File

@@ -0,0 +1,67 @@
---
name: api-vault
description: Look up API keys, tokens, and service credentials from the Notion APIs database via Maton CLI before asking the user. Also check existing Maton connections.
---
# API Vault
## When to Use
Any time you need an API key, service token, OAuth credential, or connection secret — whether for installing a skill, configuring a service, calling an API, or setting up an integration.
## Lookup Priority
Always follow this order. Do not skip steps.
### 1. Notion APIs Database (source of truth)
Tony stores every API key in his **Notion "APIs" database** titled `APIs` (Database ID: `c7c74f00-3e35-4040-af9a-5caac7f2ca95`).
Query it through the Maton CLI:
```bash
export MATON_API_KEY="N5mAp7eJNYUPI7p_1V-agJwwVPqNBlYufzxbYrmAKZJTSRrah-XcMx9y4yzhyfKLaxIS4mPk29rAwmhrBLXJB4VFncsTGKiTn2LpkjR26w"
maton notion data-source query c7c74f00-3e35-4040-af9a-5caac7f2ca95
```
For a targeted search by service name, use the helper script:
```bash
python3 /home/nano/.nanobot/workspace/skills/api-vault/lookup.py "<service-name>"
```
Or directly via Maton:
```bash
maton notion search "<service-name>"
```
The database has columns:
- **Service** (title) — the service/provider name
- **API** (rich_text) — the actual key/token
- **notes** (rich_text) — context about the key
### 2. Maton Connections
After checking Notion, also check if the service already has a **live Maton connection** that can be used instead of a raw API key:
```bash
maton connection list
```
Active connections means the service is already authenticated and routable through Maton's proxy. This is often cleaner than using a raw API key.
### 3. Ask the User
Only ask Tony for a key if **both** Notion and Maton don't have it. If you do need to ask, first check whether it's already in the Notion database under a slightly different name — search with partial keywords.
## Helper Script
The `lookup.py` script provides a quick way to search the database. Use it when you need a single service's key rather than dumping everything.
## Key Facts
- Maton API key is set in `~/.bashrc` as `MATON_API_KEY`
- Maton CLI is installed globally at `/usr/local/bin/maton`
- Notion connection through Maton is OAuth2-authenticated and active
- The APIs database is Tony's canonical key store — trust it