Mr. TeeClaw

Credential Manager

運維安全v1.3.0
作者:Mr. TeeClaw更新於 2026-05-18共 4 個版本 · 最新版本釋出於 2026-02-07credential-manager@clawhub_callmedas69/credential-manager
安全掃描許可權檢查配置生成#Credential Management

據 AlphaMoat 統計,截至 2026-10,Credential Manager 累計下載 8,116 次、獲 3 個星標,按累計下載量在本次參與排名的 10,914 個 AI 技能中排名第 3,418 位,在「運維安全」分類(502 個)中排名第 98 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
8116
星標
3
全站下載量排名
#3,418
全站前 32% · 「運維安全」前 20%
平台累計下載星標評論
ClawHub ↗68282-
SkillHub ↗81163—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

說明掃描、備份、移轉到受限.env及權限檢查的流程。工具會廣泛讀取敏感檔案,清理還可能刪除原檔;應互動審閱掃描結果、保護備份、核驗應用程式移轉後可用,再明確確認刪除。檔案權限本身不代表安全保證。

資料釋出於 2026-10-27

可以用來做什麼

  • 授權憑證移轉審閱

什麼時候用

  • 需要授權憑證移轉審閱時。

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

先展示憑證掃描與移轉方案,再決定是否修改檔案。

月度資料趨勢

累計下載8116
3780610984372026-03 · 累計下載 41012026-05 · 累計下載 54472026-06 · 累計下載 58202026-07 · 累計下載 62532026-08 · 累計下載 64632026-09 · 累計下載 69542026-10 · 累計下載 811626-0326-0926-10
星標3
2332026-03 · 星標 22026-05 · 星標 32026-06 · 星標 32026-07 · 星標 32026-08 · 星標 32026-09 · 星標 32026-10 · 星標 326-0326-0926-10

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。 該技能有同名的其他版本,調整前的資料歸屬當前下載量最大的這一個。

月份累計下載環比星標
2026-108116—3
2026-096954—3
2026-086463+3.4%3
2026-076253+7.4%3
2026-065820+6.8%3
2026-055447—3
2026-034101—2

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

8.2 KB · ClawHub v1.3.0
---
name: credential-manager
description: MANDATORY security foundation for OpenClaw. Consolidate scattered API keys and credentials into a secure .env file with proper permissions. Use when setting up OpenClaw, migrating credentials, auditing security, or enforcing the .env standard. This is not optional — centralized credential management is a core requirement for secure OpenClaw deployments. Scans for credential files across common locations, backs up existing files, creates a unified .env with mode 600, validates security, and enforces best practices.
---

# Credential Manager

**STATUS: MANDATORY SECURITY FOUNDATION**

Consolidate scattered API keys and credentials into a secure, centralized `.env` file.
展開全部(共 356 行)

## ⚠️ This Is Not Optional

Centralized `.env` credential management is a **core requirement** for OpenClaw security. If your credentials are scattered across multiple files, **stop and consolidate them now**.

**THE RULE:** All credentials MUST be in `~/.openclaw/.env` ONLY. No workspace, no skills, no scripts directories.

See:
- [CORE-PRINCIPLE.md](CORE-PRINCIPLE.md) - Why this is non-negotiable
- [CONSOLIDATION-RULE.md](CONSOLIDATION-RULE.md) - The single source principle

## The Foundation

**Every OpenClaw deployment MUST have:**
```
~/.openclaw/.env (mode 600)
```

This is your single source of truth for all credentials. No exceptions.

**Why?**
- Single location = easier to secure
- File mode 600 = only you can read
- Git-ignored = won't accidentally commit
- Validated format = catches errors
- Audit trail = know what changed

Scattered credentials = scattered attack surface. This skill fixes that.

## What This Skill Does

1. **Scans** for credentials in common locations
2. **Backs up** existing credential files (timestamped)
3. **Consolidates** into `~/.openclaw/.env`
4. **Secures** with proper permissions (600)
5. **Validates** security and format
6. **Enforces** best practices
7. **Cleans up** old files after migration

## Detection Parameters

The skill automatically detects credentials by scanning for:

**File Patterns:**
- `credentials.json` files in config directories
- `.env` files
- Memory files with `-creds` or `credentials` in the name

**Sensitive Key Patterns:**
- API keys, access tokens, bearer tokens
- Secrets, passwords, passphrases
- OAuth consumer keys
- Private keys, signing keys, wallet keys
- Mnemonics and seed phrases

**Security Checks:**
- File permissions (must be `600`)
- Git-ignore protection
- Format validation

## Quick Start

### Full Migration (Recommended)

```bash
# Scan for credentials
./scripts/scan.py

# Review and consolidate
./scripts/consolidate.py

# Validate security
./scripts/validate.py
```

### Individual Operations

```bash
# Scan only
./scripts/scan.py

# Consolidate specific service
./scripts/consolidate.py --service x

# Backup without removing
./scripts/consolidate.py --backup-only

# Clean up old files
./scripts/cleanup.py --confirm
```

