All skills
michaelshimeles avatar

/new-feature

Start a new task in an isolated Git worktree branched from origin/main so multiple agents can work on the same repo in parallel without conflicts. Use at the beginning of every new feature, fix, or task — before writing any code.

Use this Skill: https://skilld.dev/gh/michaelshimeles/skills/new-feature

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈61 tokens for metadata: the name and description. ≈634 when used: this file.

Description uses 3.0% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈243 characters, or 3.0%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

New Feature

Every task gets its own worktree and branch, created from the latest origin/main. Never build on main, and never reuse another agent's worktree or branch.

Harness deltas — read first

  • Claude Code: the harness creates and manages worktrees itself (under .claude/worktrees/<name>). Skip steps 3–4 below (no manual git worktree add / remove), and keep the harness-assigned branch name. Steps 1–2 and 5 still apply.
  • Cursor-managed worktrees (branches named worktree-*): same idea — keep the assigned branch and worktree, apply steps 2 and 5.
  • Any other harness: follow all steps.

Steps

  1. Sync: git fetch origin.

  2. Scope check: run gh pr list and skim the open PRs' changed files (gh pr diff <n> --name-only). If your task needs files another open PR is editing, stop and ask for direction instead of proceeding. Also check for uncommitted work in the checkout — another agent may be mid-task.

  3. Name the task: lowercase-with-hyphens plus a short unique suffix, e.g. user-auth-0816a. If git worktree add fails because the name exists, pick a different name — never force or reuse.

  4. Create the worktree from the repo root:

    git worktree add <worktrees-dir>/<task-name> \
      -b <branch-prefix>/<task-name> origin/main

    Use a gitignored directory for worktrees (e.g. .claude/worktrees/ or .worktrees/) so they can never be committed by accident, and a consistent branch prefix (e.g. agent/). Follow the repo's conventions if it defines them.

  5. Enter and verify:

    cd <worktrees-dir>/<task-name>
    git branch --show-current   # must print your new branch, not main

    Then install dependencies fresh inside the worktree (worktrees don't share node_modules/virtualenvs) and confirm the runtime version the repo requires before running anything.

Remember

  • Worktrees do not isolate shared resources: dev-server ports, shared databases, and dependency lockfiles are global. Confirm a port answers your process (lsof -i :<port>) before trusting what it serves, and resolve lockfile conflicts by regenerating, never by hand-merging.

  • Keep the worktree until the PR is merged or closed. Cleanup after merge:

    git worktree remove <worktrees-dir>/<task-name>
    git branch -D <branch-prefix>/<task-name>

    -D is expected: after a squash- or rebase-merge, -d refuses even though the work is merged.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill defines a standard development workflow for managing isolated Git worktrees. It uses legitimate system and development tools including Git and the GitHub CLI.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: MEDIUM · 1 issue

Signed by skilld. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

updated last month

README badge

README badge for michaelshimeles/skills/new-feature