wtf
WTF
Single-pass situational awareness for the current git branch. Analyzes git state only -- no source file reads.
Write, Edit, Read, Glob, and Grep are intentionally excluded from allowed-tools. This skill MUST NOT read or modify any files.
Workflow
Follow all 3 steps sequentially.
Step 1: Detect Context
-
Parse the optional focus argument from everything after
/wtf./wtf auth-> focus is "auth"/wtf(bare) -> no focus, full analysis
-
Run a single Bash call to detect the git context:
CURRENT=$(git symbolic-ref --short HEAD 2>/dev/null || git rev-parse --short HEAD)
DETACHED=$?
if git rev-parse --verify main &>/dev/null; then TRUNK="main"
elif git rev-parse --verify master &>/dev/null; then TRUNK="master"
else TRUNK=""; fi
echo "CURRENT=$CURRENT"
echo "TRUNK=$TRUNK"
echo "DETACHED=$DETACHED"
- Route based on the result:
- Not a git repo (commands fail) -> report "Not a git repository." and stop.
- Detached HEAD -> report the hash, run
git log --oneline -10around that point, summarize, and stop. - No trunk found (
TRUNKis empty) -> useAskUserQuestionto ask the user for their trunk branch name, then continue. - On trunk (
CURRENT == TRUNK) -> go to Step 2B. - Feature branch (anything else) -> go to Step 2A.
Step 2A: Feature Branch
Run a single Bash call to collect all data at once:
MERGE_BASE=$(git merge-base HEAD $TRUNK)
echo "=== LOG ==="
git log --format="%h %s%n%w(0,4,4)%b" $MERGE_BASE..HEAD
echo "=== STAT ==="
git diff --stat $MERGE_BASE..HEAD
echo "=== SHORTSTAT ==="
git diff --shortstat $MERGE_BASE..HEAD
echo "=== MERGE_BASE ==="
echo $MERGE_BASE
If a focus argument was provided, add path filtering:
- Append
-- '*{focus}*'to thegit logandgit diff --statcommands - If no results match the focus, report "No changes matching '{focus}'" and stop.
Edge case -- no divergence: If git log returns nothing (merge base == HEAD), report "Branch exists but hasn't diverged from {trunk} yet." and stop.
Parse the output silently. Do NOT echo the raw git output. Proceed to Step 3A.
Step 2B: Trunk Branch
Run a single Bash call:
echo "=== RECENT ==="
git log --oneline --since="7 days ago" --format="%h %s (%an, %ar)"
echo "=== COUNT ==="
git rev-list --count --since="7 days ago" HEAD
Parse the output:
- Filter out routine commits (dependency bumps, CI config, docs-only, formatting, merge commits).
- Group remaining interesting commits by day.
- Count filtered-out commits separately.
Edge case -- no recent activity: If count is 0, expand the window to 30 days and re-run. If still 0, report "Quiet repo -- no commits in the last 30 days." and stop.
Parse the output silently. Do NOT echo the raw git output. Proceed to Step 3B.
Step 3A: Present (Feature Branch)
Output in this exact format:
## WTF: {branch-name}
**Purpose:** {one-sentence description of what this branch does, inferred from commit messages}
**Base:** diverged from {trunk} at {merge-base-short} ({N} commits ahead)
**Scope:** {files changed} files | +{insertions} -{deletions}
### Changes
- {2-5 bullets summarizing logical changes, grouped by concern}
### Key Files
| File | Change | What |
| ------ | ------ | ---------------------- |
| {path} | +n/-n | {one-line description} |
---
**Next:**
1. Show the full diff
2. Deep-dive into a specific file
3. `/check` something specific
Step 3B: Present (Trunk Branch)
Output in this exact format:
## WTF: {trunk-branch}
{N} commits in the last 7 days.
### Highlights
**{Day}**
- {hash} {summary} ({author})
### Filtered Out
{N} routine commits omitted (deps, CI, docs).
---
**What do you want to look at?**
1. A specific commit
2. A different time range
3. Changes by a specific author
4. A specific area of the codebase
Guidelines
- This skill is strictly read-only. Never suggest running a write operation.
- No subagents. This skill is too simple for Task delegation.
- Parse git output silently and present structured markdown. Never dump raw git output to the user.
- Keep the total output concise. This is a quick orientation, not a full audit.
- If focus argument is provided, scope everything to that filter. Report clearly when the filter has no matches.
- For the Key Files table in feature branch output, limit to the 8 most-changed files. If there are more, add a summary row like "... and {N} more files".
More from nathan13888/nice-skills
init-repo
Scaffolds a new project repository for agentic development from a problem description, or sets up ops tooling (git, precommits, gitignore, licensing, CI) for an existing project. Guides the user through naming, runtime, package manager, devops, licensing, and project structure. Use when the user says "init project", "new project", "start a project", "scaffold repo", "create repo", or describes a problem they want to build a solution for.
23doc-n-fix
Processes PR review feedback into a prioritized checklist, documents it to a
7send-it
Push feature branch and create a GitHub PR with structured title and
6explore
Strategic discovery of a project's capabilities from a solutions architect
6check
Verifies the agent's current work against a specific question by analyzing
6sus
Finds suspicious, architecturally problematic, or high-impact maintainability
6