## Common Credential Locations

The skill scans these locations:

```
~/.config/*/credentials.json
~/.openclaw/workspace/memory/*-creds.json
~/.openclaw/workspace/memory/*credentials*.json
~/.env (if exists, merges)
```

## Security Features

✅ **File permissions:** Sets `.env` to mode 600 (owner only)
✅ **Git protection:** Creates/updates `.gitignore`
✅ **Backups:** Timestamped backups before changes
✅ **Validation:** Checks format, permissions, and duplicates
✅ **Template:** Creates `.env.example` (safe to share)

## Output Structure

After migration:

```
~/.openclaw/
├── .env                     # All credentials (secure)
├── .env.example             # Template (safe)
├── .gitignore               # Protects .env
├── CREDENTIALS.md           # Documentation
└── backups/
    └── credentials-old-YYYYMMDD/  # Backup of old files
```

## Supported Services

Common services auto-detected:

- **X (Twitter):** OAuth 1.0a credentials
- **Molten:** Agent intent matching
- **Moltbook:** Agent social network
- **Botchan/4claw:** Net Protocol
- **OpenAI, Anthropic, Google:** AI providers
- **GitHub, GitLab:** Code hosting
- **Generic:** `API_KEY`, `*_TOKEN`, `*_SECRET` patterns

See [references/supported-services.md](references/supported-services.md) for full list.

## Security Best Practices

See [references/security.md](references/security.md) for detailed security guidelines.

**Quick checklist:**
- ✅ `.env` has 600 permissions
- ✅ `.env` is git-ignored
- ✅ No credentials in code or logs
- ✅ Rotate keys periodically
- ✅ Use separate keys per environment

## Scripts

All scripts support `--help` for detailed usage.

### scan.py
```bash
# Scan and report
./scripts/scan.py

# Include custom paths
./scripts/scan.py --paths ~/.myapp/config ~/.local/share/creds

# JSON output
./scripts/scan.py --format json
```

### consolidate.py
```bash
# Interactive mode (prompts before changes)
./scripts/consolidate.py

# Auto-confirm (no prompts)
./scripts/consolidate.py --yes

# Backup only
./scripts/consolidate.py --backup-only

# Specific service
./scripts/consolidate.py --service molten
```

### validate.py
```bash
# Full validation
./scripts/validate.py

# Check permissions only
./scripts/validate.py --check permissions

# Fix issues automatically
./scripts/validate.py --fix
```

### cleanup.py
```bash
# Dry run (shows what would be deleted)
./scripts/cleanup.py

# Actually delete old files
./scripts/cleanup.py --confirm

# Keep backups
./scripts/cleanup.py --confirm --keep-backups
```

## Migration Workflow

**Step 1: Discovery**
```bash
./scripts/scan.py
```
Review output to see what will be migrated.

**Step 2: Backup & Consolidate**
```bash
./scripts/consolidate.py
```
Creates backups, builds `.env`, sets permissions.

**Step 3: Validation**
```bash
./scripts/validate.py
```
Ensures everything is secure and correct.

**Step 4: Test**
Test your applications/skills with the new `.env` file.

**Step 5: Cleanup**
```bash
./scripts/cleanup.py --confirm
```
Removes old credential files (backups remain).

## For Skill Developers: Enforce This Standard

Other OpenClaw skills MUST validate credentials are secure before using them:

### Python Skills
```python
#!/usr/bin/env python3
import sys
from pathlib import Path

# Add credential-manager scripts to path
sys.path.insert(0, str(Path.home() / '.openclaw/skills/credential-manager/scripts'))

# Enforce secure .env (exits if not compliant)
from enforce import require_secure_env, get_credential

require_secure_env()

# Now safe to load credentials
api_key = get_credential('SERVICE_API_KEY')
```

### Bash Skills
```bash
#!/usr/bin/env bash
set -euo pipefail

# Validate .env exists and is secure
if ! python3 ~/.openclaw/skills/credential-manager/scripts/enforce.py; then
    exit 1
fi

# Now safe to load
source ~/.openclaw/.env
```

**This creates a fail-fast system:** If credentials aren't properly secured, skills refuse to run. Users are forced to fix it.

## Loading Credentials

After migration, load from `.env`:

### Python
```python
import os
from pathlib import Path

# Load .env
env_file = Path.home() / '.openclaw' / '.env'
with open(env_file) as f:
    for line in f:
        if '=' in line and not line.strip().startswith('#'):
            key, val = line.strip().split('=', 1)
            os.environ[key] = val

# Use credentials
api_key = os.getenv('SERVICE_API_KEY')
```

### Bash
```bash
# Load .env
set -a
source ~/.openclaw/.env
set +a

# Use credentials
echo "$SERVICE_API_KEY"
```

### Using Existing Loaders
If you migrated using OpenClaw scripts:
```python
from load_credentials import get_credentials
creds = get_credentials('x')
```

