ワンクリックで
file-operation-patterns
Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | file-operation-patterns |
| description | Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts. |
| version | 1.0.0 |
| format | "2025-10-02T00:00:00.000Z" |
| triggers | ["performing bulk file operations or writing deployment scripts"] |
| updated | "2026-04-25T00:00:00.000Z" |
| status | ACTIVE |
# Create directory tree (idempotent)
mkdir -p path/to/nested/dir
# Copy preserving permissions
cp -rp src/ dst/
# Atomic write (prevents partial reads)
tmpfile=$(mktemp "${target}.XXXXXX")
echo "$content" > "$tmpfile"
mv "$tmpfile" "$target"
# Safe deletion (guard variables)
[ -n "$DIR" ] && [ "$DIR" != "/" ] && rm -rf "$DIR"
# Incremental sync
rsync -av src/ dst/
| Don't | Do |
|---|---|
rm -rf $DIR unguarded | Guard with [ -n "$DIR" ] |
| Write directly to target | Write to temp, then mv |
| Assume dir exists | mkdir -p first |
| Ignore permissions | cp -p or explicit chmod |
Extract creative intent from images into executable build specs. Activates on images + build intent, "image to mission", "i2m", or capturing visual energy in code/design.
Unit Circle Laboratory + sc-dev-team autonomous mission control. Provides human-in-the-loop automation layer, pipeline management, context lifecycle, stuck-state prevention. UC re-execution series and dev branch milestones. Adapted from uc-lab pattern for code plan/execute/verify/complete. Auto-activates during UC milestone work; trigger: user says 'bring up the dev team'.
Generate intelligence briefings for the planning dashboard. Use this skill whenever a request file appears in `.planning/console/inbox/pending/` whose `type` field starts with `intelligence.` (refresh_briefing, triage_finding, snapshot_diff, investigate_section, dismiss_finding). The skill reads the per-project KB at `.gsd/intelligence/intelligence.db`, synthesizes a briefing with a causal hypothesis + acknowledged uncertainty + confidence label and ranked moves, then writes the result back to the KB. Always trigger this skill for these request types — do not generate briefings manually.
Sketched Isotropic Gaussian Regularization primitive. Scalar loss matching the embedding distribution to a standard-normal target via Cramér-Wold slicing and the Epps-Pulley empirical characteristic function test. Port of rbalestr-lab/lejepa (MIT). Default-off in v1.49.571.
Adversarial spec-compliance PR review — cross-references diffs against approved specs, verifies runtime claims against source, detects competing PRs, audits scope/convention compliance. Use before merging.
Pick among candidate outputs (code, configs, plans) by running them on diverse inputs and clustering by behavioural fingerprint, rather than by textual aggregation or log-probability. Activates when an executor returns multiple plausible candidates that need disambiguation, when output-majority voting would be the default choice, or when reviewing generated code that has not yet been validated. The 2026 evidence (Semantic Voting, arxiv 2605.08680v1) is that any execution-based selector dominates output-majority voting by 19-52pp; sketch-generated inputs beat random fuzz by 11.3pp. Triggers: "pick the best candidate", "majority vote on code", "select from N samples", "validate the generated output", "behavioural verification".