[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6QWJN5GTWK8C2MR0WASNQFV":3,"skill-same:01M6QWJN5GTWK8C2MR0WASNQFV":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":36,"linkOnly":37,"markdownContent":38,"markdownBody":39,"frontMatter":40,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M6QWJN5GTWK8C2MR0WASNQFV","session-crosslink",null,"Use when an agent session ran outside the repo whose commits should record it — e.g. launched from a higher-level folder, a non-Entire repo, or one repo but editing another — to attach the session to each affected Entire-enabled repo's HEAD commit.","entireio\u002Fskills","entireio","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F33188652?v=4","01M6QWH3SDS1SFGPZG68QWNVJJ","Entire","01M6QWH3XNXJ1RQP56F4ED3X02",240,"MIT","https:\u002F\u002Fgithub.com\u002Fentireio\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsession-crosslink\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],"session crosslink","session","record","agent session","when","entire","affected","folder","it","head","commit","but","attach","use","repo","editing","commits","2026-11-10 10:12:30",false,"---\nname: session-crosslink\ndescription: Use when an agent session ran outside the repo whose commits should record it — e.g. launched from a higher-level folder, a non-Entire repo, or one repo but editing another — to attach the session to each affected Entire-enabled repo's HEAD commit.\n---\n\n# Session Crosslink\n\n## Response Format\n\nBegin the first response to this skill invocation with the line:\n\n`Entire Session Crosslink:`\n\nfollowed by a blank line, then the content. Apply the header to the **first response of the invocation only**, not on follow-up turns and not on error \u002F early-exit responses (no session resolved, no affected repos found, a CLI older than 0.11.5, an `unrecognized` plan).\n\n## STOP — Read these rules before doing ANYTHING\n\n1. **Do NOT ask clarifying questions until the resolver\u002Fdiscovery steps have run.** The session id and candidate repo list usually resolve from `entire session current --json` plus what the user said. Only ask if both come back empty.\n2. **Do NOT run `entire session attach --force` without showing the preview table first.** The whole point of this skill is preview-then-confirm. `attach` can amend the target repo's HEAD; previewing wrong means amending the wrong commit.\n3. **Always `cd` into the target repo before running `entire session attach`.** The CLI resolves the repo from cwd. Use one `cd … && GIT_TERMINAL_PROMPT=0 entire session attach …` per call so each invocation hits the right repo.\n4. **Run every `entire session attach` with `GIT_TERMINAL_PROMPT=0`, and stop on output you don't recognize.** Some agents run shell commands in a pseudo-terminal, where attach without `--force` asks `Continue?` and waits instead of printing its plan. `GIT_TERMINAL_PROMPT=0` tells the CLI not to prompt. If a preview matches none of the shapes in Step 3, or attach prompts anyway, stop: answer nothing, run no `--force` in any repo, and show the user what attach printed.\n\nRequired CLI: `entire` 0.11.5+, for the `resolution` field of `entire session current --json` and for `entire session attach` printing its plan without changing anything until `--force`. The flow checks the version first. The plan shapes in Step 3 match 0.12.2 and the 0.12.3 nightly of 2026-11-05.\n\n## Flow\n\nRun `entire version` first. If it reports a version older than 0.11.5, stop and ask the user to upgrade: those releases write the checkpoint as soon as attach runs, before asking anything, so the Step 3 preview would attach the session everywhere without the user's go-ahead. If you can't tell the version, ask the user before running attach.\n\n### Step 1: Resolve the session id\n\nTry each strategy in order until one returns a session id.\n\n**Strategy A: Entire-enabled cwd.**\n\n```bash\nentire session current --json\n```\n\nIf the output is valid JSON **and** has a non-empty `session_id`, check `resolution` before using it. Attach acts on the session, so the session must be this agent's own:\n\n- `caller-env` or `ancestry` → it is this agent's session. Read `session_id` and `agent` and continue.\n- `worktree` or `caller-ambiguous` → it is a guess (the most recent session here, or one of several claimants). Continue only if the user confirms it, and label it as inferred in the Step 4 preview table.\n- `other-worktree` → it belongs to another worktree. Treat Strategy A as failed and fall through to B.\n\nIf the JSON parses but `session_id` is missing or empty, treat Strategy A as failed and fall through to B — don't proceed to attach with no session id.\n\nWith `--json`, a missing session prints nothing on stdout and exits non-zero. Outside a git repository, stderr only says `not a git repository`: fall through to B. When this agent's own session is not tracked, stderr says `This command is running inside \u003Cagent> session \u003Cid>, but Entire has no session state for it.` That `\u003Cid>` is this session's id and is exactly what `entire session attach` needs. If stderr instead says several sessions claim the command, do not pick one: fall through to B.\n\n**Strategy B: Entire-enabled repo the user named.** If the user named a repo, or a folder of repos, `cd` into one of those repos that has a `.entire\u002Fsettings.json` and rerun `entire session current --json`. Read the result with Strategy A's rules, including the stderr line: inside a repo, the CLI can name the calling session even when it has no state for it. The session state lives wherever the session was tracked.\n\n**Strategy C: Runtime-specific transcript directory.** If neither A nor B works, the session was never recorded by Entire and you must read it from the agent runtime:\n\n- **Claude Code:** transcripts live at `~\u002F.claude\u002Fprojects\u002F\u003Cencoded-cwd>\u002F\u003Csession-id>.jsonl`. Encoded cwd is the launch directory with `\u002F` → `-`. The most recent `.jsonl` file directly in the project directory matching the agent's launch cwd is this session; skip subfolders such as `\u003Csession-id>\u002Fsubagents\u002F`, which hold subagent transcripts. Read the basename minus `.jsonl` as `session_id`. Set `agent` to `claude-code`.\n- **Codex:** check `$CODEX_HOME\u002Fsessions\u002F` or `~\u002F.codex\u002Fsessions\u002F`. Set `agent` to `codex`.\n- **Other runtimes:** ask the user for the session id.\n\nRecord `agent` as the CLI's name for the agent, so Steps 3 and 5 can pass `--agent \u003Cname>` to attach. The JSON `agent` field and the stderr line both give a display name, so convert it (`Claude Code` → `claude-code`, `Codex` → `codex`; `entire agent list` shows the names). attach rejects a display name such as `--agent \"Claude Code\"`.\n\n**If all strategies fail:** print \"Could not resolve a session id — pass one explicitly or run from an Entire-enabled directory\" and stop.\n\n### Step 2: Discover affected repos\n\nBuild a candidate set from these sources, then de-duplicate by path:\n\n1. **From the user's message**: any repo paths or aliases the user named explicitly (e.g. \"the foo repo and the bar api\"). Resolve aliases via the user's `CLAUDE.md` or treat as filesystem paths. A folder the user named counts as naming each repo directly inside it.\n\n2. **From sibling repos under the launch directory** (only if launch dir is NOT Entire-enabled): list immediate subdirectories that have their own `.git` (a directory, or a file in a linked worktree) and a `.entire\u002Fsettings.json`.\n\n3. **From the agent's edit history in this session**: any repo whose files were edited during the session — derive from the agent's own context. If unsure, ask the user.\n\nIf the user named any repo or folder, the candidates are source 1 only. Sources 2 and 3 can turn up repos the user didn't mean, such as an unrelated repo that sits in the launch directory: list those under the Step 4 table as also found, and preview or attach one only if the user adds it. If the user named nothing, use sources 2 and 3.\n\nFor each candidate, run `entire status --json` (with cwd inside that repo) and decide:\n\n- `\"enabled\": true` → keep.\n- `\"enabled\": false` with a settings-parse error (`unknown field \"...\"`) → keep. Status fails noisily on misconfigured local settings even when attach would succeed.\n- `\"enabled\": false` with any other error, such as `not set up`, or with no error → drop. Entire isn't set up there, or the repo opted out.\n\nIf the candidate set is empty, ask the user which repos to crosslink.\n\n### Step 3: Ask attach for its plan\n\n`entire session attach` previews itself. Run it **without** `--force` in each candidate repo:\n\n```bash\ncd \"\u003Crepo>\" && GIT_TERMINAL_PROMPT=0 entire session attach \u003Csession-id> --agent \u003Cagent>\n```\n\nIn PowerShell, set the variable in the same command: `$env:GIT_TERMINAL_PROMPT = '0'; entire session attach …`. With prompts off, attach prints what it would do, adds `Nothing was changed. This needs the user's go-ahead…`, and exits 1 without touching the repo. To check whether the commit is pushed, the preview fetches the repo's remotes.\n\nKeep each repo's exit status and output, then classify it in two passes. Match each fragment below exactly as written, with `\u003C…>` standing for any value, rather than attach's whole sentences. Don't shorten a fragment: a trailer plan also says `It isn't on origin.`, and only the full `would_push_existing` fragment keeps the two apart. Read stdout and stderr together, since a harness with a terminal may merge them.\n\n**Pass 1: outcome.**\n\n| Exit | Output contains | Outcome |\n|---|---|---|\n| non-zero | a line with both `Nothing was changed` and `--force` | preview: classify it in pass 2 |\n| non-zero | no such line | `error: \u003Creason>` |\n| 0 | `is already in checkpoint \u003Ccheckpoint> on commit \u003Chash>` | `already_linked`: nothing to do |\n| 0 | `Entire is disabled` | `error: Entire is disabled` |\n| 0 | anything else | `unrecognized` |\n\nAn error means attach refused, for example `repository has no commits yet`, merges after the commit, a rebase or merge in progress, or a remote it couldn't reach to confirm the commit is unpushed. Use a short form of attach's message as the reason, such as `error: no commits yet`, and keep the full message for the user.\n\n**Pass 2: plan.** A preview must match exactly one action fragment and exactly one transcript fragment.\n\n| Action | Fragment |\n|---|---|\n| `would_add_trailer` | `goes into a new checkpoint linked by that trailer` |\n| `would_link_existing` | `Adds session \u003Cid> to checkpoint \u003Ccheckpoint>, which commit` … `already has` |\n| `would_link_pushed` | `is already pushed to \u003Cremote>, so it won't be changed` |\n| `would_push_existing` | `which holds session \u003Cid>, isn't on \u003Cremote> yet` |\n\n| Transcript | Fragment |\n|---|---|\n| `now, to \u003Cremote>` | `are pushed to \u003Cremote> now` |\n| `on next git push` | `is pushed with your next git push` |\n| `held` | `stays on this machine until you upload it with 'entire checkpoint push'` |\n\n- **`would_add_trailer`**: attach adds an `Entire-Checkpoint` trailer to an unpushed commit, which rewrites that commit and any later commits on the branch; the plan lists them.\n- **`would_link_existing`**: the commit already has a checkpoint. Attach adds the session to it and leaves git history unchanged. Record that checkpoint ID.\n- **`would_link_pushed`**: the commit is already pushed, so attach leaves it unchanged and records the link in a new checkpoint. If the plan adds `A recorded link counts only when the commit's author attaches it.`, say so in the table.\n- **`would_push_existing`**: an earlier attach linked the session but didn't push the checkpoint; `--force` only pushes it.\n\nThe transcript column tells the user what leaves the machine, and when. `now, to \u003Cremote>` pushes every pending checkpoint in that repo, not only this one. `held` comes from the manual checkpoint push policy in CLI releases after 0.12.2: the checkpoint stays on the machine until the user runs `entire checkpoint push`. An `already_linked` repo whose output says `is waiting; upload it with: entire checkpoint push` is held the same way.\n\n**Anything else is `unrecognized`:** a preview that matches no action or transcript fragment, or more than one, and any exit-0 output not listed in pass 1. The CLI has probably reworded its plan. Stop: run no `--force` in any repo, show the user what attach printed for that repo, and ask them to check it or run attach themselves. Don't infer a plan from a partial match.\n\nShow the plan's other lines to the user as printed, such as notes on signed commits, branches that keep the old commits, or `Only the turns since checkpoint … are recorded`. If attach warns `no user prompts were parsed from this transcript`, the session id or `--agent` is probably wrong: stop and ask the user. Other warnings, such as `the session has no new turns since checkpoint …`, go in the preview. A session can be attached to several commits; each checkpoint records the turns since the previous one.\n\n### Step 4: Render the preview table\n\nIf any repo is `unrecognized`, skip the table and the question: stop as Step 3 says.\n\nOtherwise show the user a compact table:\n\n```\nrepo   commit        action                 checkpoint                  transcript pushed\nfoo    a1b2c3d4e5f6  would_add_trailer      (new)                       on next git push\nbar    e4f5a6b7c8d9  would_link_existing    01JZ8Q4K2M7N3P5R6S9T0V1W2X  now, to origin\nweb    9c8d7e6f5a4b  would_link_pushed      (new)                       now, to origin\nops    5d4c3b2a1f0e  would_link_pushed      (new)                       held: entire checkpoint push\nqux    b7c8d9e0f1a2  already_linked         01JZ8Q9D3F4G5H6J7K8M9N0P1Q  -\nbaz    -             error: no commits yet  -                           -\n```\n\nUse the 12-character commit hash and the full checkpoint ID that attach prints.\n\nUnder the table, quote each `would_*` repo's plan exactly as attach printed it, leaving out the final `Nothing was changed…` line, so the user approves attach's own words rather than a summary of them. Then list the candidates you dropped in Step 2 with the reason (for example `docs: Entire not set up`), and any repos Step 2 found outside the user's scope.\n\nThen ask: \"Attach session `\u003Cid>` to the would_* rows? `already_linked` and error rows will be skipped.\"\n\n### Step 5: Execute on confirmation\n\nFor each row the user confirmed where `action` starts with `would_`:\n\n```bash\ncd \"\u003Crepo>\" && GIT_TERMINAL_PROMPT=0 entire session attach \u003Csession-id> --agent \u003Cagent> --force\n```\n\nSkip `already_linked` and `error:` rows.\n\nThen rerun the Step 3 preview command in each attached repo. It should exit 0 with `is already in checkpoint \u003Ccheckpoint>`, which gives the checkpoint ID for the summary. For an `on next git push` row, that checkpoint stays on the machine until the user pushes. For a `would_add_trailer` row, also confirm that the rewritten HEAD carries the trailer:\n\n```bash\ncd \"\u003Crepo>\" && git log -1 --format='%(trailers:key=Entire-Checkpoint,valueonly)'\n```\n\nIf the rerun previews `would_push_existing` instead, attach wrote the checkpoint but couldn't push it; a `--force` that exits 1 with `was written locally but did not reach \u003Cremote>` ends this way. Report it, and push with `--force` again only if the user agrees. Report any other result as attach printed it.\n\nReport a final summary:\n\n```\nattached:\n  foo    01JZ8QB2C3D4E5F6G7H8J9K0M1  (new trailer; a1b2c3d4e5f6 is now 0e115e3e04bb)\n  bar    01JZ8Q4K2M7N3P5R6S9T0V1W2X  (added to existing checkpoint on e4f5a6b7c8d9)\n  web    01JZ8QD6E7F8G9H0J1K2M3N4P5  (link recorded; pushed commit unchanged)\n  ops    01JZ8QC5D6E7F8G9H0J1K2M3N4  (link recorded; held until entire checkpoint push)\nskipped:\n  baz    (no commits yet)\n  qux    (already linked: 01JZ8Q9D3F4G5H6J7K8M9N0P1Q)\n```\n\nAttach only rewrites unpushed commits (`would_add_trailer` rows), so a normal `git push` publishes them. Remind the user that those repos have new commit hashes for the rewritten commits; `would_link_existing` and `would_link_pushed` rows changed no history.\n\n## Failure modes\n\n- **Session id not resolvable**: stop with a one-line message — see Step 1.\n- **No candidate repos**: ask the user which repos to crosslink.\n- **All candidates report `already_linked`**: tell the user the session is already linked everywhere; no work to do.\n- **`entire version` is older than 0.11.5**: stop before Step 1 and ask the user to upgrade.\n- **A preview is `unrecognized`**: stop before any `--force` and show the user what attach printed (Step 3).\n- **attach asks `Continue?` or doesn't return**: don't answer it. Stop the command and the skill, and tell the user. With `GIT_TERMINAL_PROMPT=0` set, attach doesn't prompt.\n- **A repo's `attach` fails mid-run after others succeeded**: do not retry automatically. Report which repos succeeded vs failed and surface the failing repo's stderr. Re-running the skill is safe: repos that already hold the session report `already_linked`.\n- **HEAD has no commits in a candidate**: skip that row with `error: no commits yet`. Tell the user to make at least one commit there first.\n- **Attach can't confirm the commit is unpushed** (remote unreachable): skip that row with the error; tell the user to retry when the remote is reachable. The preview fetches each remote, so in a sandbox without network access (for example Codex), run attach outside the sandbox.\n- **attach prints `Entire is disabled` and exits 0**: the target repo opted out. Tell the user; don't retry.\n\n## Why this skill exists\n\nEntire tracks agent sessions per repo via state stored under each repo's git common dir. When an agent runs from a higher-level folder, a sibling repo, or a non-Entire-enabled parent, none of the child repos see the session. This skill resolves the session id from the agent runtime (which always has it), discovers affected repos, previews each with attach's own plan, then runs `entire session attach --force` per repo on confirmation, without rewriting the wrong commit or asking the user to babysit per-repo `cd`s.\n","# Session Crosslink\n\n## Response Format\n\nBegin the first response to this skill invocation with the line:\n\n`Entire Session Crosslink:`\n\nfollowed by a blank line, then the content. Apply the header to the **first response of the invocation only**, not on follow-up turns and not on error \u002F early-exit responses (no session resolved, no affected repos found, a CLI older than 0.11.5, an `unrecognized` plan).\n\n## STOP — Read these rules before doing ANYTHING\n\n1. **Do NOT ask clarifying questions until the resolver\u002Fdiscovery steps have run.** The session id and candidate repo list usually resolve from `entire session current --json` plus what the user said. Only ask if both come back empty.\n2. **Do NOT run `entire session attach --force` without showing the preview table first.** The whole point of this skill is preview-then-confirm. `attach` can amend the target repo's HEAD; previewing wrong means amending the wrong commit.\n3. **Always `cd` into the target repo before running `entire session attach`.** The CLI resolves the repo from cwd. Use one `cd … && GIT_TERMINAL_PROMPT=0 entire session attach …` per call so each invocation hits the right repo.\n4. **Run every `entire session attach` with `GIT_TERMINAL_PROMPT=0`, and stop on output you don't recognize.** Some agents run shell commands in a pseudo-terminal, where attach without `--force` asks `Continue?` and waits instead of printing its plan. `GIT_TERMINAL_PROMPT=0` tells the CLI not to prompt. If a preview matches none of the shapes in Step 3, or attach prompts anyway, stop: answer nothing, run no `--force` in any repo, and show the user what attach printed.\n\nRequired CLI: `entire` 0.11.5+, for the `resolution` field of `entire session current --json` and for `entire session attach` printing its plan without changing anything until `--force`. The flow checks the version first. The plan shapes in Step 3 match 0.12.2 and the 0.12.3 nightly of 2026-11-05.\n\n## Flow\n\nRun `entire version` first. If it reports a version older than 0.11.5, stop and ask the user to upgrade: those releases write the checkpoint as soon as attach runs, before asking anything, so the Step 3 preview would attach the session everywhere without the user's go-ahead. If you can't tell the version, ask the user before running attach.\n\n### Step 1: Resolve the session id\n\nTry each strategy in order until one returns a session id.\n\n**Strategy A: Entire-enabled cwd.**\n\n```bash\nentire session current --json\n```\n\nIf the output is valid JSON **and** has a non-empty `session_id`, check `resolution` before using it. Attach acts on the session, so the session must be this agent's own:\n\n- `caller-env` or `ancestry` → it is this agent's session. Read `session_id` and `agent` and continue.\n- `worktree` or `caller-ambiguous` → it is a guess (the most recent session here, or one of several claimants). Continue only if the user confirms it, and label it as inferred in the Step 4 preview table.\n- `other-worktree` → it belongs to another worktree. Treat Strategy A as failed and fall through to B.\n\nIf the JSON parses but `session_id` is missing or empty, treat Strategy A as failed and fall through to B — don't proceed to attach with no session id.\n\nWith `--json`, a missing session prints nothing on stdout and exits non-zero. Outside a git repository, stderr only says `not a git repository`: fall through to B. When this agent's own session is not tracked, stderr says `This command is running inside \u003Cagent> session \u003Cid>, but Entire has no session state for it.` That `\u003Cid>` is this session's id and is exactly what `entire session attach` needs. If stderr instead says several sessions claim the command, do not pick one: fall through to B.\n\n**Strategy B: Entire-enabled repo the user named.** If the user named a repo, or a folder of repos, `cd` into one of those repos that has a `.entire\u002Fsettings.json` and rerun `entire session current --json`. Read the result with Strategy A's rules, including the stderr line: inside a repo, the CLI can name the calling session even when it has no state for it. The session state lives wherever the session was tracked.\n\n**Strategy C: Runtime-specific transcript directory.** If neither A nor B works, the session was never recorded by Entire and you must read it from the agent runtime:\n\n- **Claude Code:** transcripts live at `~\u002F.claude\u002Fprojects\u002F\u003Cencoded-cwd>\u002F\u003Csession-id>.jsonl`. Encoded cwd is the launch directory with `\u002F` → `-`. The most recent `.jsonl` file directly in the project directory matching the agent's launch cwd is this session; skip subfolders such as `\u003Csession-id>\u002Fsubagents\u002F`, which hold subagent transcripts. Read the basename minus `.jsonl` as `session_id`. Set `agent` to `claude-code`.\n- **Codex:** check `$CODEX_HOME\u002Fsessions\u002F` or `~\u002F.codex\u002Fsessions\u002F`. Set `agent` to `codex`.\n- **Other runtimes:** ask the user for the session id.\n\nRecord `agent` as the CLI's name for the agent, so Steps 3 and 5 can pass `--agent \u003Cname>` to attach. The JSON `agent` field and the stderr line both give a display name, so convert it (`Claude Code` → `claude-code`, `Codex` → `codex`; `entire agent list` shows the names). attach rejects a display name such as `--agent \"Claude Code\"`.\n\n**If all strategies fail:** print \"Could not resolve a session id — pass one explicitly or run from an Entire-enabled directory\" and stop.\n\n### Step 2: Discover affected repos\n\nBuild a candidate set from these sources, then de-duplicate by path:\n\n1. **From the user's message**: any repo paths or aliases the user named explicitly (e.g. \"the foo repo and the bar api\"). Resolve aliases via the user's `CLAUDE.md` or treat as filesystem paths. A folder the user named counts as naming each repo directly inside it.\n\n2. **From sibling repos under the launch directory** (only if launch dir is NOT Entire-enabled): list immediate subdirectories that have their own `.git` (a directory, or a file in a linked worktree) and a `.entire\u002Fsettings.json`.\n\n3. **From the agent's edit history in this session**: any repo whose files were edited during the session — derive from the agent's own context. If unsure, ask the user.\n\nIf the user named any repo or folder, the candidates are source 1 only. Sources 2 and 3 can turn up repos the user didn't mean, such as an unrelated repo that sits in the launch directory: list those under the Step 4 table as also found, and preview or attach one only if the user adds it. If the user named nothing, use sources 2 and 3.\n\nFor each candidate, run `entire status --json` (with cwd inside that repo) and decide:\n\n- `\"enabled\": true` → keep.\n- `\"enabled\": false` with a settings-parse error (`unknown field \"...\"`) → keep. Status fails noisily on misconfigured local settings even when attach would succeed.\n- `\"enabled\": false` with any other error, such as `not set up`, or with no error → drop. Entire isn't set up there, or the repo opted out.\n\nIf the candidate set is empty, ask the user which repos to crosslink.\n\n### Step 3: Ask attach for its plan\n\n`entire session attach` previews itself. Run it **without** `--force` in each candidate repo:\n\n```bash\ncd \"\u003Crepo>\" && GIT_TERMINAL_PROMPT=0 entire session attach \u003Csession-id> --agent \u003Cagent>\n```\n\nIn PowerShell, set the variable in the same command: `$env:GIT_TERMINAL_PROMPT = '0'; entire session attach …`. With prompts off, attach prints what it would do, adds `Nothing was changed. This needs the user's go-ahead…`, and exits 1 without touching the repo. To check whether the commit is pushed, the preview fetches the repo's remotes.\n\nKeep each repo's exit status and output, then classify it in two passes. Match each fragment below exactly as written, with `\u003C…>` standing for any value, rather than attach's whole sentences. Don't shorten a fragment: a trailer plan also says `It isn't on origin.`, and only the full `would_push_existing` fragment keeps the two apart. Read stdout and stderr together, since a harness with a terminal may merge them.\n\n**Pass 1: outcome.**\n\n| Exit | Output contains | Outcome |\n|---|---|---|\n| non-zero | a line with both `Nothing was changed` and `--force` | preview: classify it in pass 2 |\n| non-zero | no such line | `error: \u003Creason>` |\n| 0 | `is already in checkpoint \u003Ccheckpoint> on commit \u003Chash>` | `already_linked`: nothing to do |\n| 0 | `Entire is disabled` | `error: Entire is disabled` |\n| 0 | anything else | `unrecognized` |\n\nAn error means attach refused, for example `repository has no commits yet`, merges after the commit, a rebase or merge in progress, or a remote it couldn't reach to confirm the commit is unpushed. Use a short form of attach's message as the reason, such as `error: no commits yet`, and keep the full message for the user.\n\n**Pass 2: plan.** A preview must match exactly one action fragment and exactly one transcript fragment.\n\n| Action | Fragment |\n|---|---|\n| `would_add_trailer` | `goes into a new checkpoint linked by that trailer` |\n| `would_link_existing` | `Adds session \u003Cid> to checkpoint \u003Ccheckpoint>, which commit` … `already has` |\n| `would_link_pushed` | `is already pushed to \u003Cremote>, so it won't be changed` |\n| `would_push_existing` | `which holds session \u003Cid>, isn't on \u003Cremote> yet` |\n\n| Transcript | Fragment |\n|---|---|\n| `now, to \u003Cremote>` | `are pushed to \u003Cremote> now` |\n| `on next git push` | `is pushed with your next git push` |\n| `held` | `stays on this machine until you upload it with 'entire checkpoint push'` |\n\n- **`would_add_trailer`**: attach adds an `Entire-Checkpoint` trailer to an unpushed commit, which rewrites that commit and any later commits on the branch; the plan lists them.\n- **`would_link_existing`**: the commit already has a checkpoint. Attach adds the session to it and leaves git history unchanged. Record that checkpoint ID.\n- **`would_link_pushed`**: the commit is already pushed, so attach leaves it unchanged and records the link in a new checkpoint. If the plan adds `A recorded link counts only when the commit's author attaches it.`, say so in the table.\n- **`would_push_existing`**: an earlier attach linked the session but didn't push the checkpoint; `--force` only pushes it.\n\nThe transcript column tells the user what leaves the machine, and when. `now, to \u003Cremote>` pushes every pending checkpoint in that repo, not only this one. `held` comes from the manual checkpoint push policy in CLI releases after 0.12.2: the checkpoint stays on the machine until the user runs `entire checkpoint push`. An `already_linked` repo whose output says `is waiting; upload it with: entire checkpoint push` is held the same way.\n\n**Anything else is `unrecognized`:** a preview that matches no action or transcript fragment, or more than one, and any exit-0 output not listed in pass 1. The CLI has probably reworded its plan. Stop: run no `--force` in any repo, show the user what attach printed for that repo, and ask them to check it or run attach themselves. Don't infer a plan from a partial match.\n\nShow the plan's other lines to the user as printed, such as notes on signed commits, branches that keep the old commits, or `Only the turns since checkpoint … are recorded`. If attach warns `no user prompts were parsed from this transcript`, the session id or `--agent` is probably wrong: stop and ask the user. Other warnings, such as `the session has no new turns since checkpoint …`, go in the preview. A session can be attached to several commits; each checkpoint records the turns since the previous one.\n\n### Step 4: Render the preview table\n\nIf any repo is `unrecognized`, skip the table and the question: stop as Step 3 says.\n\nOtherwise show the user a compact table:\n\n```\nrepo   commit        action                 checkpoint                  transcript pushed\nfoo    a1b2c3d4e5f6  would_add_trailer      (new)                       on next git push\nbar    e4f5a6b7c8d9  would_link_existing    01JZ8Q4K2M7N3P5R6S9T0V1W2X  now, to origin\nweb    9c8d7e6f5a4b  would_link_pushed      (new)                       now, to origin\nops    5d4c3b2a1f0e  would_link_pushed      (new)                       held: entire checkpoint push\nqux    b7c8d9e0f1a2  already_linked         01JZ8Q9D3F4G5H6J7K8M9N0P1Q  -\nbaz    -             error: no commits yet  -                           -\n```\n\nUse the 12-character commit hash and the full checkpoint ID that attach prints.\n\nUnder the table, quote each `would_*` repo's plan exactly as attach printed it, leaving out the final `Nothing was changed…` line, so the user approves attach's own words rather than a summary of them. Then list the candidates you dropped in Step 2 with the reason (for example `docs: Entire not set up`), and any repos Step 2 found outside the user's scope.\n\nThen ask: \"Attach session `\u003Cid>` to the would_* rows? `already_linked` and error rows will be skipped.\"\n\n### Step 5: Execute on confirmation\n\nFor each row the user confirmed where `action` starts with `would_`:\n\n```bash\ncd \"\u003Crepo>\" && GIT_TERMINAL_PROMPT=0 entire session attach \u003Csession-id> --agent \u003Cagent> --force\n```\n\nSkip `already_linked` and `error:` rows.\n\nThen rerun the Step 3 preview command in each attached repo. It should exit 0 with `is already in checkpoint \u003Ccheckpoint>`, which gives the checkpoint ID for the summary. For an `on next git push` row, that checkpoint stays on the machine until the user pushes. For a `would_add_trailer` row, also confirm that the rewritten HEAD carries the trailer:\n\n```bash\ncd \"\u003Crepo>\" && git log -1 --format='%(trailers:key=Entire-Checkpoint,valueonly)'\n```\n\nIf the rerun previews `would_push_existing` instead, attach wrote the checkpoint but couldn't push it; a `--force` that exits 1 with `was written locally but did not reach \u003Cremote>` ends this way. Report it, and push with `--force` again only if the user agrees. Report any other result as attach printed it.\n\nReport a final summary:\n\n```\nattached:\n  foo    01JZ8QB2C3D4E5F6G7H8J9K0M1  (new trailer; a1b2c3d4e5f6 is now 0e115e3e04bb)\n  bar    01JZ8Q4K2M7N3P5R6S9T0V1W2X  (added to existing checkpoint on e4f5a6b7c8d9)\n  web    01JZ8QD6E7F8G9H0J1K2M3N4P5  (link recorded; pushed commit unchanged)\n  ops    01JZ8QC5D6E7F8G9H0J1K2M3N4  (link recorded; held until entire checkpoint push)\nskipped:\n  baz    (no commits yet)\n  qux    (already linked: 01JZ8Q9D3F4G5H6J7K8M9N0P1Q)\n```\n\nAttach only rewrites unpushed commits (`would_add_trailer` rows), so a normal `git push` publishes them. Remind the user that those repos have new commit hashes for the rewritten commits; `would_link_existing` and `would_link_pushed` rows changed no history.\n\n## Failure modes\n\n- **Session id not resolvable**: stop with a one-line message — see Step 1.\n- **No candidate repos**: ask the user which repos to crosslink.\n- **All candidates report `already_linked`**: tell the user the session is already linked everywhere; no work to do.\n- **`entire version` is older than 0.11.5**: stop before Step 1 and ask the user to upgrade.\n- **A preview is `unrecognized`**: stop before any `--force` and show the user what attach printed (Step 3).\n- **attach asks `Continue?` or doesn't return**: don't answer it. Stop the command and the skill, and tell the user. With `GIT_TERMINAL_PROMPT=0` set, attach doesn't prompt.\n- **A repo's `attach` fails mid-run after others succeeded**: do not retry automatically. Report which repos succeeded vs failed and surface the failing repo's stderr. Re-running the skill is safe: repos that already hold the session report `already_linked`.\n- **HEAD has no commits in a candidate**: skip that row with `error: no commits yet`. Tell the user to make at least one commit there first.\n- **Attach can't confirm the commit is unpushed** (remote unreachable): skip that row with the error; tell the user to retry when the remote is reachable. The preview fetches each remote, so in a sandbox without network access (for example Codex), run attach outside the sandbox.\n- **attach prints `Entire is disabled` and exits 0**: the target repo opted out. Tell the user; don't retry.\n\n## Why this skill exists\n\nEntire tracks agent sessions per repo via state stored under each repo's git common dir. When an agent runs from a higher-level folder, a sibling repo, or a non-Entire-enabled parent, none of the child repos see the session. This skill resolves the session id from the agent runtime (which always has it), discovers affected repos, previews each with attach's own plan, then runs `entire session attach --force` per repo on confirmation, without rewriting the wrong commit or asking the user to babysit per-repo `cd`s.\n",{"name":5,"description":7},"main","11902e22deddf7b867ea1cf958c0220288be4d63","skills\u002Fsession-crosslink",28,"https:\u002F\u002Fgithub.com\u002Fentireio\u002Fskills","https:\u002F\u002Fgithub.com\u002Fentireio","https:\u002F\u002Fentire.com","Entire is a new developer platform that hooks into your git workflow to capture AI agent sessions on every push, unifying your code with its context.","2026-11-06 16:47:12",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add entireio\u002Fskills --skill session-crosslink",{"tool":56,"command":57},"bunx","bunx skills add entireio\u002Fskills --skill session-crosslink",{"tool":59,"command":60},"pnpm","pnpm dlx skills add entireio\u002Fskills --skill session-crosslink","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fentireio\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsession-crosslink\u002FSKILL.md",true,[],[65,89,114,131,146,158],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":36},"01M6QWM43GA0T47XSNVRY56WCW","what-happened","Explain why code looks the way it does by tracing the latest change for a file range or pasted snippet through `git blame` and deduplicated `entire checkpoint explain` lookups. Use when the user asks what happened, says \"tell me why\" about a code block, is confused about a section of code, asks \"wtf is going on\", \"why is this like this\", \"why was this changed\", or wants provenance for a specific file block.","https:\u002F\u002Fgithub.com\u002Fentireio\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwhat-happened\u002FSKILL.md",[],[72,73,74,75,76,77,78,79,80,81,32,82,83,27,84,85,86,87,88,24],"what happened","change","code","git","file","tracing","provenance","checkpoint","why","explain","wtf","me","about","block","latest","for","section",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":36},"01M6QWKMSXMQQ36WXXKBRP1N25","using-entire","Use as the FIRST action on any research, investigation, or codebase-understanding request — \"research X\", \"investigate X\", \"look into X\", \"dig into X\", \"search X\", \"explore X\", \"understand X\", \"why is this like this\" — before Glob, Grep, or Read. Recorded intent lives in Entire checkpoints on the server, not in local files, so an empty or unfamiliar working copy is not a reason to skip it. Routes to the right Entire sub-skill (search, recall, explain, what-happened, replay, teach, review, session-handoff).","https:\u002F\u002Fgithub.com\u002Fentireio\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fusing-entire\u002FSKILL.md",[],[24,96,97,98,99,100,80,101,102,103,104,105,106,107,108,109,110,111,112,113],"using entire","review","handoff","search","server","explore","read","files","intent","search x","local","as","session-handoff","codebase-understanding","checkpoints","action","request","local files",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":36},"01M6QWKENQ1293P0Y05RR4DNKD","teach","Use when a developer wants a topic-focused guided lesson built from canonical checkpoints, not a whole-repo overview. Triggers on phrases like \"teach me \u003Ctopic>\", \"teach me how this repo handles\", \"how does \u003Ctopic> work in this repo\", \"give me a lesson on\", \"school me on\", and \"I need to learn about\"","https:\u002F\u002Fgithub.com\u002Fentireio\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fteach\u002FSKILL.md",[],[116,121,122,123,124,125,33,126,32,127,83,128,84,129,110,130,23],"learn","developer","how","teach me","work","overview","lesson","triggers","canonical","school",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":36},"01M6QWK8VB54WP2H9PJC3PQ7PX","session-to-skill","Use when the user wants to turn one or more Entire-tracked sessions, checkpoints, or repeated agent workflows into a reusable agent skill.","https:\u002F\u002Fgithub.com\u002Fentireio\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsession-to-skill\u002FSKILL.md",[],[20,138,139,140,141,32,142,143,144,110,145,24,23],"session to skill","workflows","sessions","user","reusable","agent skill","agent workflows","more",{"skillNo":147,"name":108,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":36},"01M6QWJSJ02VPZ4HHX71QMG5V1","Use when the user wants to continue work from one agent in another agent, inspect recent sessions, or summarize a saved session or checkpoint for handoff","https:\u002F\u002Fgithub.com\u002Fentireio\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsession-handoff\u002FSKILL.md",[],[98,152,20,153,140,79,154,125,141,32,155,156,157,87,23],"session handoff","summarize","continue","continue work","saved","inspect",{"skillNo":159,"name":99,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":36},"01M6QWJHAAEM30G2KG1MMKEEN0","Use when the user asks to research, investigate, look into, dig into, or search for anything — a topic, feature, bug, decision, or \"what do we know about X\". Invoke this as the FIRST action on such requests, before Glob, Grep, or Read: the answer is in Entire's recorded history (prompts, transcripts, and decisions, across repos), not in the local files, and a working copy that looks empty or unfamiliar is not a reason to skip it. Also use to find code across repositories (\"where is X implemented in our other repos\"). Not for grepping the current working copy on its own, and not for the current active session.","https:\u002F\u002Fgithub.com\u002Fentireio\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fsearch\u002FSKILL.md",[],[99,164,74,165,166,102,167,103,168,169,170,106,171,107,172,111,87,113,173,23],"repos","decision","history","bug","do","active","across","feature","answer","invoke"]