File Operation Patterns

SkillFiles & storage

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

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the File Operation Patterns skill

What this skill tells your AI

The instructions your AI receives, as published by tibsfox/gsd-skill-creator in project-claude/skills/file-operation-patterns/SKILL.md and read by ahel’s review.

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'tDo
rm -rf $DIR unguardedGuard with [ -n "$DIR" ]
Write directly to targetWrite to temp, then mv
Assume dir existsmkdir -p first
Ignore permissionscp -p or explicit chmod

Signals

GitHub stars
70
Forks
9
Last commit
Jul 2026
Advanced
Catalog kind
skill
Gateway key
file-operation-patterns
Source
github.com/tibsfox/gsd-skill-creator