bendusz

Wtf — Development skill for Claude Code

Development community

Explain (and optionally fix) the last shell command using Claude.

How to install Wtf

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

What Wtf does

Explain (and optionally fix) the last shell command using Claude.

Alternatives in Development

  • OpenAI Codex CLI — (Rust implementation) 67.8k ★
  • Claude Auto Resume — A shell script utility that automatically resumes Claude CLI tasks when usage limits are lifted 732 ★
  • Build.mjs 使用说明 — 这是 Claude Config Manager 的 Node.js 构建脚本,提供了比原生 shell 脚本更好的跨平台支持和更多功能 254 ★

README

wtf

Explain — and optionally fix — your last shell command using Claude.

$ ls /nonexistent
ls: /nonexistent: No such file or directory
$ wtf
↻ Re-running to capture output: ls /nonexistent

The command failed because the path "/nonexistent" doesn't exist. List the
parent directory with `ls /` to see what's actually there, or create the
target with `mkdir -p /nonexistent` if that's what you intended.

Install

curl -fsSL https://raw.githubusercontent.com/bendusz/wtf/main/install.sh | bash

Restart your shell, or:

source ~/.zshrc   # or ~/.bash_profile / ~/.bashrc

Pinning a version

For a real chain of custody, pin **both** `install.sh` and `wtf.sh` to the same commit SHA and verify the `wtf.sh` digest. Env vars must be applied to `bash` (after the pipe), not to `curl`:

SHA=
curl -fsSL "https://raw.githubusercontent.com/bendusz/wtf/${SHA}/install.sh" \
  | WTF_BRANCH="$SHA" WTF_SHA256= bash
Env var Purpose
WTF_BRANCH Ref to fetch (branch / tag / commit sha). Default: main.
WTF_INSTALL_DIR Where to drop wtf.sh. Default: $HOME/.wtf.
WTF_SHA256 Expected SHA-256 of wtf.sh. Aborts on mismatch.

Usage

wtf                  # explain the last command
wtf --fix            # also propose a fix and prompt to run it
wtf --force-rerun    # re-run even if the command isn't on the safe allowlist
wtf --no-rerun       # never re-run; analyze the command text alone

Short flags: `-f` (`--fix`), `-y` (`--force-rerun`), `-n` (`--no-rerun`).

`--fix` asks Claude to emit a single fix command in a fenced block. `wtf` parses it out and prompts `[y/N]` before running anything. Multi-line fix blocks are rejected instead of silently truncated.

By default `wtf` checks the last co