agentleFS
funky-eyesfunky-eyes/best-copilot/skills/workspace-isolation/SKILL.md

workspace-isolation

Skill12 starsChanged 6 months agoApache-2.0View on GitHub

Use before approved implementation plans or substantial feature/fix work when workspace isolation, branch provenance, setup baseline, or worktree safety must be decided.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this before substantial implementation starts.

    line 8
  2. Distinctive:

    Do not create, remove, or rewrite worktrees as a delegated specialist unless PM explicitly assigned that setup task.

    line 14
  3. Very specific:

    If git-dir and git-common-dir differ and the repo is not a submodule, treat the checkout as already isolated.

    line 25
  4. Distinctive:

    Prefer runtime-native workspace/worktree tools when available.

    line 26
  5. Very specific:

    Prefer an existing ignored .worktrees/ directory.

    line 28
  6. Very specific:

    If no ignored project-local directory exists, return NEEDS_USER_INPUT with options: add an ignored .worktrees/, use a user-named location, …

    line 30
  7. Very specific:

    Run the smallest project setup and baseline checks from .github/instructions/project.instructions.md.

    line 31
  8. Very specific:

    Never add .gitignore, create external directories, or run network-heavy setup unless authorized by PM/top-level flow and tool permissions.

    line 35
  9. Very specific:

    Never delete a worktree here.

    line 36
  10. Distinctive:

    Do not treat a submodule as an isolated worktree.

    line 37
  11. Very specific:

    If sandbox or permissions block isolation, record isolation_status=blocked and continue only if PM chooses work-in-place or stops the task.

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Workspace Isolation

Use this before substantial implementation starts. The goal is to protect the user's current checkout and create baseline evidence without fighting the runtime.

Ownership

  • Top-level session or PM/coordinator owns isolation decisions.
  • Specialists may request this skill through NEEDS_CONTEXT when the packet lacks workspace, branch, or baseline facts.
  • Do not create, remove, or rewrite worktrees as a delegated specialist unless PM explicitly assigned that setup task.

Flow

  1. Detect current state:
    • git rev-parse --show-toplevel
    • git rev-parse --git-dir
    • git rev-parse --git-common-dir
    • git rev-parse --show-superproject-working-tree
    • git branch --show-current
    • git status --short
  2. If git-dir and git-common-dir differ and the repo is not a submodule, treat the checkout as already isolated. Record path, branch or detached state, and skip worktree creation.
  3. Prefer runtime-native workspace/worktree tools when available. Do not use manual git worktree when the host runtime owns isolation.
  4. Manual worktree fallback is allowed only when the user already authorized implementation or isolation and the target directory is safe:
    • Prefer an existing ignored .worktrees/ directory.
    • Otherwise prefer an existing ignored worktrees/ directory.
    • If no ignored project-local directory exists, return NEEDS_USER_INPUT with options: add an ignored .worktrees/, use a user-named location, or work in place.
  5. Run the smallest project setup and baseline checks from .github/instructions/project.instructions.md. If those commands are unknown or fail, report the blocker before implementation.

Safety Rules

  • Never add .gitignore, create external directories, or run network-heavy setup unless authorized by PM/top-level flow and tool permissions.
  • Never delete a worktree here. Cleanup belongs to development-branch-closeout.
  • Do not treat a submodule as an isolated worktree.
  • If sandbox or permissions block isolation, record isolation_status=blocked and continue only if PM chooses work-in-place or stops the task.

Output

Return or record these fields in the PM packet:

  • workspace_path
  • branch_state
  • isolation_status: already_isolated | created | work_in_place | blocked
  • baseline_commands
  • baseline_result
  • next_owner

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.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.