# Session Orient

> Run environmental recon at the start of a coding session before writing any code — disk space, blocker state, target path file count, and queue blockers. Use at session boot, when switching to a new task or target directory, or before any non-trivial change in an unfamiliar area.

- Skill: `jcdavis131/session-orient` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jcdavis131/session-orient`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jcdavis131/session-orient/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: jcdavis131 (https://skillmd.com/u/jcdavis131)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/jcdavis131/session-orient

---


# Session Orient

Do this **before** the first edit of a session or when picking up a new task. Goal: never start writing code into a blocked or mis-scoped environment.

## Also apply on loop resumption after a gap

A `/loop` or recurring-agent iteration that resumes after a meaningful gap (overnight, multi-hour wait) re-orients first — the world changed while you were away. Run the recon sequence before proceeding to the task, even though the loop is "continuing". Acting on a stale mental model wastes the turn; the state check is cheap and bounds the blast radius of a stale assumption.

## Recon sequence

0. **Agent skills refresh (15-day timer).** Read `agent-skills-last-refresh` from `auto-mode/SKILL.md` frontmatter. If due (≥15 days or missing), run `~/.cursor/skills/auto-mode/scripts/check-and-refresh.ps1`. `REFRESH_OK` updates the timestamp in that skill file. `NOT_DUE` → skip silently. `REFRESH_FAILED` → surface error, do not block informational work.
1. **Disk free space.** On Windows: `Get-PSDrive C | Select-Object Used,Free`. On POSIX: `df -h .`. If free space is under ~1 GB, treat the environment as disk-constrained — prefer tasks that don't need Docker / large builds / model downloads, and surface the constraint to the user.
2. **Queue blockers (if this repo uses a task queue).** Run the project's blocker command (e.g. `uv run python scripts/pick_task.py blockers` or `pnpm work:blockers`). If a hard blocker is active (disk, docker, db), do not start work that depends on it.
3. **Target path scope.** Count files in the area you're about to edit: `Get-ChildItem <path> -Recurse -File -ErrorAction SilentlyContinue | Measure-Object | Select-Object Count` (Windows) or `find <path> -type f | wc -l` (POSIX). A count near 0 means stub/scaffold; a high count means existing surface to respect.
4. **Git state.** `git status --short` and `git log -1 --oneline` — know what's dirty and what the last commit was.
5. **Open files / cursor context.** Note what the user already has open; it usually indicates the real target.

## Output

State, in one or two lines to the user:
- environment health (disk OK / constrained),
- any active blocker and what it rules out,
- the target scope (stub vs. real surface),
- the one task you're about to pick.

Then proceed. Do not pad this — recon is a means to avoid wasted work, not a report to dwell on.

## When to skip

- Pure conversational/informational requests.
- A single-file edit the user pointed at explicitly and you already read.
- You already ran recon this session and nothing changed.

