npx skills add smithery/doccker --skill ops-safety
doccker/cc-use-exp
ops-safety
当用户执行系统级命令(sysctl、iptables、systemctl、Docker ?
Installation
npx skills add doccker/cc-use-exp --skill ops-safety
Similar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Comprehensive AI prompt engineering safety review and improvement prompt. Analyzes prompts for …
10.2K installsReview PlanetScale Postgres for Traffic Control, query tags, roles, pg_strict, backups/PITR, pr…
1.2K installsReview a PlanetScale Vitess database for safe migrations, deploy requests, schema recommendatio…
12 installsUse this skill whenever the agent is about to recommend or apply a change that touches DPU / NI…
126 installsDefensive Golang coding against accidental bugs — nil panics, typed-nil interfaces, `append` ba…
37.6K installsPython type safety with type hints, generics, protocols, and strict type checking. Use when add…
11K installsAlso in this package
Other skills from doccker/cc-use-exp · top by installs.
npx skills add doccker/cc-use-exp
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Package contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md3,446 B -
docs
SUMMARY.md184 B
History
- First seen on skills.sh
- First recorded snapshot · 43 installs
SKILL.md
运维安全规则
防止因不完整的操作导致系统故障。
1. 系统级命令规则
在给出任何系统级命令(sysctl、firewalld、iptables、内核参数、systemctl 等)之前,必须先说明:
| 项目 | 说明 |
|---|---|
| 影响范围 | 这个命令会影响什么(网络、Docker、服务等) |
| 风险等级 | 高/中/低 |
| 回滚方案 | 完整的回滚步骤,包括所有依赖服务的重启 |
| 需要重启的服务 | 明确列出 |
命令说明模板
## 命令说明
**命令**: sudo sysctl -p /etc/sysctl.d/99-xxx.conf
**影响范围**:
- 内核网络参数
- 可能影响 Docker 容器网络
- 可能影响 Cloudflare 连接
**风险等级**: 高
**回滚方案**:
1. sudo rm -f /etc/sysctl.d/99-xxx.conf
2. sudo sysctl --system
3. sudo systemctl restart docker
4. docker-compose up -d
5. curl -I http://127.0.0.1:80 # 验证
**是否确认执行?**
2. 回滚方案要求
回滚方案必须包含以下步骤,缺一不可:
| 步骤 | 说明 | 示例 |
|---|---|---|
| 1. 恢复配置 | 删除或还原配置文件 | rm -f /etc/sysctl.d/99-xxx.conf |
| 2. 重载配置 | 重新加载系统配置 | sysctl --system |
| 3. 重启服务 | 重启所有受影响的服务 | systemctl restart docker |
| 4. 恢复应用 | 重启依赖的应用 | docker-compose up -d |
| 5. 验证恢复 | 确认服务正常 | curl -I http://127.0.0.1:80 |
3. 问题排查原则
不扩散问题
如果 A 配置导致问题:
- ✅ 先彻底恢复 A
- ❌ 不要去改 B、C、D
最小改动原则
- 只修改必要的配置
- 一次只改一个变量
- 改完验证后再进行下一步
不动正常配置
- 用户明确说某配置正常,不要建议修改
- 不要"顺手"优化其他配置
4. 特定场景规则
Cloudflare + 服务器
当用户使用 Cloudflare 代理时:
| 禁止操作 | 原因 |
|---|---|
| 随意修改内核网络参数 | 可能导致 Cloudflare 连接异常 |
| 随意修改 DNS 记录 | 影响 CDN 解析 |
| 随意修改 SSL/TLS 设置 | 可能导致证书验证失败 |
Docker 相关
修改以下配置后,必须提示重启 Docker:
- 内核网络参数(sysctl)
- iptables / firewalld 规则
- Docker daemon 配置
数据库操作
执行以下操作前必须提示备份:
- 表结构修改(ALTER TABLE)
- 批量数据更新(UPDATE/DELETE 无 WHERE 或影响大量数据)
- 数据库迁移
5. 禁止行为
| 禁止 | 说明 |
|---|---|
| ❌ 问题未解决时改其他配置 | 不要扩散问题 |
| ❌ 不完整的回滚方案 | 必须包含服务重启步骤 |
| ❌ 无风险说明的系统命令 | 必须先说明再执行 |
| ❌ 未经确认执行高风险命令 | 必须等用户确认 |
| ❌ 同时修改多个配置 | 一次一个,验证后再下一个 |
6. 风险等级定义
| 等级 | 定义 | 示例 |
|---|---|---|
| 高 | 可能导致服务中断、数据丢失 | 内核参数、防火墙、数据库DDL |
| 中 | 可能影响部分功能 | 应用配置、环境变量 |
| 低 | 影响范围小,易回滚 | 日志级别、非核心配置 |