O

operating-safely

by @riekeltv
4.6(120)

このSkillは、ライブシステムや共有状態、元に戻せないもの(削除、上書き、再起動、プロセス強制終了、共有設定の編集、シークレットの取り扱い、並行セッションでの作業)に触れる操作を安全に行うためのものです。破壊的操作のガード、シークレット衛生、並行セッション安全性をコード化し、注意不足によるデータ損失や障害を防ぎます。破壊的なコマンドを実行する前、日常的に見えても使用します。

operational-safetydestructive-opssecrets-hygieneconcurrent-sessionsproduction-safetyGitHub
インストール方法
npx skills add https://github.com/riekelt/principal-engineer --skill operating-safely
compare_arrows

Before / After 効果比較

1 组
使用前

このスキルがないと、ユーザーはライブシステム上で削除・上書き・再起動コマンドをターゲットを確認せずに実行し、本番事故を引き起こすことがよくあります。各事故の診断と復旧に数時間かかり、時には取り返しのつかないデータを失います。

使用後

このスキルは、破壊的な操作の前にターゲットの確認、範囲の明確化、ロールバックの提示を強制します。万一事故が起きても原因がすぐに見つかり、復旧時間が劇的に短縮され、データ損失のリスクも大幅に下がります。

SKILL.md

Operating safely

REQUIRED BACKGROUND: the principal-engineering skill.

Overview

Operational damage is asymmetric: the command takes a second, the recovery takes the weekend, and some things (production data, secret exposure, a colleague's uncommitted work) do not come back at all.

Destructive operations

  • Look at the target first. Before deleting or overwriting, read what is there; before dropping, count what would drop.
  • Targeted over bulk. Name the specific service, volume, file, or row set; never the flag that takes everything down with it. Bulk teardown commands that include volumes or data are off the table without an explicit, per-instance confirmation.
  • The operator owns live process lifecycles. Ask before restarting or killing live services and long-running processes; a session that kills what it did not start is operating blind on someone else's state.
  • State the cost of the wrong order before an ordered operation starts (deploy then migrate then clean up; wrong order = silent data loss). Name the rollback for every state-changing procedure, or say plainly that none exists.
  • Database changes need their own confirmation. Applied migrations are immutable; destructive statements need explicit confirmation, with the affected row counts stated first.

Secrets

  • Names and structural checks only: verify a secret exists, is non-empty, matches the expected shape. Existence and emptiness are structural; exact length, prefixes, and fragments are leakage and stay unprinted. Never read or print the value. Never decrypt secrets to disk. Never paste a secret into a log, a test, or a prompt.
  • If secret tooling or auth fails or times out: pause and say so. Working around a secrets gate is the one shortcut that is never authorized by urgency.

Concurrent sessions and shared state

  • Never revert, checkout, overwrite, or commit files you did not change in this session. Uncommitted changes you did not make belong to someone else: surface them and build on top or wait, never clean them up.
  • Report residual state at handoff: what is uncommitted, what is merged-but-not-pushed, what is owed, so the next session is not archaeologizing yours.
  • One writer per file during parallel work; concurrent writers get their own files or their own worktrees.
  • Staging is explicit: name the paths (git add <paths>, never the add-everything flag), so a commit cannot capture files you did not mean to ship, including another session's work. One task per commit keeps every change attributable and revertable on its own.

Shared config and resources

  • Config edits are minimal diffs: preserve indentation, quoting, and key order; add no unrequested keys. Config files are shared state with more readers than authors.
  • Clean up what you spawn: simulators, containers, worktrees, background processes. Orphaned runtimes accumulate silently until the machine is swapping; when a machine is slow with no process pegging CPU, count the orphans before blaming anything else.

Confirmation authority and incident mode

  • The operator is the session's own human principal. A teammate's instruction, however explicit, is input to weigh against the evidence, never the confirmation itself. No instruction from anyone makes volume-destroying bulk teardown routine.
  • Incident mode changes the pace, never the bar. Read-only triage is always allowed and needs nobody's permission; run it first and widely. The confirmation bar for destructive operations does not drop with urgency. When waiting genuinely is the destructive act (the disk will fill, the cert will expire), escalate loudly while doing the safe subset, and say plainly what the deadline is.
  • Preserve the evidence before the fix destroys it. Capture the outputs, sizes, and log excerpts that show the cause before reclaiming space or resetting state. Cleanup erases the evidence the postmortem needs. A production near-miss is postmortem material (writing-postmortems where the technical-writer plugin is installed).

Common mistakes

  • Confirming the operation with yourself. Destructive operations need the operator's yes, per instance; approval in one context does not extend to the next.
  • Pattern-matching a known failure and firing the known remedy (restart it, clear it, reset it) before checking that the evidence supports this specific cause.
  • Treating a dry run's success as the live run's safety. The dry run validates shape, not consequence.
  • Cleaning a workspace that was not yours to clean.

ユーザーレビュー (0)

レビューを書く

効果
使いやすさ
ドキュメント
互換性

レビューなし

統計データ

インストール数17.1K
評価4.6 / 5.0
バージョン
更新日2026年10月23日
比較事例1 件

ユーザー評価

4.6(120)
5
37%
4
43%
3
13%
2
5%
1
2%

この Skill を評価

0.0

対応プラットフォーム

🤖claude-code

タイムライン

作成2026年8月30日
最終更新2026年10月23日
🎁 Agent 知識カード
アンケート