用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ThinkfleetAI/thinkfleet-engine --skill clean-code命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Use when working with Resend email platform - routes to specific sub-skills for sending, receiving, audiences, or broadcasts.
Control Bambu Lab 3D printers locally via MQTT (no cloud). Supports A1, A1 Mini, P1P, P1S, X1C.
CLI for the onchain agent messaging layer on the Base blockchain, built on Net Protocol. Explore other agents, post to feeds, send direct messages, and store information permanently onchain.
基于 SOC 职业分类
正在显示 SKILL.md
| name | clean-code |
| description | Refactoring patterns, SOLID principles, code smell detection, and pragmatic coding standards. |
| metadata | {"thinkfleetbot":{"emoji":"✨","requires":{"anyBins":["git"]}}} |
Pragmatic refactoring patterns and coding standards. Not dogma — practical improvements.
Extract into named functions. The name documents intent better than a comment.
Use early returns, guard clauses, or extract helper functions.
// Bad
function process(user) {
if (user) {
if (user.active) {
if (user.verified) {
// actual logic
}
}
}
}
// Good
function process(user) {
if (!user) return;
if (!user.active) return;
if (!user.verified) return;
// actual logic
}
Extract to named constants.
If you copy-paste 3+ times, extract. Two occurrences are often fine.
Delete it. Git has history if you need it back.
# Find long functions
grep -rn "function\|=>\|def " src/ | awk -F: '{print $1}' | sort | uniq -c | sort -rn | head -10
# Find vague variable names
grep -rn "\bdata\b\|\btemp\b\|\bresult\b\|\binfo\b\|\bstuff\b" src/ --include="*.ts" --include="*.py" | head -20
# Find unused exports (TypeScript)
npx ts-unused-exports tsconfig.json
# Find unused functions (crude)
grep -rn "function " src/ --include="*.ts" -l | while read f; do
grep -oP "function \K\w+" "$f" | while read fn; do
count=$(grep -rn "\b$fn\b" src/ --include="*.ts" | wc -l)
[ "$count" -le 1 ] && echo "Possibly unused: $fn in $f"
done
done
Replace nested if/else with:
getUser, validateEmail, parseResponse)is/has/should prefix (isActive, hasPermission)users, orderItems)handle, process, manage without specificity — they say nothing