warn-destructive-commands
技能 (Skill):破坏性命令警告
目的 (Purpose)
在会话中执行 Bash 命令前,检查是否包含破坏性模式;若命中则先警告用户并征得确认再执行,降低误操作风险。适用于接触生产、调试线上系统或共享环境。
核心目标(Core Objective)
首要目标:在每次执行 Bash 命令前,若检测到破坏性模式,则先 AskUserQuestion 警告并等待用户确认或取消;确认后方可执行。
成功标准(必须满足所有要求):
- ✅ 模式检查:在执行任何 Bash 命令前,对照下表检查命令字符串
- ✅ 命中时警告:若命中破坏性模式,使用 AskUserQuestion 展示命令、风险与选项(A) 继续 B) 取消)
- ✅ 安全例外:下表「安全例外」中的模式不触发警告
- ✅ 用户可覆盖:用户选择继续时,执行命令;选择取消则不执行
- ✅ 会话生效:技能激活后,本会话内所有 Bash 命令均受此约束
More from nesnilnehc/ai-cortex
review-codebase
Review given file/dir/repo for current-state code organization: module boundaries, design patterns, cross-module dependencies, tech debt, and interface stability. Scope-only atomic skill; output is a findings list.
106review-vue
Review Vue 3 code for Composition API, reactivity, components, state (Pinia), routing, and performance. Framework-only atomic skill; output is a findings list.
94review-diff
Review only git diff for impact, regression, correctness, compatibility, and side effects. Scope-only atomic skill; output is a findings list for aggregation.
91review-java
Review Java code for language and runtime conventions: concurrency, exceptions, try-with-resources, API versioning, collections and Streams, NIO, and testability. Language-only atomic skill; output is a findings list.
84review-architecture
Review code for architecture: module and layer boundaries, dependency direction, single responsibility, cyclic dependencies, interface stability, and coupling. Cognitive-only atomic skill; output is a findings list.
83review-security
Review code for security: injection, sensitive data, auth, dependencies, config, and crypto. Atomic skill; output is a findings list.
74