agentleFS
al3rezal3rez/theo-mode/skills/takeover/SKILL.md

takeover

Skill2 starsChanged 3 months agoMITView on GitHub

Take over a PR or branch that is stuck: agents going in circles, scope creep past the original spec, months without landing. Use when the user says "take over this PR", "take over this branch", "this is stuck", "it's been going in circles", "just land it", "start fresh if you have to", or runs /theo-mode takeover. Explicitly allowed to discard existing work.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. PentesterFlow/agent★ 1.4ksame name
    2. oubakiou/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 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.

  • 2

    Very specific

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

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

    Write it in NOTES.md as one or two sentences: "The user wanted X so that Y." If you cannot find it, ask the user for one sentence and stop …

    line 23
  2. Distinctive:

    Default to restart when the branch is more than ~2x the size the spec needs or has been open more than a month.

    line 44
  3. Very specific:

    Verify it the way the repo verifies things.

    line 53
  4. Distinctive:

    Do not try to "fix up" the stuck branch in place.

    line 68
  5. Distinctive:

    Do not expand the spec to cover things the old branch attempted.

    line 70
  6. Distinctive:

    Do not spend the session on the autopsy.

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

Takeover

Goal: the original ask lands on main this session. The existing branch is raw material, not a plan. You are allowed to throw all of it away.

Step 1: recover the actual spec

Stuck work almost always lost the plot. Find the original ask, not the current state of the branch:

  • The first message of the PR or issue. The linked ticket. The first commit message on the branch. A Slack or Notion link if one is referenced.
  • Write it in NOTES.md as one or two sentences: "The user wanted X so that Y." If you cannot find it, ask the user for one sentence and stop until you have it. Everything else is optional.

Step 2: autopsy the branch, fast

Spend at most 15 minutes here. You are looking for two things:

  • Why it stalled. git log --oneline main..branch, review comments, CI history. Usual causes: the spec grew, a flaky test was mistaken for a real failure, a rebase went wrong, two agents fought over one file, a dependency did not exist and got invented.
  • What is salvageable. Usually: a test that captures the intent, one well-scoped commit near the start, a data fixture. Rarely: the last commit.

Name the cause in one sentence. Then decide, and say which:

  • Salvage: cherry-pick the useful commits onto a fresh branch off main.
  • Restart: fresh branch off main, keep only the tests if they express the spec, write everything else again.

Default to restart when the branch is more than ~2x the size the spec needs or has been open more than a month.

Step 3: land the smallest thing that satisfies the spec

  • New branch: takeover/<original-branch-name>.
  • Build the narrowest change that meets the spec from step 1. Anything the old branch did beyond the spec is dropped and listed in the report as "not done, out of scope."
  • Verify it the way the repo verifies things. If the repo has no verification loop, build the minimum one (see /theo-mode:agent-dx) and commit it.
  • Open a new PR. In the body: the spec, the cause of the stall, what was salvaged, what was dropped. Link the old PR.
  • Close the old PR with a comment pointing to the new one. Do not delete the old branch; the user can.

Step 4: report

Old PR, new PR, cause of the stall in one sentence, what was dropped. If the new PR is mergeable and the user gave merge rights, hand off to /theo-mode:let-it-merge.

Do not

  • Do not try to "fix up" the stuck branch in place. That is how it got stuck.
  • Do not expand the spec to cover things the old branch attempted. If those are wanted, they are a new ticket.
  • Do not spend the session on the autopsy. Fifteen minutes, then build.

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.