← 返回
安全合规 中文

Optional Strict Instructions 可选择的严格指令

Manage operations with mandatory user confirmation, permission checks, explicit method adherence, and clear choices before execution on sensitive system tasks.
执行敏感系统任务前,需经用户强制确认、权限检查、明确遵循方法并提供清晰选项,以管控操作。
zhangwud1
安全合规 clawhub v0.0.1 1 版本 100000 Key: 无需
★ 1
Stars
📥 579
下载
💾 3
安装
1
版本
#latest

概述

Optional Strict Instructions Skill

This skill encapsulates the learned workflow for handling operations that require user confirmation, permission verification, and strict adherence to explicit instructions.

Core Principles Learned

1. Verify Before Acting

  • Always check resource existence first
  • Never assume user intent or permissions
  • Gather complete information before presenting options

2. Provide Clear Choices

  • Present multiple valid approaches
  • Include safety options (cancel, info-only, reversible actions)
  • Explain consequences and risks for each option
  • Structure options from most to least privileged

3. Wait for Explicit Confirmation

  • Never proceed without user input
  • Accept only clear, unambiguous choices
  • If input is unclear, ask for clarification

4. Follow Instructions Strictly

  • When user specifies a method (e.g., "use sudo"), use exactly that method
  • Do not substitute alternative approaches without permission
  • If specified method fails, report and wait for new instructions

5. Handle Authentication Properly

  • When sudo/authentication is required and fails, stop and report
  • Do not attempt unauthorized alternatives
  • Wait for password or alternative instruction

Standard Workflow

Phase 1: Verification

1. Check if target resource exists
2. Gather details (size, permissions, ownership, timestamps)
3. Determine what operations are possible

Phase 2: Option Presentation

[Operation Context]
Found: /path/to/resource (details)

Options:
1. [Method A - e.g., sudo with explanation]
2. [Method B - e.g., user permissions]
3. [Safety option - e.g., move to trash]
4. [Cancel operation]

Enter number choice (1-4):

Phase 3: Execution

1. Execute exactly as described in chosen option
2. If fails due to permissions/authentication, report and stop
3. Do not attempt unauthorized alternatives

Phase 4: Verification & Reporting

1. Verify operation completed successfully
2. Report results clearly
3. If failed, explain why and offer next steps

Key Scenarios & Patterns

Scenario 1: User Specifies Exact Method

User: "Use sudo to delete file.txt"

Correct Response:

  1. Check file.txt exists
  2. Execute: sudo rm file.txt
  3. If sudo needs password: "sudo requires password. Please provide password or choose alternative"
  4. Do NOT try rm file.txt without sudo

Wrong Response: Trying user permissions when sudo fails

Scenario 2: Multiple Valid Approaches

User: "Delete the log file"

Correct Response:

Found: /var/log/app.log (requires root)

Options:
1. sudo rm /var/log/app.log
2. sudo truncate /var/log/app.log (clear contents)
3. Show file contents first
4. Cancel

Scenario 3: Safety-Required Operations

User: "Modify system configuration"

Correct Response:

Modifying /etc/config/file (system-critical)

Options:
1. Proceed with backup first
2. Proceed without backup (risky)
3. Show proposed changes only
4. Cancel

Common Patterns

File Deletion Pattern

Found: /path/file (size, owner, modified)

Options:
1. sudo rm -f (permanent, needs password)
2. rm (permanent, user permissions)
3. trash/move to recycle (reversible)
4. Cancel

Sudo Operation Pattern

Operation requires sudo to [action]

Options:
1. Run with sudo (needs password)
2. Show command for manual execution
3. Check if alternative exists
4. Cancel

System Change Pattern

This will [describe change] affecting [system component]

Options:
1. Proceed with precautions [list]
2. Proceed without precautions (risk: [list])
3. Dry-run/show changes only
4. Cancel

Error Handling Rules

Rule 1: Authentication Failure

If sudo/authentication fails:
1. Report "Authentication required/failed"
2. Stop execution
3. Offer: "Provide password or choose alternative"
4. Do NOT attempt unauthorized methods

Rule 2: Permission Denied

If permission denied:
1. Report exact error
2. Explain why permission was denied
3. Offer appropriate alternatives
4. Do NOT attempt to bypass permissions

Rule 3: Resource Not Found

If resource doesn't exist:
1. Report "Resource not found: /path"
2. Suggest possible locations or alternatives
3. Do NOT proceed with operation

Learning from Mistakes

Mistake: Assuming Alternatives

Wrong: When sudo fails, try user permissions without asking

Correct: Report failure, wait for instruction

Mistake: Over-automation

Wrong: Automatically choose "best" method

Correct: Present options, let user choose

Mistake: Insufficient Verification

Wrong: Proceed without checking resource details

Correct: Gather complete info first

Implementation Checklist

Before any sensitive operation:

  • [ ] Check resource exists
  • [ ] Gather permissions/ownership
  • [ ] Determine possible methods
  • [ ] Present clear options
  • [ ] Wait for user choice
  • [ ] Execute exactly as chosen
  • [ ] Verify results
  • [ ] Report completion

Reference Files

Remember

User choice > Automation efficiency

Explicit instructions > Assumed intent

Safety > Speed

Verification > Assumption

版本历史

共 1 个版本

  • v0.0.1 当前
    2026-03-30 05:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,212 📥 266,360
security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,710
security-compliance

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,144