## Adding New Credentials

Edit `~/.openclaw/.env`:
```bash
# Add new service
NEW_SERVICE_API_KEY=your_key_here
NEW_SERVICE_SECRET=your_secret_here
```

Update template too:
```bash
# Edit .env.example
NEW_SERVICE_API_KEY=your_key_here
NEW_SERVICE_SECRET=your_secret_here
```

## Rollback

If something goes wrong:

```bash
# Find your backup
ls -la ~/.openclaw/backups/

# Restore specific file
cp ~/.openclaw/backups/credentials-old-YYYYMMDD/x-credentials.json.bak \
   ~/.config/x/credentials.json
```

## Notes

- **Non-destructive by default:** Original files backed up before removal
- **Idempotent:** Safe to run multiple times
- **Extensible:** Add custom credential patterns in scripts
- **Secure:** Never logs full credentials, only metadata

「運維安全」分類下的熱門技能

鍾馗.skill運維安全

鍾馗.Skill——會更新漏洞庫的安全審查專家。直來直去、快刀斬亂麻,三層審查(靜態審計/行為模擬/供應鏈溯源)覆蓋12類風險,輸出結構化安全裁定(✅乾淨/⚠️可疑/🚫惡意)。Use when 使用者說"審查這個Skill"、"安全檢查"、"鍾馗看下"、"審一下"、"查一下這個skill"、安裝Skill前的安全評估、或需要審計SKILL.md的惡意載荷。

↓ 33.7萬★ 17user_741dc82b
SkillScan運維安全

在使用技能包之前做安全掃描,並按結論決定放行或攔截的技能。

↓ 18.3萬★ 41tokauthai
Free Ride - Unlimited free AI運維安全

為 OpenClaw 配置 OpenRouter 免費模型與回退鏈的工具。

↓ 13.4萬★ 492Shaishav Pidadi
a ca s ca s c ca s c運維安全

Parse, search, and analyze application logs across formats. Use when debugging from log files, setting up structured logging, analyzing error patterns, correlating events across services, parsing stack traces, or monitoring log output in real time.

↓ 12.5萬★ -user_60e896a0
Skill Scanner運維安全

用於安裝技能、包或外掛的安全檢查。請在執行任何 npm install、openclaw plugins install、clawhub install 或類似安裝命令之前使用。

↓ 9.3萬★ 4sudhindrat
網安技能運維安全

網路安全與SRC漏洞掘金實戰技能。融合「系統學習路徑」與「SRC實戰掘金」雙模式: ①學習模式=法律→基礎→工具→靶場→攻防→就業全流程; ②實戰模式=直接指導在騰訊TSRC、阿里ASRC、百度BSRC等平台挖掘高價值漏洞變現。 當用戶提出以下問題時觸發: "我想學網路安全怎麼入門""SRC漏洞怎麼挖能賺錢""滲透測試需要學什麼" "Web安全漏洞原理是什麼""怎麼準備CTF比賽""護網面試會問什麼" "雲安全怎麼學""挖漏洞賺錢的方法""埠掃描指令碼怎麼寫" "SQL隱碼攻擊怎麼檢測""子域名怎麼列舉""XSS漏洞怎麼找" "靶場怎麼搭建""Kali Linux怎麼用""Metasploit怎麼入門" "等保測評是什麼""程式碼審計怎麼做""內網滲透怎麼學" "資訊洩露漏洞怎麼挖""越權漏洞怎麼測試""邏輯漏洞挖掘技巧" "簡歷怎麼寫才能進安全公司""安全行業面試題有哪些" "Burp Suite怎麼用""DVWA怎麼安裝""Pikachu靶場搭建" "Vulhub漏洞復現""網路安全法有什麼規定""CTF奪旗賽怎麼參加" "AWD比賽是什麼""應急響應怎麼做""攻擊溯源怎麼搞" "資料安全怎麼保障""公有云安全怎麼防護""私有云攻防怎麼做" "雲原生安全是什麼"。

↓ 8萬★ 16user_d2cc4baf
人人都能成為駭客v2.0(Lvan)運維安全

這個技能特別簡單——你只需要呼叫它,給一個網站域名,它就會自動幫你跑一遍滲透測試,找出這個網站存在哪些安全漏洞。 不需要你配環境、不用你手動發包,一切自動化。測完直接出結果,告訴你哪裡有問題、怎麼修。 它的願景是:讓每個人都能成為白帽駭客——只要輸入一個域名,就能知道自己的網站安不安全。一切只為授權測試,只為發現漏洞、修復風險,讓網際網路更安全。

↓ 5.7萬★ 37user_a730098d
skill-vetter運維安全

Security-first skill vetting for AI agents. Use before installing any skill from ClawdHub, GitHub, or other sources. Checks for red flags, permission scope, and suspicious patterns.

↓ 5.4萬★ -user_814dbe54

Mr. TeeClaw 的其他技能

資料月份:2026-10 · 下載/星標數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。