/file-operation-patterns
Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts.
$ npx -y skills add Tibsfox/gsd-skill-creator --agent claude-codeHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/file-operation-patterns
Context preview
What this command does when you run it.
Safe file operation patterns. Use when performing bulk file operations or writing deployment scripts.
Command definition
file-operation-patterns.mdname: 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` |
An adaptive learning and coprocessor architecture for Claude Code, built as an extension to GSD (open-gsd)
Repo: Tibsfox/gsd-skill-creator
Other commands on gsd-skill-creator.
- /api-design
REST API design best practices. Use when designing APIs, choosing status codes, or creating endpoints.
Open command - /code-review
Reviews code for bugs, style, and best practices. Use when reviewing PRs or checking code quality.
Open command - /context-handoff
Creates context handoff documents for session continuity. Use when ending sessions, switching tasks, or handing off work.
Open command - /decision-framework
Thinking frameworks for decisions and problem analysis. Use when evaluating options, root causes, or prioritizing.
Open command - /env-setup
Environment configuration and secrets management. Use when setting up .env files, managing secrets, or configuring environments.
Open command - /gsd-dashboard-console
Checks dashboard console inbox at GSD lifecycle boundaries and handles milestone-submit, config-update, and question-response messages. Use when running GSD workflows with the dashboard active.
Open command

