you-sure
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYou Sure?
You Sure?
<purpose>
Claude will happily rm -rf, drop tables, or deploy to production if asked.
This skill adds a mandatory pause before dangerous operations. The goal isn't
to be annoying - it's to make sure the user knows exactly what's about to
happen and has a chance to catch mistakes.
</purpose>
<purpose>
如果用户要求,Claude会执行rm -rf、删除表或部署到生产环境等操作。
本技能会在危险操作前强制添加一个暂停步骤。我们的目的不是为了添麻烦——而是确保用户清楚知道即将发生的操作,并有机会发现错误。
</purpose>
Dangerous Operations
危险操作列表
<triggers>
Always trigger sanity check before:
File Operations:
- ,
rm,rm -rfrmdir - Overwriting existing files
- on important files
mv - Bulk file operations (wildcards)
Database:
- ,
DROP TABLEDROP DATABASE - without WHERE or with broad WHERE
DELETE FROM TRUNCATE- Schema migrations on production
- on multiple rows
UPDATE
Git:
git push --forcegit reset --hardgit clean -fd- Pushing to main/master directly
- Deleting branches
Deployment:
- Deploying to production
- Changing environment variables in prod
- Scaling down services
- Modifying infrastructure
Permissions/Security:
- Changing file permissions ()
chmod 777 - Modifying user roles
- API key rotation
- Firewall rule changes
Bulk Operations:
- Any loop that modifies/deletes
- Batch API calls that mutate
- Mass email sends
- Bulk user modifications
<triggers>
在执行以下操作前,始终触发合理性检查:
文件操作:
- ,
rm,rm -rfrmdir - 覆盖现有文件
- 对重要文件执行
mv - 批量文件操作(使用通配符)
数据库操作:
- ,
DROP TABLEDROP DATABASE - 不带WHERE条件或WHERE条件范围过大的
DELETE FROM TRUNCATE- 在生产环境执行Schema迁移
- 对多行数据执行
UPDATE
Git操作:
git push --forcegit reset --hardgit clean -fd- 直接推送到main/master分支
- 删除分支
部署操作:
- 部署到生产环境
- 修改生产环境的环境变量
- 缩容服务
- 修改基础设施
权限/安全操作:
- 修改文件权限(如)
chmod 777 - 修改用户角色
- API密钥轮换
- 防火墙规则变更
批量操作:
- 任何用于修改/删除的循环操作
- 会修改数据的批量API调用
- 批量发送邮件
- 批量修改用户
Instructions
操作说明
Step 1: Detect Dangerous Operation
步骤1:检测危险操作
When you're about to execute something from the trigger list, STOP.
当你即将执行触发列表中的操作时,请立即停止。
Step 2: Surface The Checklist
步骤2:显示检查清单
You Sure?
You're about to:
[ ] [Specific action 1]
[ ] [Specific action 2]
[ ] [Specific action 3]
Impact:
- [What will change]
- [What could break]
- [Affected scope: N files/rows/users]
Reversibility:
- [Can this be undone? How?]
- [Backup available: Yes/No]
Environment: [dev/staging/prod]
Type 'go' to proceed, or 'abort' to cancel.确认操作?
你即将执行:
[ ] [具体操作1]
[ ] [具体操作2]
[ ] [具体操作3]
影响:
- [将会发生哪些变更]
- [可能会导致哪些故障]
- 影响范围:N个文件/行/用户
可撤销性:
- [该操作是否可撤销?如何撤销?]
- 是否有备份:是/否
环境:[开发/预发布/生产]
请输入'go'继续,或输入'abort'取消操作。Step 3: Wait For Explicit Confirmation
步骤3:等待明确确认
Do NOT proceed on:
- "sure"
- "yes"
- "okay"
- "do it"
Only proceed on:
- "go"
- "confirmed"
- "proceed"
This forces intentionality.
以下回复不会触发执行:
- "sure"
- "yes"
- "okay"
- "do it"
只有以下回复才会继续执行:
- "go"
- "confirmed"
- "proceed"
这是为了确保用户是有意执行该操作。
Step 4: After Confirmation, Execute Carefully
步骤4:确认后谨慎执行
- Execute one step at a time for multi-step operations
- Verify each step before proceeding to next
- Stop immediately if anything unexpected happens
- 对于多步骤操作,一次执行一个步骤
- 执行下一步前先验证当前步骤的结果
- 如果出现任何意外情况,立即停止
Severity Levels
严重程度分级
<severity>
**CRITICAL** - Production data, irreversible:
```
CRITICAL - You Sure?
This affects PRODUCTION and cannot be easily undone.
You're about to:
[ ] DROP TABLE users (48,293 records)
This will permanently delete all user data.
Backup status: [Check for recent backup]
Rollback: Not possible without backup restore
Are you absolutely sure? Type 'confirmed' to proceed.
**HIGH** - Destructive but recoverable:HIGH - You Sure?
You're about to:
[ ] rm -rf ./build/*
This will delete 847 files in the build directory.
Recoverable: Yes (can rebuild)
Type 'go' to proceed.
**MEDIUM** - Notable changes:You Sure?
You're about to:
[ ] git push --force origin feature-branch
This will rewrite history on the remote branch.
Others pulling this branch will need to reset.
Type 'go' to proceed.
</severity><severity>
**CRITICAL(严重)** - 生产环境数据,不可逆:
```
CRITICAL - 确认操作?
该操作会影响生产环境,且无法轻易撤销。
你即将执行:
[ ] DROP TABLE users (48,293条记录)
这将永久删除所有用户数据。
备份状态:[检查最近的备份情况]
回滚:无备份则无法回滚
你确定要执行吗?请输入'confirmed'继续。
**HIGH(高)** - 具有破坏性但可恢复:HIGH - 确认操作?
你即将执行:
[ ] rm -rf ./build/*
这将删除build目录下的847个文件。
可恢复:是(可重新构建)
请输入'go'继续。
**MEDIUM(中)** - 显著变更:确认操作?
你即将执行:
[ ] git push --force origin feature-branch
这将重写远程分支的提交历史。
拉取该分支的其他用户需要执行重置操作。
请输入'go'继续。
</severity>Smart Detection
智能检测
Don't be annoying on obviously safe operations:
DO trigger:
rm -rf /important/pathDELETE FROM usersgit push -f origin main
DON'T trigger:
- (single temp file)
rm temp_file.txt - (single row, specific)
DELETE FROM users WHERE id = 1 - (normal push)
git push origin feature-branch
Use judgment:
- Known test/temp files -> skip
- Production paths -> always trigger
- Broad operations -> trigger
- Narrow, specific operations -> skip unless destructive
不要对明显安全的操作触发检查:
需要触发检查的情况:
rm -rf /important/pathDELETE FROM usersgit push -f origin main
无需触发检查的情况:
- (单个临时文件)
rm temp_file.txt - (单行数据,明确指定)
DELETE FROM users WHERE id = 1 - (常规推送)
git push origin feature-branch
请酌情判断:
- 已知的测试/临时文件 -> 跳过检查
- 生产环境路径 -> 始终触发检查
- 大范围操作 -> 触发检查
- 范围明确的小操作 -> 除非具有破坏性,否则跳过检查
NEVER
禁止事项
- Auto-execute destructive operations without confirmation
- Accept vague confirmation ("sure", "yep")
- Proceed if user seems uncertain
- Skip sanity check because user is in a hurry
- Execute destructive operations in a loop without per-batch confirmation
- 未获得确认就自动执行破坏性操作
- 接受模糊的确认(如"sure"、"yep")
- 用户看起来不确定时仍继续执行
- 因用户赶时间而跳过合理性检查
- 执行循环中的破坏性操作时,未按批次确认
ALWAYS
必须遵守事项
- Show exactly what will happen (not vague descriptions)
- Show affected scope (number of files/rows/users)
- State whether it's reversible
- Require explicit confirmation word
- Offer to show preview/dry-run when available
- 准确显示即将执行的操作(避免模糊描述)
- 显示影响范围(文件/行/用户的数量)
- 说明操作是否可撤销
- 要求用户输入明确的确认关键词
- 如有可能,提供预览/试运行选项
Examples
示例
Example 1: Database Delete
示例1:数据库删除操作
User: "Delete all inactive users"
You Sure?
You're about to:
[ ] DELETE FROM users WHERE last_active < '2024-01-01'
Impact:
- Removes 12,847 user accounts
- Associated data (orders, preferences) may cascade delete
- Affected scope: ~24% of user base
Reversibility:
- NOT reversible without backup restore
- Last backup: 2 hours ago
Want me to:
A) Show a preview first (SELECT COUNT)
B) Proceed with delete
Type 'go' to proceed, or 'preview' to check first.用户:"删除所有不活跃的用户"
确认操作?
你即将执行:
[ ] DELETE FROM users WHERE last_active < '2024-01-01'
影响:
- 删除12,847个用户账户
- 关联数据(订单、偏好设置)可能会级联删除
- 影响范围:约占用户总数的24%
可撤销性:
- 无备份则无法撤销
- 最近一次备份:2小时前
你希望我:
A) 先显示预览结果(执行SELECT COUNT)
B) 直接执行删除操作
请输入'go'继续,或输入'preview'先查看预览。Example 2: Force Push
示例2:强制推送
User: "Force push to main"
CRITICAL - You Sure?
You're about to:
[ ] git push --force origin main
Impact:
- Rewrites shared history on main branch
- Anyone who pulled main will have conflicts
- CI/CD pipelines may retrigger
Reversibility:
- Technically reversible if you have the old SHA
- Others' local copies will be out of sync
This is rarely the right choice for main branch.
Did you mean to push to a feature branch?
Type 'confirmed' to force push to main anyway.用户:"强制推送到main分支"
CRITICAL - 确认操作?
你即将执行:
[ ] git push --force origin main
影响:
- 重写main分支的共享提交历史
- 所有拉取过main分支的用户都会遇到冲突
- CI/CD流水线可能会重新触发
可撤销性:
- 如果保存了旧的SHA值,技术上可以撤销
- 其他用户的本地副本会与远程不同步
通常不建议对main分支执行此操作。你是不是想推送到功能分支?
请输入'confirmed'以强制推送到main分支。Example 3: Bulk File Delete
示例3:批量文件删除
User: "Clean up all the log files"
You Sure?
You're about to:
[ ] rm -rf ./logs/*.log
Impact:
- Deletes 234 log files
- Total size: 2.3GB
- Oldest file: 2024-01-15
Reversibility:
- NOT reversible
- No backup configured for logs/
Type 'go' to proceed.用户:"清理所有日志文件"
确认操作?
你即将执行:
[ ] rm -rf ./logs/*.log
影响:
- 删除234个日志文件
- 总大小:2.3GB
- 最早的文件:2024-01-15
可撤销性:
- 无法撤销
- 未为logs/目录配置备份
请输入'go'继续。Example 4: Safe Operation (No Trigger)
示例4:安全操作(无需触发检查)
User: "Delete that temp file we made"
[No sanity check needed - single temp file, user knows about it]
Done. Deleted temp_output.json用户:"删除我们创建的那个临时文件"
[无需执行合理性检查——单个临时文件,用户清楚相关情况]
已完成。已删除temp_output.json