# AI Coding Agent Skill Collection ## Quick Install: Grilling Question Tools Install or update the question-tool preference for **Claude Code, Codex, and OpenCode** in one command: ```bash bash -o pipefail -c 'curl -fsSL https://opengist.resetrix.work/weehong/9e381dc89dff4670b7232b910454f056/raw/HEAD/install-question-tools.sh | bash' ``` **Trust check:** this runs remote code and downloads remote instructions from this gist. Read both before running if you do not already trust the publisher and server. `pipefail` reports download failures; it is not a security sandbox or a guarantee against executing partially downloaded shell code. Quick links: [installer](https://opengist.resetrix.work/weehong/9e381dc89dff4670b7232b910454f056/raw/HEAD/install-question-tools.sh) | [authoritative policy](https://opengist.resetrix.work/weehong/9e381dc89dff4670b7232b910454f056/raw/HEAD/grilling-question-tools.md) | [ELI5 writing style](https://opengist.resetrix.work/weehong/9e381dc89dff4670b7232b910454f056/raw/HEAD/ELI5.mdx) ### Download and Inspect Instead Run in a scratch directory. These downloads alone do not install anything: ```bash base=https://opengist.resetrix.work/weehong/9e381dc89dff4670b7232b910454f056 curl -fsSL "$base/raw/HEAD/install-question-tools.sh" -o install-question-tools.sh curl -fsSL "$base/raw/HEAD/grilling-question-tools.md" -o grilling-question-tools.md less install-question-tools.sh grilling-question-tools.md # After inspection: bash install-question-tools.sh ``` By default the installer fetches the policy at `HEAD`, not the inspected local copy. To avoid changes between inspection and installation, get a full commit hash from the gist's [Revisions](https://opengist.resetrix.work/weehong/9e381dc89dff4670b7232b910454f056/revisions), replace `HEAD` in **both** download URLs with that hash, and run `QUESTION_TOOLS_REVISION= bash install-question-tools.sh`. The revision variable controls the policy download, not the installer download. ## Requirements and Scope - Linux, macOS, or WSL; Bash 3.2+, Python 3.8+, and `curl` with HTTPS support. - Run as your normal user, without `sudo`, and with no concurrent installer or editor changing the destination files. Native Windows shells are not supported. - This installs instructions only, not the Matt Pocock skills, tools, plugins, or permissions. Install your desired grilling skills separately; upstream skill files are untouched. - Only Matt Pocock grilling flows use this preference. The policy retains the flow's pacing and recommendations, custom answers, unresolved decisions, and text fallback when the native question tool is unavailable or restricted. - This is **not runtime enforcement**. Host permissions, mode restrictions, instruction precedence, and agent instruction-loading limits still apply. To install or overwrite the upstream skills globally for all three hosts: ```bash npx --yes skills@latest add mattpocock/skills --global --agent claude-code codex opencode --skill '*' --yes ``` This selects every skill, including in-progress and miscellaneous skills. Back up local skill edits before overwriting them. Keep custom preferences outside the skill directories, and avoid installing the Claude plugin alongside these files because that can expose duplicate skills. ## Destinations All three destinations are installed, even if a corresponding CLI is not yet installed. Export overrides before running the quick command so both shells inherit them. Empty variables use defaults; paths must be absolute, without `..` components. Spaces are supported. | Agent | Default file | Override | | --- | --- | --- | | Claude Code | `~/.claude/CLAUDE.md` | `$CLAUDE_CONFIG_DIR/CLAUDE.md` | | Codex | `~/.codex/AGENTS.md` | `$CODEX_HOME/AGENTS.md` | | OpenCode | `~/.config/opencode/AGENTS.md` | `$OPENCODE_CONFIG_DIR/AGENTS.md`, otherwise `$XDG_CONFIG_HOME/opencode/AGENTS.md` | | Shared policy | `~/.config/ai-agents/grilling-question-tools.md` | `$QUESTION_TOOLS_POLICY_DIR/grilling-question-tools.md`, otherwise `$XDG_CONFIG_HOME/ai-agents/grilling-question-tools.md` | The downloaded authoritative policy is installed as a separate file. Each host gets only a small marked pointer instructing it to read the absolute policy path before grilling and prefer native question delivery over upstream text formatting, while preserving the rest of the workflow. For example, export `QUESTION_TOOLS_POLICY_DIR="$HOME/my agent policies"` to choose a policy directory. Paths containing newlines or backticks are rejected so the pointer stays unambiguous. `HOME` supplies `~`. Current OpenCode supports `OPENCODE_CONFIG_DIR` for global instructions; older versions may only read the XDG location. For an older release, leave `OPENCODE_CONFIG_DIR` unset and use `XDG_CONFIG_HOME` instead. See [OpenCode instruction loading](https://github.com/anomalyco/opencode/blob/dev/packages/opencode/src/session/instruction.ts) and [global paths](https://github.com/anomalyco/opencode/blob/dev/packages/core/src/global.ts). OpenCode normally prefers its own global `AGENTS.md` over the Claude fallback: creating this file can stop fallback loading of `~/.claude/CLAUDE.md`. If you rely on unrelated instructions in that fallback, explicitly configure them in OpenCode's `instructions` setting before installing. Codex's `AGENTS.override.md`, if present, can take precedence over `AGENTS.md`; review it if the new preference is not being loaded. ## Updates and Safety Rerun the quick command to update the separate policy file and managed pointers. Existing managed blocks containing an embedded policy are migrated by replacing only that block with the pointer. Identical reruns leave files unchanged and create no new backups. The downloaded policy bytes are installed verbatim; the installer does not maintain an embedded policy copy. - Download errors or an invalid/incomplete policy abort before destination edits. Validation checks UTF-8, versioned start/end markers, title, and all seven numbered rules. These are integrity sanity checks, not a signature. - Every destination is preflighted before any directories, backups, or files are created. Malformed or duplicate managed markers abort the entire run. - The unique HTML markers are `` and ``. Keep them intact. - Bytes outside an existing managed block are preserved exactly. A first installation appends a separator and block without changing existing bytes. - Each changed existing file gets a byte-for-byte sibling backup named `.question-tools-backup-` (private mode `0600`). New files need no backup. Paths are printed; previous backups are never replaced. - Existing file and directory symlinks are resolved to physical targets and preserved. Hosts sharing a symlink target get one pointer and one backup beside the physical target, not three. Dangling/looping symlinks, nonregular files, and inaccessible destinations are rejected. The policy cannot share a host target. - Replacements are atomic per file, not a transaction across all destinations. Staging and backups precede replacements, but disk/permission errors during writing can leave directories/backups or a partial install. Inspect the printed paths, restore from backups if needed, and rerun after fixing the cause. File modes are retained; ownership, ACLs, extended attributes and hard-link relationships are not preserved by replacement. Avoid concurrent writers. After installation, start **fresh Claude Code and Codex sessions**, and **quit and restart OpenCode**. Ask the agent which instruction files it loaded if the preference is missing. To uninstall, remove only the managed pointer block from each distinct host target, then remove the separate policy file if no pointers still use it. Restore a backup only if it will not erase newer unrelated edits. Changing the policy directory leaves the previous policy file in place; remove it manually once no pointers use it. ## Installer Tests Run `python3 -B -m unittest -v test_install_question_tools` from this directory. Tests use temporary homes and a mocked `curl`, with no network access or real home installation. Permission checks are skipped when running tests as root. ## Existing Style [`ELI5.mdx`](https://opengist.resetrix.work/weehong/9e381dc89dff4670b7232b910454f056/raw/HEAD/ELI5.mdx) is the original short, plain-language writing style. It is preserved unchanged and is not installed by this script.