AGENT SKILL

codex

Send deep technical consultation prompts to an existing Codex session in an adjacent pane through the herdr skill for line-level code review, edge cases, algorithm analysis, and difficult bug localization. Use when the user wants to "ask codex", "have codex look at this snippet", "have codex review this function", or "ask codex about this panic/edge case". This is not for architecture or high-level direction review; do not consult it for one-line questions you can answer yourself with 10 seconds of rg; when the user has already decided and only implementation remains, do not consult it either, just implement.

License 许可
MIT
所属仓库
missdeer/skills
最近更新
2026-11-14
Stars
★ 0
Forks
0

01 前言 Front Matter

name
codex
metadata
{ "version": "1.1.0" }
description
Send deep technical consultation prompts to an existing Codex session in an adjacent pane through the herdr skill for line-level code review, edge cases, algorithm analysis, and difficult bug localization. Use when the user wants to "ask codex", "have codex look at this snippet", "have codex review this function", or "ask codex about this panic/edge case". This is not for architecture or high-level direction review; do not consult it for one-line questions you can answer yourself with 10 seconds of rg; when the user has already decided and only implementation remains, do not consult it either, just implement.

03 SKILL.md 正文

codex - Consult Codex For Deep Technical Judgment On Specific Code / Edge Cases

In this repository, Codex is the magnifying glass: it looks deeply at specific functions, diff hunks, edge cases, and difficult bugs, and is used for line-level code judgment.

Use Cases

  • Correctness, edge-case, race, and error-handling review of specific functions / diff hunks.
  • Localization and explanation of complex bugs ("why does this occasionally panic?").
  • Algorithm / complex logic analysis, performance review, and implementation approach comparison.

Role Constraints

  • Codex is a consultant, not the primary implementer. Its output is reference material; final code is implemented by the main agent after refactoring to match repository style.
  • Ask it to output a unified diff patch, not free-form prose change notes.

Hard Constraints (Required For Every Invocation)

  1. Prompt prefix (must be exact, as the first line of the message):

    Execute directly without asking for confirmation. Do not repeat or echo the request back.
    

    Then add a blank line, followed by your context and question.

  2. Minimal self-contained context:

    • Extract the task goal from the current conversation in 1-2 sentences.
    • Relevant code: paste the specific function / diff hunk under discussion, not the entire file.
    • If it relates to uncommitted changes, include a git diff only for those files.
    • User-confirmed constraints (chosen libraries, schema, deadline, etc.).
    • The current repository's absolute path. Tell the existing session to resolve paths from that root and use this request's context rather than assumptions from earlier pane work.
  3. Transport method - use the existing Codex pane through the herdr skill:

    • Read and follow the herdr skill for session detection, live agent discovery, prompt submission, waiting, and response retrieval. Use the installed herdr --help and command groups for current syntax.
    • Check test "${HERDR_ENV:-}" = 1 as a fast path. When unset or false, confirm the session with the read-only commands herdr status and herdr pane current --current. If no current session or pane is identified, report that this session is not running inside Herdr and stop.
    • Inspect the caller's layout with herdr pane layout --pane <caller-pane-id>, then cross-reference herdr pane list --workspace <workspace-id> and herdr agent list to locate the existing adjacent pane whose recognized agent is Codex. Use IDs returned by discovery when environment IDs are unavailable. Target its returned unique agent name or pane ID, never the calling pane. Do not infer IDs from pane order, create a pane, or start a replacement agent.
    • Confirm the target is ready (idle or done) before submitting. If it is working, wait for that turn to settle; if blocked, inspect the UI and ask the user before answering it. An unknown state is not proof of readiness.
    • Send the exact prompt (including the required prefix as line one) with herdr agent prompt <codex-agent-name-or-pane-id> "<prompt>" --wait --timeout 1800000. Pass prompt text as one literal argument using a structured tool call or safe shell quoting. Do not invoke a headless Codex process or use a command-line fallback.
    • If a Herdr command is denied by the terminal sandbox, rerun that same command through the terminal tool's require_escalated approval flow with a narrowly scoped herdr prefix rule when supported.
    • Retrieve the response with herdr agent read <target> --source recent-unwrapped --lines 120; use herdr agent get <target> to inspect state. Wait on the same live call or agent in intervals no longer than 60 seconds, allowing up to 30 minutes. A timeout or stalled response does not prove delivery failed: inspect state and output before deciding whether a retry is warranted. Do not duplicate a live request or interrupt a quiet consultant.
    • If a larger recent read still cannot recover the completed response, follow the herdr skill's temporary Markdown file fallback. Do not request file output in the initial prompt.
    • If Herdr or an adjacent Codex session is unavailable, tell the user and stop; do not launch a replacement session.
  4. Review-only safety: An existing interactive session does not inherit a read-only sandbox from this skill. Explicitly instruct it in every prompt to inspect source and git metadata only, not modify files, run git write commands, build, test, install, execute project binaries or scripts, format, lint, or run analyzers; return unified diffs / analysis text only. It must not invoke other reviewers or review-loop skills. The main agent reviews suggested changes before execution.

