Agent skill

Codewhale Session Orientation

by codewhale-hq in codewhale-hq/Codewhale

Establishes live repo truth at the start of a Codewhale session, five commands covering checkout, worktree sprawl, uncommitted changes and which AGENTS.md rules apply.

MITAuto-check passedDevelopment

Install Codewhale Session Orientation

skills CLI
$ npx skills add codewhale-hq/Codewhale --skill cw-orient -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install codewhale-hq/Codewhale cw-orient --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/codewhale-hq/Codewhale.git skills-src && mkdir -p .claude/skills && cp -r skills-src/docs/skills/cw-orient .claude/skills/cw-orient && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
cw-orient
GitHub stars
41k
Token cost
~1.1k tokens
SKILL.md length
561 words
Files
1
Skills in repo
63
Repo updated
First seen
Licence
MIT

At a glance

Establishes live repo truth at the start of a Codewhale session, five commands covering checkout, worktree sprawl, uncommitted changes and which AGENTS.md rules apply.

  • Works in 6 steps: Locate yourself. Checkout, branch, dirt,… → See the other lanes. Worktree sprawl is… → Read the dirt before you touch it.… → …
  • Starting or resuming a Codewhale work session
  • SKILL.md covers When to use, Workflow, Red flags / don't and Output
  • Calls git

What it does

This skill is stage 1 of a six-stage loop and runs at the start or resumption of a session, or any time a handoff note, issue or plan claims the state of the repository, since that claim is treated as something to verify rather than trust. The repository runs many worktrees at once, and the skill frames editing the wrong one as the cheapest bug to avoid.

Five steps build that picture. Locating yourself checks the checkout root, branch, dirt and distance from the remote, treating a detached HEAD or a branch with no upstream as normal to note, not something to silently fix. Seeing the other lanes lists every worktree and recent branches, so an already-started piece of work is continued in its existing worktree instead of being duplicated in a new one. Reading the dirt before touching it means treating modified files you did not write as belonging to another agent or lane, left unstaged rather than stashed or checked out away.

A fourth step finds every AGENTS.md in the tree and applies the one nearest to the files about to be touched, since the nearest scoped file overrides the root one, and a fifth step establishes version truth from Cargo.toml and a version-check script rather than from memory.

When your agent uses it

  • Starting or resuming a Codewhale work session
  • Taking over work from another agent or an earlier handoff note
  • Checking whether a given checkout owns the files you are about to edit
  • Finding out which worktrees and branches are currently live

Example prompts

  • “Orient me before I start: which branch, worktree and AGENTS.md rules apply here?”
  • “A handoff note says this is clean, but verify the real state before I trust it.”
  • “List the other live worktrees so I don't duplicate work already in progress.”
  • “There's dirt in this tree I didn't create. Whose is it and should I leave it alone?”

Requirements

  • A Codewhale checkout with git worktree support

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Locate yourself. Checkout, branch, dirt, and how far you are from the
  2. See the other lanes. Worktree sprawl is the standing hazard: several
  3. Read the dirt before you touch it. Modified files you did not write
  4. Fix which guidance applies. The nearest scoped AGENTS.md wins over the
  5. Establish version truth from source, not memory.
  6. Only if the task is about the community queue — issues, PRs, harvesting,

What it can do on your machine

Read from SKILL.md and the folder at commit 8d2fb45. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codewhale Session Orientation loads about 1.1k tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 561 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from codewhale-hq/Codewhale at commit 8d2fb45, republished under its MIT licence (© codewhale-hq). 561 words, ~1,115 tokens.

