hugoferreira

Apfs Skill — Git skill for Claude Code

Git community

A Claude Code skill that teaches agents to use APFS: copy-on-write git worktrees with warm caches, instant directory checkpoints and undo, accurate disk-space accounting, safe deduplication, and trans.

How to install Apfs Skill

This entry records only its repository, not the path inside it, so there is no exact command to give. Open hugoferreira/apfs-skill and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Apfs Skill does

A Claude Code skill that teaches agents to use APFS: copy-on-write git worktrees with warm caches, instant directory checkpoints and undo, accurate disk-space accounting, safe deduplication, and transparent compression. Scripts, reference notes and tests included.

Alternatives in Git

  • Git Worktree Setup — Create isolated git worktrees with instant feedback and background Rust verification 25.5k ★
  • Claude.md Template For Users — Attribution: Behavioral patterns adapted from obra/superpowers by Jesse Vincent (@obra), MIT License 6.8k ★
  • Cmt — When user uses /cmt slash command, commit current git changes using fast mode by default, or strict mode when 301 ★

README

apfs-dev

A [Claude Code](https://claude.com/claude-code) skill that teaches an agent to use APFS on macOS: copy-on-write clones, instant git worktrees and directory checkpoints, correct disk-space accounting, deduplication, and transparent compression. It ships the scripts that do the work, the reference notes behind them, and their tests.

The scripts are plain command-line tools. They work without Claude Code.

What it provides

Task Tool Measured
Worktree for a parallel agent that occupies no extra space, optionally with node_modules, target, .env already in place apfs-worktree.py 6,000 tracked + 6,000 ignored files: 1.2 s, 4 KiB of new data (git worktree add, tracked files only: 1.1 s, 141 MiB)
Undo everything done to a directory, including ignored and untracked files apfs-checkpoint.py create 0.26 s, diff 0.4 s for 12,000 files
What a file or tree really occupies when clones are involved apfs-inspect.py du reported 572 MiB for 381 MiB on disk
Replace duplicate files with clones, safely, in a tree that is in use apfs-dedupe.py
Copy a tree to another volume, verified and resumable, sharing duplicates at the destination apfs-transfer.py
Compress cold files transparently (LZVN/LZFSE/zlib) with a plan, a budget and a state database apfs_compress_plus.py
Make Claude Code's own worktrees (--worktree, subagent isolation) copy-on-write claude-worktree-hook.py

`SKILL.md` adds the rules an agent needs to apply these correctly: which copy commands clone and which silently write full copies, why deleting does not always free space, what breaks when a `.venv` or `.git` is cloned, and when snapshots, case-sensitive volumes, sparse images or RAM disks are the right tool.

Measurements were taken on macOS 27.2.1 (Apple silicon, internal SSD) on 2026-11-22. Each reference file states how its numbers were obtained.

Requirements

  • macOS on an APFS volume. Clones need