After Receiving Codex's Response

  • Summarize in Chinese, presented in three sections:
    • Conclusion
    • Key Reasons
    • Decisions You Need To Make
  • If Codex's judgment conflicts with decisions already made in the current conversation, call that out clearly, present both paths, and let the user decide. Do not smooth over the conflict.
  • Do not automatically implement Codex's suggested patch; surface it first and wait for the user's approval.
  • Codex output is external logic reference material. When implementing, refactor to repository style, remove redundancy and unnecessary comments, and do not copy it verbatim.

Trigger Examples

  • User: "codex, check whether this function's strings.SplitSeq usage has issues" -> package the function source, call context, and specific concern -> send it to the adjacent Codex pane through Herdr.
  • User: "this goroutine occasionally deadlocks; what does codex think?" -> package the relevant code, reproduction path, and investigation already tried -> send it to the adjacent Codex pane through Herdr.
  • User: "is this SQL edge case correct?" -> package the SQL, table schema, and expected semantics -> send it to the adjacent Codex pane through Herdr.

04 同仓库更多 Skills

missdeer
missdeer/skills

plantuml

Render PlantUML diagrams through the self-hosted https://plantuml.yii.li server and open the encoded URL in the default browser. Use whenever the user asks to draw, render, or update a PlantUML diagram or sequence diagram. Never download the rendered image — build the encoded URL and open it instead.

★ 0
missdeer
missdeer/skills

pkg-go-dev

Query Go package and module documentation from pkg.go.dev's official v1beta REST API. ALWAYS prefer this skill over `go doc`, `go list -m -versions`, `go list -m`, or scraping pkg.go.dev HTML when the target is a published module on pkg.go.dev (`go doc` is only correct for code in the local working tree or local module cache). Use when the user asks to look up a Go package's docs, synopsis, exported symbols, available versions, latest version, imports, importers, vulnerabilities/CVEs, or to search pkg.go.dev. Triggers on requests like "find the latest version of X", "what versions of github.com/... exist", "show the symbols in package Y", "show docs / godoc / godoc.org / pkg.go.dev for Z", "search Go packages for Z", "what vulnerabilities affect module M", "who imports package P". Covers all of github.com/*, golang.org/x/*, standard library, and any other module indexed by pkg.go.dev.

★ 0
missdeer
missdeer/skills

multi-agent-review-plan

Review a high-level plan before implementation by sending prompts through the herdr skill to existing Codex and Antigravity sessions in adjacent panes. Use when the user or an authorized workflow requests multi-agent plan review; assess technology choices, architecture, and business rules, not code details.

★ 0
missdeer
missdeer/skills

multi-agent-review-code

Review a code diff by sending prompts through the herdr skill to existing Codex and Antigravity sessions in adjacent panes, and fix confirmed in-scope findings. Use when the user or an authorized workflow requests a heavyweight review-and-fix loop; ordinary one-pass reviews use audit.

★ 0
missdeer
missdeer/skills

jira

Read/write JIRA issues on https://jira.ismisv.com via REST API v2 only. Use ONLY for direct issue CRUD: get an issue by key (SHELFECOMM-1, FOO-123), JQL search, read/add comments, list/apply transitions, create a ticket, (re)assign, link/unlink issues, or list/upload/download/delete attachments. Do NOT use for end-to-end issue resolution workflows (planning, coding, reviewing, committing) — that is the `jira-issue-resolver` skill's job; do NOT use for non-JIRA ticketing (GitHub Issues, Lark Task); do NOT scrape HTML pages or invent endpoints. Authenticates with Basic Auth from `jira-auth.json` (gitignored).

★ 0
missdeer
missdeer/skills

jira-issue-resolver

End-to-end JIRA issue resolution workflow. Trigger for intents such as "resolve JIRA XXXX-nn", "fix XXXX-nn", "handle XXXX-nn", or a jira.ismisv.com/browse/ URL. It runs the full loop of finding the DAG root, creating an isolated Git worktree, producing and self-checking a brief change plan, attaching the plan, coding, testing and application black-box verification, reviewing code, committing, integrating into the main branch with rebase and fast-forward, and writing back to JIRA. One run handles only one issue. If a story has no subtasks, split it first and implement only the first subtask; if all subtasks of a parent are complete, use the parent closeout shortcut.

★ 0