Skip to content

Instantly share code, notes, and snippets.

View PatrickJS's full-sized avatar
💻
codex coding

PatrickJS PatrickJS

💻
codex coding
View GitHub Profile
@PatrickJS
PatrickJS / README.md
Last active June 13, 2026 21:16
repo-work-router Codex skill

Repo Work Router

repo-work-router is a Codex skill for routing repo-scoped work to the right Codex project thread before file writes begin.

The problem this solves

This came from a real failure mode: a Codex chat was rooted in one repo, but the user asked it to create a new package in another repo. Because the target repo was outside the chat's writable sandbox, the agent started staging a large /private/tmp/write-*.mjs helper that would later request permission to write hundreds of lines into the other checkout.

That was the wrong shape of solution. The target repo should have had its own Codex project chat, with the original chat acting as coordinator and reviewer. The source-of-truth checkout stays the source of truth, and the agent does not need to smuggle a scaffold through a temporary writer script.

@PatrickJS
PatrickJS / README.md
Last active June 14, 2026 20:16
Git History Rewrite Codex skill
@PatrickJS
PatrickJS / README.md
Last active June 14, 2026 20:16
Git Intent Audit Codex skill
@PatrickJS
PatrickJS / README.md
Last active June 14, 2026 20:16
Auto Git Codex skill

Auto Git Skill

Auto Git is a Codex skill for turning repo changes into understandable Git history. It auto-detects the current Git topology, detects existing worktrees, claims cooperative run leases, groups dirty changes by change intent, and routes work through local-review checkpoints or coordinated branch/PR/fanout flows.

Optional companion skills:

  • git-intent-audit: read-only audit for large dirty worktrees, unclear intent, oversized commits, mixed commits, and message/diff mismatch findings.
  • git-history-rewrite: local branch history replay by change intent, using git-intent-audit evidence and backup branches. It never force-pushes by default.

Files

@PatrickJS
PatrickJS / README.md
Last active June 10, 2026 20:54
ad-hoc-notes.md

ad-hoc-notes.md

This gist's primary/root file is ad-hoc-notes.md. It stores portable Codex-style ad hoc memory note candidates and instructions for using them.

For Codex, the fast path is:

  1. Read notes.md.
  2. Append one new note section.
  3. Preserve existing notes.
@PatrickJS
PatrickJS / README.md
Last active June 9, 2026 09:32
Codex coding coordination skills

Codex Coding Coordination Skills

This gist bundles five Codex skills:

  • implement-code-task: lightweight direct coding workflow for simple-to-moderate tasks.
  • coordinate-goal-chats: root chat coordination for worker chats, worktrees, and multi-slice coding goals.
  • root-chat-multitask: durable root chat management across background chats and worktrees.
  • subagent-worktrees: explicit parallel subagent/worktree coordination.
  • run-parallel-scouts: low-reasoning, read-only scout campaigns for broad reviews or audits when you want cheap parallel evidence before the root chat synthesizes and decides what matters.

I use kind mostly out of compiler/TypeScript habit, not because it is objectively better.

In TypeScript, both of these are normal discriminants:

type Route =
  | { type: 'mount'; path: string }
  | { type: 'app'; name: string };
@PatrickJS
PatrickJS / README.md
Last active June 4, 2026 07:47
GitHub-native npm preview package workflows: PR/main snapshots in GitHub Packages, stable releases to npm and GitHub Packages.

GitHub-Native npm Preview Packages

This gist is a copyable bundle for repos that want npm for stable releases and GitHub Packages for PR/main preview packages.

TL;DR

  • This is not a custom registry. It uses npm for public stable releases and GitHub Packages for private or repo-scoped snapshots.
  • Copy the workflow templates into .github/workflows/, add a scoped package name, and configure package auth.
  • Every same-repo PR publishes an immutable GitHub Packages version for the PR head SHA and moves a convenient pr-<number> dist-tag.
  • Every main push publishes an immutable GitHub Packages snapshot and moves the main dist-tag.
@PatrickJS
PatrickJS / goal-builder.md
Created June 1, 2026 23:01
ChatGPT folder. Project-only

You are a Codex /goal prompt builder.

Turn the user’s rough task into one clean, executable /goal command for Codex.

Codex Goals are persistent, thread-scoped objectives for long-running work that should continue across turns until a verifiable stopping condition is reached. A good Goal defines the desired outcome, verification surface, constraints, boundaries, iteration policy, and blocked stop condition. 

/goal supports setting an objective with /goal , viewing the current goal with /goal, and lifecycle controls with /goal pause, /goal resume, and /goal clear. Goal objectives must be non-empty and at most 4,000 characters; if the instructions are longer, write the detailed plan into a file and point the Goal at that file. 

Build the Goal using this structure:

@PatrickJS
PatrickJS / prompter.md
Created June 1, 2026 23:00
ChatGPT folder. project-only

Assume the user’s first message is a rough draft prompt that needs to be rewritten, refined, structured, or optimized for AI tools such as Cursor, ChatGPT, Claude, or coding agents.

Your role:

  • Rewrite messy, incomplete, or rambling prompts into clean, high-signal prompts.
  • Preserve the user’s actual intent, tone, and technical requirements.
  • Improve clarity, structure, formatting, and instruction ordering.
  • Remove redundant wording and ambiguity.
  • Add missing structure only when it improves execution quality.
  • Prefer concise prompts over bloated prompts.
  • Keep prompts practical and directly usable.