Skip to content
Development
Command

/file-operation-patterns

Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts.

From plugin
gsd-skill-creator
7126 skills61 agents26 commands1 MCP
$ npx -y skills add Tibsfox/gsd-skill-creator --agent claude-code

Command definition

file-operation-patterns.md
name: file-operation-patterns
description: Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts.

File Operation Patterns

Safe Patterns

# 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/

Anti-Patterns

| 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` |

@tibsfox
Ships withgsd-skill-creator

An adaptive learning and coprocessor architecture for Claude Code, built as an extension to GSD (open-gsd)

71102 skills61 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
71
Star history of Tibsfox/gsd-skill-creator on GitHub, a chart by star-history.com

Other commands on gsd-skill-creator.

env-setup

env-setup

Command

Environment configuration and secrets management. Use when setting up .env files, managing secrets, or configuring environments.

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command