agentleFS
ambroselittleambroselittle/agent-skills/skills/wtf/SKILL.md

wtf

Skill0 starsChanged 2 months agoMITView on GitHub

Capture a mid-session correction for the autonomous worker to act on later. Writes a local file and appends to a rolling GitHub backlog issue in the background so you stay in flow.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When the user catches you doing something wrong, they type /wtf <what went wrong>.

    line 9
  2. Very specific:

    Before doing anything else, check whether the current repo provides its own /wtf skill.

    line 13
  3. Very specific:

    Follow its instructions instead of the rest of this skill, treating the user's argument verbatim as: $ARGUMENTS.

    line 16
  4. Distinctive:

    Stop — do not fall through to the default behavior below.

    line 17
  5. Distinctive:

    Run the capture script, passing the user's message verbatim.

    line 25

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/wtf — Capture a correction

When the user catches you doing something wrong, they type /wtf <what went wrong>. This skill persists the correction so an autonomous worker can classify and fix it later. The skill returns in <1s; the GitHub backlog update happens in the background.

Repo override (check first)

Before doing anything else, check whether the current repo provides its own /wtf skill. Walk up from $PWD until you find a .git directory — that's the repo root. If <repo-root>/.claude/skills/wtf/SKILL.md exists:

  1. Read that file.
  2. Follow its instructions instead of the rest of this skill, treating the user's argument verbatim as: $ARGUMENTS.
  3. Stop — do not fall through to the default behavior below.

This lets repos route WTF captures to team- or project-specific destinations (different backlog repo, different sanitization rules, etc.). When no repo-local skill is present, continue with the default behavior.

Arguments: $ARGUMENTS — free-form description of what went wrong. The user's raw reaction is good; no need to sanitize.

Step 1: Capture locally (synchronous)

Run the capture script, passing the user's message verbatim. Capture the file path it prints:

CAPTURE_FILE=$(~/.claude/skills/wtf/scripts/capture.sh "$ARGUMENTS")

This writes ~/.agent-skills/wtf/<timestamp>-<slug>.md with frontmatter (session, cwd, branch), the user's verbatim message, and the last ~10 turns extracted from the transcript. Runs in well under a second.

Step 2: Queue the backlog append (asynchronous, non-blocking)

Fire off the GitHub backlog append in the background so the skill returns immediately:

mkdir -p ~/Library/Logs
( nohup ~/.claude/skills/wtf/scripts/backlog-append.sh "$CAPTURE_FILE" \
  > ~/Library/Logs/wtf-backlog-append.log 2>&1 & )

The subshell-with-background pattern ( ... & ) detaches the process cleanly in both bash and zsh — no disown needed (which triggers a "no current job" warning on zsh). The background script looks for an open WTF-labeled issue in ambroselittle/agent-skills that isn't currently In Progress, appends this correction to its body, or creates a new issue if none is open.

Step 3: Report back

Tell the user:

  • Captured to: $CAPTURE_FILE
  • Backlog update: running in background — check ~/Library/Logs/wtf-backlog-append.log if anything seems off

Be brief. The user was in the middle of something and just wants to confirm the capture landed. Do not summarize the correction back to them.

Notes

  • Background append vs Agent spawn. The plan originally specified spawning an Agent for the GH work. In implementation, the operations are fully deterministic (list → view → edit, or create), so a shell script fits skill-authoring.md's "deterministic work should be scripts, not AI" guidance — faster, no LLM cost, and the fire-and-forget behavior is identical.
  • Labels are self-bootstrapping. backlog-append.sh idempotently ensures the WTF and In Progress labels exist on every run, so the skill works standalone even before the worker is installed via setup.sh --install-wtf-worker.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.