[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6E35CH2MD203M54VEAC3C8F":3,"skill-same:01M6E35CH2MD203M54VEAC3C8F":50},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":23,"linkOnly":24,"markdownContent":25,"markdownBody":25,"frontMatter":26,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":34,"updatedAt":35,"install":36,"resources":49},"01M6E35CH2MD203M54VEAC3C8F","code-review-codex",null,"dimetron\u002Fpi-go","dimetron","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F877433?v=4","01M6E34QX9HKYKMWJVZQEPR2Q3","Dmytro Rashko","01M6E34R2A6563XM0PTZE8KPGG",224,"MIT","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002F.pi-go\u002Fskills\u002Fcode-review-codex\u002FSKILL.md",[],[18,19,20,21,22],"code review","review","codex","code","code review codex","2026-11-10 10:12:30",false,"# Codex Review\n\nUse the external `codex` CLI as a second-opinion reviewer for `pi-go`.\nThis skill is for read-only review and findings, not code editing.\nThe only intended output is `.\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md`.\n\n## CLI constraint: `--uncommitted`\u002F`--base`\u002F`--commit` vs `[PROMPT]`\n\nThese flags are **mutually exclusive** with a positional prompt argument.\n\n### Verified behavior in `codex-cli 0.117.0`\n\nIn this version, passing `-` as a positional prompt still counts as `[PROMPT]` and fails with exit code 2 when combined with `--uncommitted`, `--base`, or `--commit`.\n\nThis means the previously documented pattern below does **not** work on `codex-cli 0.117.0`:\n\n```bash\ncodex exec -s read-only review --uncommitted -m gpt-5.4 -o file.md - \u003C\u003C'EOF'\nYour instructions here\nEOF\n```\n\nObserved error:\n\n```text\nerror: the argument '--uncommitted' cannot be used with '[PROMPT]'\n```\n\n### Working pattern in `codex-cli 0.117.0`\n\nIf you need custom instructions alongside one of these flags, pipe stdin **without** any positional prompt argument:\n\n```bash\ncat \u003C\u003C'EOF' | codex exec -s read-only review --uncommitted -m gpt-5.4 -o file.md\nYour instructions here\nEOF\n```\n\nDo **not** combine `--uncommitted`, `--base`, or `--commit` with `-` as a prompt argument on this version.\n\n## Default output path\n\nThe canonical saved-review artifact for this skill is:\n\n```text\n.\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md\n```\n\nWhen using this skill, prefer commands that overwrite that file with the latest Codex review.\nDo not use this skill to edit source files, run fix-up commands, or write any other artifact.\n\n## When to use\n\nUse this skill when you want Codex CLI to review:\n\n- uncommitted changes in the working tree\n- a feature branch against `origin\u002Fmain`\n- a single commit before push\n- a change for pi-go-specific risks, not just generic style issues\n\nDo not use this skill to replace repo validation. Codex findings are advisory; the real gates are still:\n\n```bash\nmake build\nmake test\nmake lint\nmake vet\n```\n\nUse targeted tests first when the review points to a specific package, for example:\n\n```bash\ngo test .\u002Finternal\u002Fagent\u002F...\ngo test -race .\u002F...\n```\n\nThose validation commands are follow-up work after the review. They are not part of the review invocation described by this skill.\n\n## Repo rules to mention in the prompt\n\nTell Codex to review against these `pi-go` constraints:\n\n- prefer native ADK interfaces such as `model.LLM`, `tool.Tool`, and `session.Service`\n- register tools with `tool.NewFunctionTool` and keep core wiring in `tools.CoreTools()`\n- keep sandboxed file access rooted to the working directory via `os.Root`\n- wrap errors with context using `fmt.Errorf(\"context: %w\", err)`\n- avoid `init()` functions\n- keep the repo as a single Go module\n- do not bypass sandbox restrictions in tool code\n- keep changes focused and minimal\n- update docs when behavior or developer workflow changes\n- check for missing tests and regressions, not style nits\n\n## Prerequisites\n\n1. Run from the repo root: `\u002FUsers\u002Fdimetron\u002Fp6s\u002Fpi-dev\u002Fpi-go`\n2. Create the output directory if needed: `mkdir -p .\u002Fspecs\u002Fissues\u002F002-code-review-codex`\n3. If you are outside the repo, use `codex exec -C \u002FUsers\u002Fdimetron\u002Fp6s\u002Fpi-dev\u002Fpi-go ...` and an absolute `-o` path\n4. Confirm Codex CLI is available: `codex --version`\n5. Login if needed: `codex login`\n6. For branch review, refresh the base ref first if needed: `git fetch origin main`\n\nThe current default remote head in this repo is `origin\u002Fmain`.\n\n## Review contract\n\nThe review command must satisfy all of these:\n\n- run via `codex exec -s read-only review`\n- produce findings only, not code edits\n- write the final review to `.\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md`\n- avoid extra output artifacts\n\nThe only allowed local writes are:\n\n- `mkdir -p .\u002Fspecs\u002Fissues\u002F002-code-review-codex`\n- `-o .\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md`\n\n## Preferred commands\n\n### 1. Review uncommitted changes and save the result\n\nWith `codex-cli 0.117.0`, pipe custom instructions on stdin **without** a positional prompt argument:\n\n```bash\nmkdir -p .\u002Fspecs\u002Fissues\u002F002-code-review-codex\ncat \u003C\u003C'EOF' | codex exec -s read-only review \\\n  -m gpt-5.4 \\\n  --uncommitted \\\n  --ephemeral \\\n  -o .\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md\nReview this pi-go change in read-only mode. Do not propose or apply edits.\nOnly generate a review report. Focus on bugs, regressions, missing tests,\nmissing error context, ADK misuse, sandbox escapes, and docs drift.\nReport only high-confidence findings with file:line references.\nIf you detect no issues, briefly summarize the project structure you reviewed\nand include concise positive feedback on what looks solid.\nEOF\n```\n\nOr without custom instructions (uses Codex defaults):\n\n```bash\nmkdir -p .\u002Fspecs\u002Fissues\u002F002-code-review-codex\ncodex exec -s read-only review \\\n  -m gpt-5.4 \\\n  --uncommitted \\\n  --ephemeral \\\n  -o .\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md\n```\n\nUse this before committing local work. This is the default saved-review workflow.\n\n### 2. Review the current branch against `origin\u002Fmain` and save the result\n\n`codex-cli 0.117.0` also treats `-` as a conflicting positional prompt with `--base`, so use stdin piping with no prompt argument:\n\n```bash\nmkdir -p .\u002Fspecs\u002Fissues\u002F002-code-review-codex\ncat \u003C\u003C'EOF' | codex exec -s read-only review \\\n  -m gpt-5.4 \\\n  --base origin\u002Fmain \\\n  --ephemeral \\\n  -o .\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md\nReview this pi-go branch against origin\u002Fmain in read-only mode.\nDo not propose or apply edits. Only generate a review report.\nPrioritize correctness, compatibility, tests, os.Root sandboxing,\ntool.NewFunctionTool\u002Ftools.CoreTools wiring, %w error wrapping,\nand documentation updates. If you detect no issues, briefly summarize\nthe project structure reviewed and include concise positive feedback.\nEOF\n```\n\nUse this for a PR-style review.\n\n### 3. Review a single commit and save the result\n\n```bash\nmkdir -p .\u002Fspecs\u002Fissues\u002F002-code-review-codex\ncat \u003C\u003C'EOF' | codex exec -s read-only review \\\n  -m gpt-5.4 \\\n  --commit HEAD \\\n  --ephemeral \\\n  -o .\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md\nReview this pi-go commit in read-only mode. Do not propose or apply edits.\nOnly generate a review report. Flag only important issues,\nwith severity and file:line references. If you detect no issues,\nbriefly summarize the project structure reviewed and include concise\npositive feedback.\nEOF\n```\n\nReplace `HEAD` with any commit SHA when needed.\n\n## Prompt templates\n\n### Short prompt\n\n```text\nReview this pi-go change in read-only mode. Do not propose or apply edits. Only generate a review report in .\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md. Focus on bugs, regressions, missing tests, ADK misuse, sandbox escapes, missing %w error wrapping, and docs drift. Report only high-confidence findings with file:line references. If no issues are found, briefly summarize the project structure reviewed and include concise positive feedback.\n```\n\n### Deep prompt\n\n```text\nReview this pi-go change against the repo rules in AGENTS.md and ARCHITECTURE.md.\nRun in read-only mode. Do not propose or apply edits. Only generate a review report in .\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md.\n\nPrioritize:\n- correctness and behavior regressions\n- missing tests or missing package-level test updates\n- ADK-native interfaces (`model.LLM`, `tool.Tool`, `session.Service`)\n- tool registration via `tool.NewFunctionTool` in `tools.CoreTools()`\n- sandbox safety with `os.Root`\n- error wrapping via `fmt.Errorf(\"context: %w\", err)`\n- accidental `init()` usage\n- single-module assumptions\n- documentation drift in README.md, ARCHITECTURE.md, or skill docs\n\nReturn only high-confidence findings. Include severity, file:line references, and a concrete fix.\nIf no issues are found, briefly summarize the project structure reviewed and include concise positive feedback.\n```\n\n## Option reference\n\n- `codex exec -s read-only review`: required command shape for this skill\n- `codex exec -s read-only review -m gpt-5.4`: choose the model explicitly\n- `codex exec -s read-only review -o .\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md`: save the last message to the canonical review-results file\n- `codex exec -s read-only review --ephemeral`: avoid persisting session files\n- `codex exec -s read-only -C \u002Fpath review ...`: run against a repo without changing directories\n\nImportant:\n\n- Use `-s read-only` on `codex exec` so the model cannot mutate the repo\n- Use `-o .\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md` so the review result lands in the canonical file\n- Do not use the top-level `codex review` form for this skill because the skill requires a saved artifact and explicit read-only sandboxing\n- On `codex-cli 0.117.0`, do not use `-` as a prompt argument with `--uncommitted`, `--base`, or `--commit`; pipe stdin without a prompt argument instead\n\n## Review checklist for pi-go\n\nAsk Codex to specifically look for:\n\n- missing or weak tests in changed packages\n- regressions in CLI behavior, TUI flows, or JSON-RPC paths\n- incorrect provider\u002Fmodel-role wiring\n- ADK wrappers that add unnecessary abstraction\n- tool registration drift away from `tools.CoreTools()`\n- unsafe file access or sandbox escape paths\n- missing `%w` error wrapping\n- stale docs when CLI flags, behavior, or workflows changed\n\n## Follow-up after the review\n\nAfter reading the findings:\n\n1. Open `.\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md` and confirm each finding against the actual code\n2. Fix only the real issues\n3. Run the appropriate validation commands\n\nMinimum validation for most code changes:\n\n```bash\nmake build\nmake test\nmake lint\nmake vet\n```\n\nUse these when relevant:\n\n```bash\nmake test-coverage\nmake test-e2e\ngo test .\u002Finternal\u002Fagent\u002F...\ngo test -race .\u002F...\n```\n\n## What this skill found\n\nThis skill caught two real regressions that tests and linters would not catch:\n\n**P2:** `interactive.go:105` — `pi --continue \u003Cid>` ignores the ID argument because `--continue`\nis a boolean flag. Codex correctly identified this behavioral mismatch.\n\n**P3:** `tui.go:924-925` — Seeding `inputModel.Text = \" \"` after init breaks slash-command\ncycling, because `HandleKey` only enters that path from an empty buffer. Codex read the\nactual `HandleKey` logic and caught this.\n\nThis confirms that Codex finds issues that `make vet`\u002F`make lint` miss — especially\nbehavioral regressions and unintended side effects in the TUI and CLI layers.\n\n### Additional CLI lesson learned on 2026-04-10\n\nOn `codex-cli 0.117.0`, the documented `- \u003C\u003C'EOF'` pattern is not compatible with `--uncommitted`.\nPiping stdin without any positional prompt argument works and should be the preferred invocation\nfor custom review instructions until the CLI behavior changes.\n\n## Guidelines\n\n- Prefer `origin\u002Fmain` as the review base for branch reviews\n- Always use `codex exec -s read-only review` when using this skill\n- Always write the result to `.\u002Fspecs\u002Fissues\u002F002-code-review-codex\u002FPROMPT.md`\n- Do not use this skill for ad-hoc review output, JSONL automation output, or code-editing workflows\n- Keep prompts specific to pi-go conventions; generic prompts miss important repo rules\n- Ask for high-confidence findings only\n- If no issues are found, ask Codex to summarize the reviewed project structure and provide brief positive feedback\n- Do not use `--dangerously-bypass-approvals-and-sandbox` for review\n",{},"main","bcfcd42255878c3d40e545abcdeb2520b6d31a52",".pi-go\u002Fskills\u002Fcode-review-codex",34,"https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go","https:\u002F\u002Fpi-go.sh","https:\u002F\u002Fgithub.com\u002Fdimetron","🎸💻 🚧🦞","2026-11-15 03:48:24",{"source":7,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add dimetron\u002Fpi-go --skill code-review-codex",{"tool":42,"command":43},"bunx","bunx skills add dimetron\u002Fpi-go --skill code-review-codex",{"tool":45,"command":46},"pnpm","pnpm dlx skills add dimetron\u002Fpi-go --skill code-review-codex","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002F.pi-go\u002Fskills\u002Fcode-review-codex\u002FSKILL.md",true,[],[51,78,101,119,134,154],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":23},"01M70SJ3216A0Y2NXYJJ2MVER0","verify-session-flow","Formally verify the interactive session flow before or after changing it. Use when editing internal\u002Ftui\u002Ftui.go's handleKey, handleInterruptKey, handleInputSubmit, ctrlCCount or quitting, internal\u002Ftui\u002Fagent_loop.go's enqueuePrompt, submit, steerPrompt, cancelAgent or handleAgentDone, or the deferred-init splash — or when a user reports that Ctrl+C quit on the first press, that Esc did not stop a turn or a goal loop, that a queued prompt was lost when they canceled, or that the TUI hung on a spinner nothing could clear.","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Fextension\u002Fbundled_skills\u002Fverify-session-flow\u002FSKILL.md",[],[58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77],"session","verify session flow","verify","flow","submit","editing","init","use","loop","prompt","when","interactive","reports","first","goal","CTRL","clear","go","spinner","tui",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":23},"01M70SJ02CTB40V2VFGAF80SBG","verify-run-pipeline","Formally verify the \u002Frun phase machine before or after changing it. Use when editing internal\u002Ftui\u002Frun.go's phase transitions (handleRunAgentDone, runGates result handling, verifyRunComplete, retryRun, reportGateHang, merge), internal\u002Fsop\u002Fverdict.go's Passed, or the checklist refresh — or when a run merged work it should not have, retried a hung gate, lost a cycle at the retry budget, or merged on a stale PASS.","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Fextension\u002Fbundled_skills\u002Fverify-run-pipeline\u002FSKILL.md",[],[85,86,60,87,88,89,63,90,91,92,65,68,93,94,95,96,97,98,99,100],"pipeline","verify run pipeline","run","run pipeline","retry","cycle","run phase","machine","phase","refresh","work","verdict","transitions","result","merge","sop",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":23},"01M70SHWJV9N3PQWRAMCQE9C2E","verify-history-rewrite","Formally verify the session-history rewrite path before or after changing it. Use when editing internal\u002Fsession\u002Fautocompact.go, internal\u002Fsession\u002Fcompaction*.go, internal\u002Fsession\u002Fstore.go's Compact\u002FClearEvents\u002FrewriteEvents, internal\u002Fagent\u002Fagent.go's Run\u002FRunStreaming\u002FrunPreTurn, or internal\u002Ftui\u002Fcommands.go's clearConversation\u002FclearSessionContext and the context gauge — or when a turn is canceled mid-flight, a tool call and its result get separated, a session's history disappears while the agent is still working, or the model is sent a tool result whose call was compacted away.","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Fextension\u002Fbundled_skills\u002Fverify-history-rewrite\u002FSKILL.md",[],[108,109,110,60,111,112,63,58,113,114,65,115,68,116,117,98,87,118,75,77],"history","rewrite","verify history rewrite","get","model","tool","call","compact","store","gauge","commands",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":23},"01M70SHSJ5A2XV5SXBXM96RH7P","verify-goal-loop","Formally verify the \u002Fgoal automatic loop before or after changing it. Use when editing internal\u002Ftui\u002Fgoal.go, internal\u002Ftui\u002Fagent_loop.go's handleAgentDone\u002FcancelAgent\u002FsteerPrompt, or internal\u002Ftools\u002Fgoal.go's GoalController — or when a goal loop will not stop, stops one cycle early, closes a goal that is not met, or restarts a goal you finished.","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Fextension\u002Fbundled_skills\u002Fverify-goal-loop\u002FSKILL.md",[],[66,126,127,60,72,128,63,90,65,68,129,130,75,77,131,132,133],"verify goal loop","verify goal","goal loop","you","automatic","Tools","it","stop",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":23},"01M70SHPYN1AS6D6RJ8HN270RZ","verify-agent-lifecycle","Formally verify the subagent lifecycle before or after changing it. Use when editing internal\u002Fsubagent\u002Forchestrator.go's Spawn, trackAgent, forwardAgentEvents, terminalStatus, Cancel, ShutdownWithTimeout or evictCompletedAgentsLocked, or internal\u002Fsubagent\u002Fpool.go — or when a canceled agent is reported as failed, an agent vanishes from the list with no verdict, the orchestrator panics on a pool release, or an agent can be canceled twice.","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Fextension\u002Fbundled_skills\u002Fverify-agent-lifecycle\u002FSKILL.md",[],[141,142,143,60,144,63,65,68,145,146,147,148,96,149,150,151,152,75,132,153],"lifecycle","verify agent lifecycle","agent lifecycle","as","cancel","subagent","can","with","orchestrator","spawn","release","list","pool",{"skillNo":155,"name":156,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":23},"01M6E37WZM8ZF36DRYQGZDGP7M","test-new-skill","https:\u002F\u002Fgithub.com\u002Fdimetron\u002Fpi-go\u002Fblob\u002Fmain\u002Finternal\u002Ftui\u002F.pi-go\u002Fskills\u002Ftest-new-skill\u002FSKILL.md",[],[160,161,162,163],"test","new skill","test new skill","new"]