Download SKILL.mdSave it as .claude/skills/cw-orient/SKILL.md (or your agent's skills folder).
name
cw-orient
description
Use at the start of any Codewhale work session, or when unsure which checkout, branch, or worktree is authoritative: establish live repo truth before reading a plan or editing a file.

cw-orient

Open every session on live truth, not on a handoff note, a directory name, or what was true last time. This repo runs many worktrees at once; the cheapest bug to avoid is editing the wrong one. Five commands, then you know where you are.

This is stage 1 of the loop: orient → cw-slice → cw-gates → cw-dogfood → cw-land → cw-handoff.

When to use

  • Starting a session, resuming one, or taking over from another agent.
  • A handoff, issue, or plan tells you the state of the repo — verify before trusting it.
  • You are about to edit and are not certain this checkout owns the files.

Workflow

  1. Locate yourself. Checkout, branch, dirt, and how far you are from the remote:

    bash
    git rev-parse --show-toplevel && git branch --show-current
    git status --short --branch
    git log --oneline --decorate -10

    A detached HEAD or a branch with no upstream is normal here — note it, don't "fix" it silently.

  2. See the other lanes. Worktree sprawl is the standing hazard: several checkouts of this repo are usually live, each with its own dirty state.

    bash
    git worktree list
    git branch --sort=-committerdate --format='%(committerdate:short) %(refname:short)' | head -20

    If the work you were asked to do already has a checkout or worktree, use it. Do not start a second copy of the same lane, and do not create a worktree just because another agent is in this one — partition by file.

  3. Read the dirt before you touch it. Modified files you did not write belong to someone else — another agent, another lane, an in-flight slice:

    bash
    git status --porcelain
    git diff --stat

    Preserve them. Leave them unstaged, and do not git checkout -- or stash another writer's work to get a clean tree. Only if your change genuinely conflicts with that dirt is a fresh worktree warranted (cw-land).

  4. Fix which guidance applies. The nearest scoped AGENTS.md wins over the root one, and it is where the per-area rules actually live:

    bash
    find . -name AGENTS.md -not -path './tmp/*' -not -path '*/node_modules/*' -not -path './target/*'

    Today: root AGENTS.md, crates/tui/AGENTS.md, crates/localization/locales/AGENTS.md, web/AGENTS.md. Read the one that owns the files you are about to touch.

  5. Establish version truth from source, not memory.

    bash
    grep -m1 '^version' Cargo.toml
    ./scripts/release/check-versions.sh

    check-versions.sh is the drift gate across the workspace version, npm, Cargo.lock, the changelog, and the README. If it disagrees with what you were told, believe the script.

  6. Only if the task is about the community queue — issues, PRs, harvesting, credit — pull the live queue with the gh-* skills in this directory rather than assuming from memory. When the task is local-only, stay offline and record the missing external receipt instead.

Show full SKILL.md (177 more words)Show less

Red flags / don't

  • Don't infer the active lane from a directory name, a stale handoff, or a .md file's confident prose. All three have been wrong here.
  • Don't treat a plan document as current state. Plans describe intent; git describes reality.
  • Don't clean, stash, reset, or git checkout -- files you did not modify. Worktree dirt is usually another writer, not garbage.
  • Don't start work in a worktree whose branch is already merged to main — that lane is retirement material, not a base.
  • Don't skip step 4 because the root AGENTS.md "probably covers it". The scoped files carry the rules that actually get violated.
  • Don't fetch, browse, or hit GitHub when the task was scoped local-only.

Output

Open with a short status block. Skip fields that are empty or normal — a clean tree on main with no related worktrees is one line, not five:

  • checkout path, branch (or detached HEAD), base commit;
  • dirty files and whose they appear to be;
  • other worktrees that own related work;
  • workspace version and whether check-versions.sh agrees;
  • which AGENTS.md files govern this change.

© codewhale-hq, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in docs/skills/cw-orient of codewhale-hq/Codewhale.

Open the folder on GitHubat commit 8d2fb45

Compare with similar skills

Codewhale Session Orientation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codewhale Session Orientation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codewhale Session Orientation this skillcodewhale-hq/Codewhale41k—~1.1kAutomated safety check: PassMIT
Finishing a Development Branchobra/superpowers297k5 repos~1.9kAutomated safety check: PassMIT
Finishing A Development Branchfarm-fe/farm5.6k34 repos~1.8kAutomated safety check: PassMIT
Codebase Knowledge Graph Q&AEgonex-AI/Understand-Anything86k—~1.2kAutomated safety check: PassMIT
Understand ExplainEgonex-AI/Understand-Anything86k—~1.3kAutomated safety check: PassMIT
Git Worktree Cleanuplobehub/lobehub83k—~2.8kAutomated safety check: PassCustom licence

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    297k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • A skill your agent uses when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for…

    5.6k GitHub starsUsed in 34 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Codebase Knowledge Graph Q&A

    Egonex-AI/Understand-Anything

    Answers questions about a codebase by searching a prebuilt knowledge graph of its files, functions, classes and dependencies, not by rereading every source file.

    86k GitHub stars~1.2k tokensUpdated today
    DevelopmentAuto-check passed
  • Understand Explain

    Egonex-AI/Understand-Anything

    Gives an in-depth explanation of one file, function or module by reading the project's knowledge graph and checking that the graph is still fresh.

    86k GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Worktree Cleanup

    lobehub/lobehub

    Audits stale Git worktrees and branches with a bundled script, classifies each one, and deletes only after you approve the exact candidates.

    83k GitHub stars~2.8k tokensUpdated today
    DevelopmentAuto-check passed
  • Pre-Release PR Triage

    jamiepine/voicebox

    Sorts a backlog of open pull requests into must-merge, candidate, superseded and deferred, writes a triage doc and works the merge loop before a release.

    57k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed

More from codewhale-hq/Codewhale

All 63 skills in this repo
  • Codewhale Dogfood Install

    codewhale-hq/Codewhale

    Proves a Codewhale change in the real product: a stamped release build, an atomic local install, fresh-shell verification and manual QA that automated gates cannot cover.

    41k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Codewhale Session Handoff

    codewhale-hq/Codewhale

    Writes a paste-ready handoff for the next agent session, opening with a state-check command block and separating done, suspected and blocked work.

    41k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Codewhale Landing Workflow

    codewhale-hq/Codewhale

    Decides how verified work should reach main, directly, in a worktree or on an integration branch, while keeping contributor credit and respecting merge gates.

    41k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Sub-Agent Delegation

    codewhale-hq/Codewhale

    Guides when and how to split multi-step coding, research or verification work into focused sub-agent runs while the parent keeps integration and final checks.

    41k GitHub stars~790 tokensUpdated today
    Auto-check passed
  • Codewhale Fleet Manager

    codewhale-hq/Codewhale

    Triages and manages Codewhale fleet runs and workers with typed commands, classifying failures and choosing a safe restart, resume or escalation.

    41k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • GitHub Issue Bulk Assigner

    codewhale-hq/Codewhale

    Moves a list of GitHub issues into a milestone or assigns them to owners with the gh CLI, checking each one before and after the change.

    41k GitHub stars~953 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Codewhale Session Orientation

What does Codewhale Session Orientation do?

Establishes live repo truth at the start of a Codewhale session, five commands covering checkout, worktree sprawl, uncommitted changes and which AGENTS.md rules apply. This skill is stage 1 of a six-stage loop and runs at the start or resumption of a session, or any time a handoff note, issue or plan claims the state of the repository, since that claim is treated as something to verify rather than trust. The repository runs many worktrees at once, and the skill frames editing the wrong one as the cheapest bug to avoid.

When should I use Codewhale Session Orientation?

Codewhale Session Orientation fits situations like: starting or resuming a Codewhale work session; taking over work from another agent or an earlier handoff note; checking whether a given checkout owns the files you are about to edit; finding out which worktrees and branches are currently live.

How do I install Codewhale Session Orientation in Claude Code?

Run `npx skills add codewhale-hq/Codewhale --skill cw-orient -a claude-code`. Or copy the skill folder (docs/skills/cw-orient in codewhale-hq/Codewhale) into .claude/skills/cw-orient in your project. Claude Code loads it when a task matches its description.

How do I install Codewhale Session Orientation in Codex?

Run `npx skills add codewhale-hq/Codewhale --skill cw-orient -a codex`. Or copy the skill folder (docs/skills/cw-orient in codewhale-hq/Codewhale) into .agents/skills/cw-orient in your project. Codex loads it when a task matches its description.

Can I use Codewhale Session Orientation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codewhale-hq/Codewhale --skill cw-orient -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cw-orient, .gemini/skills/cw-orient, .github/skills/cw-orient and .opencode/skills/cw-orient in your project.

What does Codewhale Session Orientation need to run?

Going by SKILL.md and its folder, Codewhale Session Orientation needs the command-line tools its instructions call (git). Our summary lists: A Codewhale checkout with git worktree support.

Does Codewhale Session Orientation access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Codewhale Session Orientation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Codewhale Session Orientation use?

Codewhale Session Orientation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codewhale Session Orientation use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Codewhale Session Orientation?

Skills that share tags, products or a category with Codewhale Session Orientation: Finishing a Development Branch (obra/superpowers, 297k stars), Finishing A Development Branch (farm-fe/farm, 5.6k stars), Codebase Knowledge Graph Q&A (Egonex-AI/Understand-Anything, 86k stars) and Understand Explain (Egonex-AI/Understand-Anything, 86k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codewhale Session Orientation?

codewhale-hq (a GitHub organization) maintains it in codewhale-hq/Codewhale, which has 41,078 GitHub stars. The repository holds 63 skills in this directory. The repository was last updated on October 9, 2026.

Source: codewhale-hq/Codewhale on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.