Skip to main content

/hotfix — Origin/develop hotfix to PR

Use when the user asks for /hotfix or wants an urgent origin/develop-based fix branch, commit, push, pull request, and PR readiness pass.

Source: .agents/skills/hotfix/SKILL.md

Metadata

  • name: hotfix

Content

/hotfix — Origin/develop hotfix to PR

Run this skill when the user asks for a hotfix or invokes /hotfix with an issue prompt. /hotfix includes permission to create the branch, commit, push, and PR. Stop only when the fix is ambiguous or a prerequisite is missing.

Fast path for tiny/config-only fixes

Use the compact path when the prompt clearly names one file or one config entry, such as sentryBasedConfigs.ts.

  • Inspect the named issue/link and target file first. If existing config already nearly covers it, patch the existing entry instead of adding duplicates.
  • Load repo rules in a compact batch, then read only extra references that apply to the touched file. Do not load feature-context, React guidance, browser tools, or Apifox for top-level config-only changes.
  • Verify with targeted checks only: diff check, formatter/linter for the touched file, and a small runtime sanity check when useful. Do not run dev server, Playwright, or full typecheck unless the touched file/risk requires it.
  • In ready-pr, use origin/develop...HEAD as the diff scope, do a concise rules review, update the PR template, and skip Lark tech design/message drafting unless the user asks or the diff is large.

Workflow

  1. Prep

    • Read AGENTS.md, /Users/nas/.codex/RTK.md, and .agents/rules/*.
    • Use /figma only for Figma links.
    • Load feature-context only for product-domain behavior changes.
    • Load React/Vercel guidance only for src React/Next/TSX changes.
  2. Create isolated branch

    • Confirm repo and branch: rtk git rev-parse --show-toplevel, rtk git status --short, rtk git branch --show-current.
    • rtk git fetch origin develop
    • Create sibling worktree from origin/develop: rtk git worktree add --detach <worktree-path> origin/develop
    • Copy only .env / .env.* with the repo worktree-env rule. Do not print env contents.
    • In the worktree: rtk git switch -c codex/hotfix/<slug>.
  3. Implement

    • Inspect/reproduce the issue when feasible.
    • Make the smallest targeted change; preserve existing patterns.
    • Avoid unrelated refactors, duplicate config entries, and broad formatting.
    • Add/update tests only when risk justifies it.
  4. Verify

    • Run checks proportional to the diff.
    • Config-only: rtk git diff --check, formatter/linter for touched file if available, and a tiny runtime assertion if it proves the fix.
    • UI/page changes: run the app/browser verification when feasible.
    • For src/pages/checkout-global/ or src/pages/subscribe-plan/, run rtk bun run dev and rtk bun run playwright:test.
    • If a check fails because of sandbox/dependencies, fix the environment once if cheap; otherwise record the exact limitation and continue only if targeted checks cover the change.
  5. Commit and PR

    • Review rtk git diff --stat and rtk git diff.
    • rtk git add <changed-files>
    • Commit with a concise message. Include the Sentry issue key when one exists.
    • rtk git push -u origin codex/hotfix/<slug>
    • Create a PR against develop.
  6. Run ready-pr

    • Load .agents/skills/ready-pr/SKILL.md.
    • Review origin/develop...HEAD, not stale local develop.
    • Update the existing PR title/body from .github/pull_request_template.md.
    • Run Lark tech design/message steps only when triggered by ready-pr thresholds or explicitly requested.

Final response

Keep the final concise:

  • Worktree, branch, commit, PR URL.
  • Files changed and why.
  • Checks run and any limitations.
  • ready-pr result, especially critical findings or blockers.