加密工具基础版
БесплатноБез исполняемых скриптовНе проверен提供文件加密、密码哈希、算法选择指南与基础合规检查,适合个人开发者保护数据。Use when 需要安全检测、合规审计、质量检查、加密防护时使用。不适用于安全评估未授权目标。适用于独立开发者、企业团队和自动化工作流场景。支持中文交互,无需复杂配置即开即用。输出结果可直接使用,减少二次加工成本。提供结构化输出和错误处理机…
от thcjp901 установка в других каталогахОб этом скилле
功能说明: 本技能涵盖 中文交互、化工作流场景 等核心能力。
加密工具免费版为开发者提供日常数据加密保护能力。工具涵盖文件加密解密、密码哈希存储、加密算法选择指南和基础代码合规检查,帮助开发者在开发阶段正确使用加密技术保护敏感数据。 本版本适合敏感文件加密保护、用户密码安全存储和基础安全代码审查。所有操作通过命令行工具和代码示例完成。
核心能力
1. 加密算法选择指南
根据使用场景推荐合适的加密算法。
| 用途 | 推荐算法 | 应避免 |
|---|---|---|
| 密码存储 | argon2id, bcrypt (cost>=12) | MD5, SHA1, 明文SHA256 |
| 对称加密 | AES-256-GCM, ChaCha20-Poly1305 | AES-ECB, DES, RC4 |
| 非对称加密 | RSA-4096+OAEP, Ed25519, P-256 | RSA-1024, PKCS#1 v1.5 |
| 密钥派生 | PBKDF2 (>=600k), scrypt, argon2 | 单次哈希 |
| JWT签名 | RS256, ES256 | HS256(弱密钥) |
| TLS | 1.2+ | TLS 1.0/1.1, SSLv3 |
| 输出: 返回加密算法选择指南的执行结果,包含操作状态和输出数据。 |
2. 文件加密与解密
使用 age 或 gpg 加密敏感文件。
age -p -o file.age file.txt # 密码加密
age -d -o file.txt file.age # 解密
age-keygen -o key.txt # 生成密钥
age -r <recipient> -o file.age file.txt # 公钥加密
age -d -i key.txt -o file.txt file.age # 密钥解密
gpg -c --cipher-algo AES256 file.txt # 对称加密
gpg -d file.txt.gpg > file.txt # 解密
for f in *.secret; do
age -p -o "${f}.age" "$f"
shred -u "$f" # 安全删除原文件
done
输出: 返回文件加密与解密的执行结果,包含操作状态和输出数据。
- 执行此能力时使用
input_params参数,支持创建/查询/导出操作
3. 密码哈希
安全地存储用户密码。
import hashlib
import os
import hmac
import bcrypt
def hash_password_bcrypt(password: str) -> str:
"""使用bcrypt哈希密码"""
salt = bcrypt.gensalt(rounds=12)
hashed = bcrypt.hashpw(password.encode('utf-8'), salt)
return hashed.decode('utf-8')
def verify_password_bcrypt(password: str, hashed: str) -> bool:
"""验证bcrypt密码"""
return bcrypt.checkpw(password.encode('utf-8'), hashed.encode('utf-8'))
def hash_password_pbkdf2(password: str) -> str:
"""使用PBKDF2哈希密码"""
salt = os.urandom(32)
iterations = 600000
hashed = hashlib.pbkdf2_hmac('sha256', password.encode('utf-8'), salt, iterations)
return f"pbkdf2${iterations}${salt.hex()}${hashed.hex()}"
def verify_password_pbkdf2(password: str, stored: str) -> bool:
"""验证PBKDF2密码"""
parts = stored.split('$')
iterations = int(parts[1])
salt = bytes.fromhex(parts[2])
stored_hash = parts[3]
computed = hashlib.encode('utf-8'), salt, iterations)
return hmac.compare_digest(computed.hex(), stored_hash)
password = "mySecurePassword123"
hashed = hash_password_bcrypt(password)
print(f"哈希值: {hashed}")
print(f"验证: {verify_password_bcrypt(password, hashed)}")
// Node.js密码哈希示例
const crypto = require('crypto');
// 使用PBKDF2
function hashPassword(password) {
const salt = crypto.randomBytes(32);
const iterations = 600000;
const hashed = crypto.pbkdf2Sync(password, salt, iterations, 64, 'sha512');
return `pbkdf2$${iterations}$${salt.toString('hex')}$${hashed.toString('hex')}`;
}
function verifyPassword(password, stored) {
const parts = stored.split('$');
const iterations = parseInt(parts[1]);
const salt = Buffer.from(parts[2], 'hex');
const storedHash = parts[3];
const computed = crypto.pbkdf2Sync(password, salt, iterations, 64, 'sha512');
return crypto.timingSafeEqual(
Buffer.from(storedHash, 'hex'),
computed
);
}
// 安全随机数生成
function generateSecureToken(length = 32) {
return crypto.randomBytes(length).toString('hex');
}
输出: 返回密码哈希的执行结果,包含操作状态和输出数据。
- 执行此能力时使用
input_params参数,支持创建/查询/导出操作
4. 基础代码合规检查
检查代码中的加密相关安全问题。
#!/bin/sh
echo "=== 加密合规检查 ==="
echo "--- 弱哈希算法检查 ---"
grep -rnE "\b(md5|sha1)\s*\(" . --include="*.js" --include="*.py" --include="*.java" | \
grep -v "node_modules\|test\|\.min\."
echo -e "\n--- 硬编码密钥检查 ---"
grep -rnE "(secret|key|password|token)\s*=\s*['\"][^'\"]{8,}['\"]" . \
--include="*.js" --include="*.py" | grep -v "node_modules\|test"
echo -e "\n--- 不安全随机数检查 ---"
grep -rn "Math.random" . --include="*.js" | grep -v "node_modules\|\.min\."
grep -rn "random.random" . --include="*.py" | grep -v "secrets\|test"
echo -e "\n--- 证书验证检查 ---"
grep -rnE "rejectUnauthorized\s*:\s*false" . --include="*.js"
grep -rn "verify\s*=\s*False" . --include="*.py"
echo -e "\n--- ECB模式检查 ---"
grep -rn "ECB\|ecb" . --include="*.js" --include="*.py" | grep -v "node_modules"
echo -e "\n=== 审计完成 ==="
输出: 返回基础代码合规检查的执行结果,包含操作状态和输出数据。
- 执行此能力时使用
input_params参数,支持创建/查询/导出操作
5. TLS证书检查
检查TLS证书配置和有效期。
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null | \
openssl x509 -noout -subject -issuer -dates
openssl s_client -showcerts -connect example.com:443 < /dev/null 2>/dev/null | \
awk '/BEGIN CERT/,/END CERT/' > chain.pem
openssl verify -CAfile /etc/ssl/certs/ca-certificates.crt server.pem
for version in tls1 tls1_1 tls1_2 tls1_3; do
echo -n "$version: "
com:443 -$version 2>/dev/null | \
grep -q "Cipher" && echo "支持" || echo "不支持"
done
输出: 返回TLS证书检查的执行结果,包含操作状态和输出数据。 能力覆盖范围:本skill的核心能力覆盖以下场景关键词:算法选择指南与基、础合规检查、适合个人开发者保、护数据、面向开发者的数据、加密辅助工具、涵盖文件加密、加密算法选择与基、核心能力等。这些关键词对应desc
Установить 加密工具基础版 в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
execreadwriteFAQ
Что делает скилл 加密工具基础版?
提供文件加密、密码哈希、算法选择指南与基础合规检查,适合个人开发者保护数据。Use when 需要安全检测、合规审计、质量检查、加密防护时使用。不适用于安全评估未授权目标。适用于独立开发者、企业团队和自动化工作流场景。支持中文交互,无需复杂配置即开即用。输出结果可直接使用,减少二次加工成本。提供结构化输出和错误处理机制。
Как установить скилл 加密工具基础版?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл 加密工具基础版 запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic