touch_file
touch_file
When a Write or Edit tool call fails while trying to create a new file, recover by using touch via the Bash tool to create the empty file first, then retry the Write.
Why this matters
The Write tool can fail when creating new files — often because parent directories don't exist, or the filesystem needs the file to be created differently. Rather than giving up or trying workarounds, a quick mkdir -p + touch reliably sets up the file path so the Write tool succeeds on retry.
Recovery steps
When Write or Edit fails on a new file (not an existing one):
- Create parent directories — run
mkdir -p <parent-directory>via Bash to ensure the full directory path exists. - Create the empty file — run
touch <filepath>via Bash. - Retry the Write — use the Write tool again with the same content. It should succeed now.
You can combine steps 1 and 2:
More from trtmn/agent-skills
self-improvement
Run the self-improvement agent to review this session and the ~/.learnings/ log files. Use this skill whenever the user explicitly asks to review learnings, promote entries to CLAUDE.md, do an end-of-session review, or analyze GitHub PRs/issues for recurring patterns. Also use when the user says "promote", "review learnings", "what have we learned", or "self-improvement". Do NOT use this skill just for logging — logging happens automatically without the skill (see Passive Logging below). This skill is specifically for the *review and promotion* workflow.
22cowsay
Generates an ASCII cow saying custom text. Use when the user wants "cowsay", "cow say", or a cow to say something.
13unifi-api
Query and control a UniFi network using the `unifi` CLI (a restish wrapper with 1Password auth) or the REST API as fallback. Use this skill whenever the user wants to manage their UniFi network — listing connected clients, blocking/unblocking devices, managing firewall policies, checking WAN health and speed test results, rebooting devices, managing VLANs or SSIDs, reading traffic stats, port forwarding, or any other UniFi network management task. Prefer the `unifi` CLI for Integration API endpoints; fall back to raw curl/python for legacy API endpoints. Trigger even if the user doesn't say "API" or "UniFi" — phrases like "check my network", "block that device", "show me who's connected", "add a firewall rule", "what's my WAN IP", "how's my internet speed", or "what's on the guest network" are all good triggers.
5homebrew-dev
Package and distribute macOS apps, fonts, CLI tools, and arbitrary files using Homebrew formulas and casks. Use this skill whenever the user wants to create a Homebrew formula or cask, set up a personal tap, package a macOS .app bundle, distribute fonts or pre-built binaries via brew, use `brew create`, bump a formula or cask to a new version, submit a package to homebrew-core or homebrew-cask, or publish anything with Homebrew — even if they just ask how to "make something installable with brew", "share my app through Homebrew", "update my formula", or "get my package into Homebrew".
5tailscale-policy-manager
>
5planka
A brief description of what this skill does
4