# Cw Orient

Use at the start of any Codewhale work session, or when unsure whether the canonical...

- Repository: https://github.com/codewhale-hq/Codewhale (41164 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add codewhale-hq/Codewhale --skill cw-orient -g -a claude-code -y`
Codex: `npx skills add codewhale-hq/Codewhale --skill cw-orient -g -a codex -y`
Cursor: `npx skills add codewhale-hq/Codewhale --skill cw-orient -g -a cursor -y`
Gemini CLI: `npx skills add codewhale-hq/Codewhale --skill cw-orient -g -a gemini-cli -y`

## Description

Use at the start of any Codewhale work session, or when unsure whether the canonical checkout is on current `main` and what is dirty in it: establish live repo truth before reading a plan or editing a file.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# cw-orient

Open every session on live truth, not on a handoff note, a directory name, or
what was true last time. Several agents share this one checkout on `main`; the
cheapest bug to avoid is committing a live writer's half-written edit.

This is stage 1 of the loop: **orient → [cw-slice](../cw-slice/SKILL.md) →
[cw-gates](../cw-gates/SKILL.md) → [cw-dogfood](../cw-dogfood/SKILL.md) →
[cw-land](../cw-land/SKILL.md) → [cw-handoff](../cw-handoff/SKILL.md)**.

## 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 what is dirty or who is writing.

## 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
   ```
   Agent work happens on `main`. A detached HEAD or another branch here is a
   state to reconcile (preserve dirt and stranded commits, compare with
   `origin/main`, return to `main`) before editing; see `AGENTS.md` § Working
   rules.

2. **Look for stranded work, not lanes.** `git worktree list` and recent
   branches tell you what may hold unlanded commits. Inventory them; do not
   start work in one, and do not create one.
   ```bash
   git worktree list
   git branch --sort=-committerdate --format='%(committerdate:short) %(refname:short)' | head -20
   ```

3. **Dirt in this checkout is yours** (`AGENTS.md`, founder 2026-10-22).
   ```bash
   git status --porcelain
   git diff --stat
   ```
   Check mtimes: a file changed in the last 15 minutes, or one a live session
   is editing, is mid-edit, ask that writer to commit, and commit the rest
   yourself in coherent verified groups ([cw-land](../cw-land/SKILL.md)). Never
   stash, `checkout --`, reset or clean it.

The rest: https://github.com/codewhale-hq/Codewhale/blob/HEAD/docs/skills/cw-orient/SKILL.md
