agentleFS
hexhex/claude-sessions/skills/feature/SKILL.md

feature

Skill54 starsChanged 9 days agoMITView on GitHub

Start a feature as its own cs worktree session, running in parallel in a tmux window, with a written brief it begins from. Invoke when the user asks to start, spin up, spawn or open a feature, or to hand a piece of work to a separate session while this one continues.

71 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use bug, bugfix and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • paulocsbSkill

    bug

    Investigation playbook for fixing a bug. Walks through 5 phases: reproduce → isolate → root cause → propose fix → validate. Forces concrete reasoning with code reads, log inspection, and git blame instead of pattern-matching guesses. Use for any non-trivial defect.

    Also in 8 projects that use this

  • team-attentionSkill

    bugfix

    Root cause based one-shot bug fix. debugger diagnosis → requirements.md generation → /execute. /bugfix "error description" Full investigation pipeline: debugger + gap-analyzer + standard verify. QA suggestion after successful fix.

    Also in 7 projects that use this

  • codebycoreySkill

    adopt

    Adopt an existing plan from conversation context into delta-spec format. Use when importing a plan, adopting planning that already happened, capturing plan mode output, or bringing in prior design work.

    Also in 4 projects that use this

  • Google CloudSkill

    fix

    Plan a remediation strategy after a test failure.

    Also in 10 projects that use this

  • marylinSkill

    recover

    Recover work from a crashed or interrupted session. Use when Claude crashed mid-task, after an unexpected exit, when you see 'stale sessions detected', or when you lost context and need to figure out what was happening.

    Also in 3 projects that use this

  • aegiswizardSkill

    context

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 65 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    Only works in a cs session: check that $CLAUDE_SESSION_NAME has a value.

    line 13
  2. Distinctive:

    If empty, tell the user starting a feature needs a cs session and stop.

    line 14
  3. Distinctive:

    No name at all: ask for one (AskUserQuestion is fine) before writing anything.

    line 30
  4. Very specific:

    Every section stays, each heading on its own line, with none under one that has nothing to say: cs -spawn refuses a feature brief that …

    line 67
  5. Distinctive:

    Keep it to what the new session needs.

    line 77
  6. Very specific:

    Write it to a temp file outside the workspace: brief=$(mktemp "${TMPDIR:-/tmp}/cs-brief.XXXXXX").

    line 82
  7. Very specific:

    Add --task "..." lines only for work that is a checklist item on its own.

    line 93

“Common” is measured: kept by at least 6 in 10 of the 65 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

A feature session is a git worktree of this session's repo on its own branch, opened by cs in a window of the cs-owned tmux session. This skill writes the brief and spawns it; the new session reads the brief at its first turn and begins. Landing the work later is /finish <feature> from the base session.

Prerequisites

Only works in a cs session: check that $CLAUDE_SESSION_NAME has a value. If empty, tell the user starting a feature needs a cs session and stop.

The base must be a git repository (git rev-parse --git-dir from the workspace succeeds). A session that is not a repo has no branch to fork; say so and stop.

Resolve the name

The user gives a feature name, optionally with a base: fix-auth or myproj@fix-auth.

  • A name with @ names both halves outright, <base>@<feature>.
  • A bare name is the feature; the base is $CLAUDE_SESSION_NAME. If this session is itself a feature worktree (its name contains @), the base is the part before the @: features fork from the base, never from each other.
  • No name at all: ask for one (AskUserQuestion is fine) before writing anything. Kebab-case, no spaces.

Write the brief

The brief is what the new session has instead of this conversation. Write it from what the user said and what you know, in this shape:

# <feature>

## Goal
One paragraph: what to build and why.

## Done when
- Observable outcomes, each checkable.

## Constraints
- Rules from this conversation the new session cannot see (design
  decisions already made, things rejected, files to leave alone).

## Context
- The base commit the feature forks from (`git rev-parse --short HEAD`)
  and the recent commits or files on it that this work builds on.
- What was tried or measured here that the new session would otherwise
  repeat, with the outcome.

## Review
- What the result must pass before it is sent: the test command, and the
  independent review expected (who runs it, what it checks).

## Report back
When done, send a one-line result to the session that spawned you:
cs -msg <spawner> -k result "<what landed, what is left>"
The base session <base> then lands the work with /finish <feature>.

Every section stays, each heading on its own line, with none under one that has nothing to say: cs -spawn refuses a feature brief that lacks one and names it, so a brief that reached the new session has them all.

<spawner> is $CLAUDE_SESSION_NAME, this session, whatever its name: the result comes back here, to the conversation that asked for the feature. <base> is the repository the feature forks from, and the two differ when this session is itself a feature worktree. cs writes the same recipient into the new session's wake-up line, so the brief and the kick agree.

Keep it to what the new session needs; it has the repo, CLAUDE.md and the session's own docs, so do not repeat those. If the user's request is too thin to write a "Done when", ask one question first rather than inventing outcomes.

Write it to a temp file outside the workspace: brief=$(mktemp "${TMPDIR:-/tmp}/cs-brief.XXXXXX"). The spawner copies it into place, so nothing of yours stays in the session tree.

Spawn

cs -spawn <base>@<feature> --brief "$brief"
rm -f "$brief"

Add --task "..." lines only for work that is a checklist item on its own; the brief already carries the feature. Let the permission prompt on cs -spawn stand: that prompt is the user's confirmation that a worktree, a branch and a window are about to exist. Never work around it.

cs refuses when the name is invalid, the brief lacks one of its sections, tmux is missing, the session is already live, or a pending spawn for the name exists (cs keeps the earlier brief and refuses the new one). A missing section is yours to add; print any other refusal verbatim and stop, and do not retry with a different name on your own.

Report

Print the spawner's output: the tmux window and the attach hint (tmux attach -t cs, or tmux switch-client -t cs from inside tmux). Then tell the user, in one or two lines, that the feature session reads its brief at .cs/brief.md and begins, that its result arrives here as mail from cs -msg, and that /finish <feature> lands it. This session continues with its own work. When the feature is landed, /finish retires its worktree at once, or by itself once the user closes the feature conversation.

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.

Reviews can't be read right now.

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.