Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Dual-Session Story Flow: AI Builder + Read-Only Reviewer

    1

    Build each feature with two separate AI sessions on the tool you already use: one implements in an isolated worktree, one reviews read-only, and a verifier exit code decides when it is done.

    Free

    1 useSecurity scanned
    Dual-Session Story Flow: AI Builder + Read-Only Reviewer

    Dual-Session Story Flow: AI Builder + Read-Only Reviewer

    Example session with this skill installed

    Run story CAN-002 with the dual-session flow.

    • Read your context and instructions
    • Compiled the dual-session story flow

    Summary

    CAN-002 is implemented, verified and independently reviewed in its own worktree. Verdict: PASS. The flow stopped before push; the branch is ready for your review.

    Real run from our install test on a small Python library with AGENT_CLI=codex, lightly trimmed.

    StageResult
    Worktree.agent-worktrees/CAN-002 on branch codex/CAN-002 from main. Main checkout untouched.
    Implementer session (Codex, workspace-write)Added line_count(text) with str.splitlines() semantics and tests/test_lines.py, committed 61c72dd (3 files, +35). Reported checks passed and no unresolved risks.
    Verify before reviewscripts/verify-project.sh exit 0, 5 tests OK.
    Reviewer session (Codex, read-only)Compared the diff with specs/CAN-002.md, reran both acceptance commands, checked empty input and a trailing newline. VERDICT: PASS, no P0, P1 or P2 findings.
    Fix passSkipped: the review passed.
    Final verifyexit 0, VERIFY PASSED 61c72dd.

    Done-when status

    • python3 -m unittest discover -s tests -v passes, including line_count("") == 0, line_count("a") == 1 and line_count("a\nb\n") == 2
    • bash scripts/verify-project.sh exits 0 on codex/CAN-002
    • VERDICT: PASS in .codex-flow/CAN-002/CAN-002-review.md
    • You read the diff, push and open the PR

    Next step

    gh pr create --base main --head codex/CAN-002 --fill
    

    Connects securely to your tools. The creator never sees your data.

    About this skill

    What it does

    The problem. A single AI coding session that writes and reviews its own code agrees with itself. Long review loops burn tokens without converging, and an agent with push rights can ship before you look.

    What the skill does. It starts a fresh implementer session with write access inside a dedicated Git worktree, requires it to commit spec, code and tests, runs your verifier, then starts a separate reviewer session in read-only mode. Works out of the box with Codex CLI (AGENT_CLI=codex), and supports Claude Code (AGENT_CLI=claude), Gemini CLI (AGENT_CLI=gemini), OpenCode (AGENT_CLI=opencode), or IDE sessions in Cursor, Google Antigravity, and Windsurf via --from review. Findings must name severity, file and line, a failure scenario and a minimal fix. At most one fix pass and one re-review follow.

    Why not just prompt for it. The isolation is real: separate processes, separate context windows, read-only review enforcement, a separate worktree, and an exit code as the gate.

    Use it when you use one primary AI coding tool or subscription and still want an independent review on a story with checkable acceptance criteria.

    Known limits.

    • Quota is consumed by two sessions per story, more when a fix pass runs.
    • If the review stage stops (for example on quota) or you implemented the story interactively in an IDE, resume with story.sh <ID> --from review; it skips only the build and reruns verification first.
    • Non-mechanical judgments must be recorded as human gates.

    Which one should I pick?

    • Multi-Agent Story Flow: you have two agent CLIs (for example Claude Code and Codex) and want a different model to review the builder's work. Cross-model review catches blind spots the author model shares with itself.
    • Dual-Session Story Flow (this skill): you use one tool or subscription. It runs an isolated builder session and a separate read-only reviewer session on the same agent, so it is cheaper and simpler to set up.

    Where it fits

    1. Project Setup, once per repository: plan, backlog, verifier
    2. Multi-Agent Story Flow or Dual-Session Story Flow (this skill), once per story: build, verify, independent review
    3. You: read the diff, push, open the PR, merge
    4. Merged Worktree Cleanup, after the merge: remove the worktree and branch

    Get more from every story with Project Setup. Without it, the flow guesses your checks from stack markers. With it, every story comes from a PRD-backed, risk-first epic backlog with acceptance criteria, and a project-owned verifier decides when it is done.

    How to use

    1. Connect your agent to the Agensi MCP and ask for this skill. Keep one shared copy in ~/.agents/skills/dual-session-story-flow: Codex CLI and Gemini CLI read it directly. Point other agents at the same folder instead of making a second copy:

      • Claude Code: ln -sfn ~/.agents/skills/dual-session-story-flow ~/.claude/skills/dual-session-story-flow
      • Cursor: ln -sfn ~/.agents/skills/dual-session-story-flow ~/.cursor/skills/dual-session-story-flow
      • Antigravity: ln -sfn ~/.agents/skills/dual-session-story-flow ~/.gemini/config/skills/dual-session-story-flow
      • Windows: mklink /J "%USERPROFILE%\.claude\skills\dual-session-story-flow" "%USERPROFILE%\.agents\skills\dual-session-story-flow"

      Have the ZIP instead? unzip -o dual-session-story-flow-1.1.1.zip -d ~/.agents/skills/dual-session-story-flow. Keep only this one copy: a second install of the same skill can make the agent pick the wrong one.

    2. Add scripts/verify-project.sh with your real checks.

    3. Write specs/<ID>.md from the bundled template, then run the story (AGENT_CLI=codex by default, or AGENT_CLI=claude|gemini|opencode). The ID must match PREFIX-nnn.

    4. Review the diff, push, open the PR and merge yourself.

    Requirements

    git, bash 3.2+, tee, at least one supported agent CLI (codex, claude, gemini, or opencode), and your project's toolchain. macOS, Linux, or Windows through WSL.

    Changelog

    1.1.1

    • With AGENT_CLI=claude, the builder session now runs headless with scoped permissions: it can edit and commit inside the story worktree, while git push, git merge, git rebase, git reset and gh are denied by Claude Code itself.
    • The Claude reviewer session can read the branch diff and still cannot write.
    • If an agent stops early (for example on a usage limit), the flow says which stage and agent failed and shows the agent's own message.
    • Codex progress is shown as one readable line per step instead of raw JSON.

    1.1.0

    • AGENT_CLI supports codex, claude, gemini and opencode, plus --from review for IDE agents.

    Works best with: Project Setup (verifier and backlog) and Merged Worktree Cleanup (after the merge).

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.

    Runs both sessions on one agent CLI (codex, claude, gemini or opencode); for a different model as reviewer, use Multi-Agent Story Flow. Two sessions per story, more with a fix pass. At most one fix pass and one re-review, then unresolved findings come back to you. If a stage stops (for example on a usage limit), the flow names the stage and the agent's error; resume with story.sh <ID> --from review. Push, PR and merge are always yours.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 15 days ago

    • Free with an Agensi account

    Software
    Git

    Needs one of Codex CLI, Claude Code, Gemini CLI or OpenCode.

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Environment Variables

    File Scopes

    .agent-worktrees/**
    .codex-flow/**
    specs/**

    Network: `git fetch` (skip with `FETCH_BASE=0`), plus your chosen `AGENT_CLI` for the implementer and read-only reviewer sessions. Writes: the worktree at `.agent-worktrees/<ID>` and traces under `.codex-flow/<ID>/`. Never: pushes, opens a pull request, or merges. With `AGENT_CLI=claude`, git push, merge, rebase, reset and gh are denied to the builder.

    Listed1 month ago
    Updated15 days ago

    What's inside

    Frequently Asked Questions

    No. Push, PR creation and merge stay human gates. The implementer may only commit on its isolated story branch.

    No. The worktree helper creates codex/<ID> under .agent-worktrees/<ID> and never switches, resets or cleans your primary checkout.

    The reviewer is a separate process with no write access: with Codex it runs in an explicit read-only sandbox, and with Claude Code it may only read files and run git diff, log, show and status. It starts from the branch diff and inspects related code only to validate findings.

    The implementer gets one fix pass, then verification and one re-review run. Unresolved design decisions come back to you instead of starting an agent-to-agent loop.

    Yes. Set AGENT_CLI=claude and both sessions run on Claude Code: the builder can edit and commit in the story worktree with git push, merge, rebase, reset and gh denied, and the reviewer stays read-only. If you want Claude to build and a different model to review, use Multi-Agent Story Flow.

    Any stack whose checks run as one command that exits non-zero on failure. Before you write scripts/verify-project.sh, Rust, Node.js, Go, Java, Python and .NET projects are detected automatically.

    New in Agents & Orchestration

    Free