From 418c5fdfba7bf50d4f858f6f45411dbc5fdf3df0 Mon Sep 17 00:00:00 2001 From: MirariImmensitatemAstrorum Date: Sun, 20 Sep 2026 00:28:41 -0500 Subject: [PATCH] chore: package Matt Pocock skills as a local Codex plugin Replace the project-local .agents/skills installation with a repository-local Codex plugin under third_party/mattpocock-skills. Upstream intentionally defers a native Codex plugin because its promoted skills are split across engineering and productivity buckets while Codex accepts only one recursive skills path. Resolve that packaging constraint locally by copying only the 25 promoted skill directories into one flat skills tree and pointing a thin Codex manifest at it. Keep every skill, support document, script, and OpenAI metadata file unchanged. Record the upstream revision and add update scripts that regenerate the promoted bundle from mattpocock/skills main. Expose both mattpocock-skills and Ponytail from the same llama-cpp-local marketplace and add a unified setup script for installing both plugins. Remove the older skills-CLI updater and .agents/skills copies so the repository has one coherent, reviewable third-party plugin model. --- .agents/plugins/marketplace.json | 11 ++ .agents/skills/README.md | 60 -------- docs/agents/mattpocock-skills.md | 83 +++++++++++ scripts/setup-agent-plugins.ps1 | 34 +++++ scripts/setup-agent-plugins.sh | 24 ++++ scripts/update-agent-skills.ps1 | 52 ------- scripts/update-agent-skills.sh | 37 ----- scripts/update-mattpocock-skills.ps1 | 134 ++++++++++++++++++ scripts/update-mattpocock-skills.sh | 110 ++++++++++++++ .../.codex-plugin/plugin.json | 21 +++ .../mattpocock-skills/LICENSE | 0 .../mattpocock-skills/UPSTREAM_REVISION | 1 + third_party/mattpocock-skills/VENDORED.md | 23 +++ .../skills/ask-matt/PHASE-BOUNDARIES.md | 0 .../skills/ask-matt/SKILL.md | 0 .../skills/ask-matt/agents/openai.yaml | 0 .../skills/code-review/SKILL.md | 0 .../skills/code-review/agents/openai.yaml | 0 .../skills/codebase-design/DEEPENING.md | 0 .../skills/codebase-design/DESIGN-IT-TWICE.md | 0 .../skills/codebase-design/SKILL.md | 0 .../skills/codebase-design/agents/openai.yaml | 0 .../skills/diagnosing-bugs/SKILL.md | 0 .../skills/diagnosing-bugs/agents/openai.yaml | 0 .../scripts/hitl-loop.template.sh | 0 .../skills/domain-modeling/ADR-FORMAT.md | 0 .../skills/domain-modeling/CONTEXT-FORMAT.md | 0 .../skills/domain-modeling/SKILL.md | 0 .../skills/domain-modeling/agents/openai.yaml | 0 .../skills/grill-me/SKILL.md | 0 .../skills/grill-me/agents/openai.yaml | 0 .../skills/grill-with-docs/SKILL.md | 0 .../skills/grill-with-docs/agents/openai.yaml | 0 .../skills/grilling/SKILL.md | 0 .../skills/grilling/agents/openai.yaml | 0 .../skills/handoff/SKILL.md | 0 .../skills/handoff/agents/openai.yaml | 0 .../skills/implement/SKILL.md | 0 .../skills/implement/agents/openai.yaml | 0 .../HTML-REPORT.md | 0 .../improve-codebase-architecture/SKILL.md | 0 .../agents/openai.yaml | 0 .../skills/prototype/LOGIC.md | 0 .../skills/prototype/SKILL.md | 0 .../mattpocock-skills}/skills/prototype/UI.md | 0 .../skills/prototype/agents/openai.yaml | 0 .../skills/research/SKILL.md | 0 .../skills/research/agents/openai.yaml | 0 .../skills/resolving-merge-conflicts/SKILL.md | 0 .../agents/openai.yaml | 0 .../skills/setup-matt-pocock-skills/SKILL.md | 0 .../agents/openai.yaml | 0 .../skills/setup-matt-pocock-skills/domain.md | 0 .../issue-tracker-github.md | 0 .../issue-tracker-gitlab.md | 0 .../issue-tracker-local.md | 0 .../setup-matt-pocock-skills/triage-labels.md | 0 .../mattpocock-skills}/skills/tdd/SKILL.md | 0 .../skills/tdd/agents/openai.yaml | 0 .../mattpocock-skills}/skills/tdd/mocking.md | 0 .../mattpocock-skills}/skills/tdd/tests.md | 0 .../skills/teach/GLOSSARY-FORMAT.md | 0 .../skills/teach/LEARNING-RECORD-FORMAT.md | 0 .../skills/teach/MISSION-FORMAT.md | 0 .../skills/teach/RESOURCES-FORMAT.md | 0 .../mattpocock-skills}/skills/teach/SKILL.md | 0 .../skills/teach/agents/openai.yaml | 0 .../skills/to-questionnaire/SKILL.md | 0 .../to-questionnaire/agents/openai.yaml | 0 .../skills/to-spec/SKILL.md | 0 .../skills/to-spec/agents/openai.yaml | 0 .../skills/to-tickets/SKILL.md | 0 .../skills/to-tickets/agents/openai.yaml | 0 .../skills/triage/AGENT-BRIEF.md | 0 .../skills/triage/OUT-OF-SCOPE.md | 0 .../mattpocock-skills}/skills/triage/SKILL.md | 0 .../skills/triage/agents/openai.yaml | 0 .../skills/wait-what/SKILL.md | 0 .../skills/wait-what/agents/openai.yaml | 0 .../skills/wayfinder/SKILL.md | 0 .../skills/wayfinder/agents/openai.yaml | 0 .../mattpocock-skills}/skills/wizard/SKILL.md | 0 .../skills/wizard/agents/openai.yaml | 0 .../skills/wizard/template.sh | 0 .../writing-for-agents/SKILL-MECHANICS.md | 0 .../skills/writing-for-agents/SKILL.md | 0 .../writing-for-agents/agents/openai.yaml | 0 87 files changed, 441 insertions(+), 149 deletions(-) delete mode 100644 .agents/skills/README.md create mode 100644 docs/agents/mattpocock-skills.md create mode 100644 scripts/setup-agent-plugins.ps1 create mode 100755 scripts/setup-agent-plugins.sh delete mode 100644 scripts/update-agent-skills.ps1 delete mode 100755 scripts/update-agent-skills.sh create mode 100644 scripts/update-mattpocock-skills.ps1 create mode 100755 scripts/update-mattpocock-skills.sh create mode 100644 third_party/mattpocock-skills/.codex-plugin/plugin.json rename .agents/skills/LICENSE.mattpocock-skills => third_party/mattpocock-skills/LICENSE (100%) create mode 100644 third_party/mattpocock-skills/UPSTREAM_REVISION create mode 100644 third_party/mattpocock-skills/VENDORED.md rename {.agents => third_party/mattpocock-skills}/skills/ask-matt/PHASE-BOUNDARIES.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/ask-matt/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/ask-matt/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/code-review/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/code-review/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/codebase-design/DEEPENING.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/codebase-design/DESIGN-IT-TWICE.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/codebase-design/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/codebase-design/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/diagnosing-bugs/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/diagnosing-bugs/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/diagnosing-bugs/scripts/hitl-loop.template.sh (100%) rename {.agents => third_party/mattpocock-skills}/skills/domain-modeling/ADR-FORMAT.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/domain-modeling/CONTEXT-FORMAT.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/domain-modeling/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/domain-modeling/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/grill-me/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/grill-me/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/grill-with-docs/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/grill-with-docs/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/grilling/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/grilling/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/handoff/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/handoff/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/implement/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/implement/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/improve-codebase-architecture/HTML-REPORT.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/improve-codebase-architecture/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/improve-codebase-architecture/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/prototype/LOGIC.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/prototype/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/prototype/UI.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/prototype/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/research/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/research/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/resolving-merge-conflicts/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/resolving-merge-conflicts/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/setup-matt-pocock-skills/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/setup-matt-pocock-skills/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/setup-matt-pocock-skills/domain.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/setup-matt-pocock-skills/issue-tracker-github.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/setup-matt-pocock-skills/issue-tracker-local.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/setup-matt-pocock-skills/triage-labels.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/tdd/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/tdd/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/tdd/mocking.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/tdd/tests.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/teach/GLOSSARY-FORMAT.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/teach/LEARNING-RECORD-FORMAT.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/teach/MISSION-FORMAT.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/teach/RESOURCES-FORMAT.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/teach/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/teach/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/to-questionnaire/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/to-questionnaire/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/to-spec/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/to-spec/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/to-tickets/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/to-tickets/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/triage/AGENT-BRIEF.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/triage/OUT-OF-SCOPE.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/triage/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/triage/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/wait-what/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/wait-what/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/wayfinder/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/wayfinder/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/wizard/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/wizard/agents/openai.yaml (100%) rename {.agents => third_party/mattpocock-skills}/skills/wizard/template.sh (100%) rename {.agents => third_party/mattpocock-skills}/skills/writing-for-agents/SKILL-MECHANICS.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/writing-for-agents/SKILL.md (100%) rename {.agents => third_party/mattpocock-skills}/skills/writing-for-agents/agents/openai.yaml (100%) diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json index 02f4ffebb15b..d396e6fb83fb 100644 --- a/.agents/plugins/marketplace.json +++ b/.agents/plugins/marketplace.json @@ -14,6 +14,17 @@ "policy": { "installation": "AVAILABLE" } + }, + { + "name": "mattpocock-skills", + "source": { + "source": "local", + "path": "./third_party/mattpocock-skills" + }, + "category": "Developer Tools", + "policy": { + "installation": "AVAILABLE" + } } ] } diff --git a/.agents/skills/README.md b/.agents/skills/README.md deleted file mode 100644 index 47ba32fecda7..000000000000 --- a/.agents/skills/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# Matt Pocock engineering skills - -These project-local skills are managed from [mattpocock/skills](https://github.com/mattpocock/skills) with the official [skills CLI](https://github.com/vercel-labs/skills). - -Installed set: - -- all promoted stable `skills/engineering/*` skills used by this repository -- all promoted stable `skills/productivity/*` skills used by this repository - -Intentionally excluded: - -- `skills/deprecated/*` -- `skills/in-progress/*` -- `skills/misc/*` - -Each skill lives under `.agents/skills//` with its support files and `agents/openai.yaml` metadata. - -## Updating - -Do not manually copy a fresh upstream tree over this directory. Use the curated updater so new upstream buckets or draft skills are not pulled in accidentally: - -Windows PowerShell: - -```powershell -./scripts/update-agent-skills.ps1 -``` - -Linux/macOS: - -```bash -./scripts/update-agent-skills.sh -``` - -The updater calls the official skills CLI with the explicit 25-skill allowlist, targets Codex, copies the files into this repository, and creates or refreshes the root `skills-lock.json`. - -Once `skills-lock.json` exists, the CLI can also check/update the recorded installations with: - -```bash -npx skills@latest update -y -``` - -For this repository, prefer the curated updater when intentionally refreshing from Matt Pocock's repository because it also enforces the allowlist. Always review the resulting `.agents/skills/` and `skills-lock.json` diff before committing upstream changes. - -## Initial provenance - -The files in the initial install were sourced from: - -`mattpocock/skills@c55ee46073ed923f86ce59a5eb3b6d895095d1b7` - -The lock file generated by the updater becomes the ongoing record of installed content hashes and source paths. - -## Repository setup - -After installing or materially updating the bundle, run `/setup-matt-pocock-skills` when repository-specific tracker, triage-label, or documentation configuration needs to be initialized or refreshed. - -## Ponytail - -Ponytail is **not** part of this vendored skill directory. It is installed as the official Codex plugin because its standard behavior depends on lifecycle hooks and runtime mode state, not only its six skills. See [docs/agents/ponytail.md](../../docs/agents/ponytail.md). - -Do not add Ponytail skill names to the Matt Pocock update allowlist; that would create duplicate skill installations. diff --git a/docs/agents/mattpocock-skills.md b/docs/agents/mattpocock-skills.md new file mode 100644 index 000000000000..9cced072276f --- /dev/null +++ b/docs/agents/mattpocock-skills.md @@ -0,0 +1,83 @@ +# Matt Pocock skills integration + +This repository carries Matt Pocock's promoted engineering/productivity skills as a +**repository-local Codex plugin** under: + +`third_party/mattpocock-skills/` + +The plugin is exposed by the same local marketplace used for Ponytail: + +`.agents/plugins/marketplace.json` + +## Why this is an adapter + +Upstream `mattpocock/skills` intentionally defers a native Codex plugin. Codex plugin +manifests accept one recursive `skills` path, while upstream separates promoted skills +across `skills/engineering/` and `skills/productivity/` alongside non-promoted +`misc/`, `in-progress/`, and `deprecated/` buckets. + +This repository solves only that packaging constraint: + +- the 25 promoted skill directories are copied into one flat `skills/` tree +- each skill directory is otherwise copied unchanged +- support documents, scripts, and `agents/openai.yaml` metadata stay with the skill +- the project-authored `.codex-plugin/plugin.json` points at `./skills/` + +No skill behavior is rewritten. + +## Install + +Install both repository-local agent plugins with: + +Windows: + +```powershell +./scripts/setup-agent-plugins.ps1 +``` + +POSIX: + +```bash +./scripts/setup-agent-plugins.sh +``` + +This installs: + +- `ponytail@llama-cpp-local` +- `mattpocock-skills@llama-cpp-local` + +## Updating + +Refresh Matt's promoted skill bundle from upstream with: + +```powershell +./scripts/update-mattpocock-skills.ps1 +``` + +or: + +```bash +./scripts/update-mattpocock-skills.sh +``` + +The updater clones current upstream `main`, copies only the curated 25 promoted +skills, records the upstream commit, and regenerates the thin Codex manifest using the +upstream package version. + +Always review the resulting diff before committing. + +## Upstream provenance + +The current source revision is recorded in: + +`third_party/mattpocock-skills/UPSTREAM_REVISION` + +The initial repository-local plugin migration uses: + +`mattpocock/skills@c55ee46073ed923f86ce59a5eb3b6d895095d1b7` + +## Previous installation model + +The earlier `.agents/skills/` copies and `skills` CLI update scripts are intentionally +removed. Matt's skill set and Ponytail now share one repository-local Codex marketplace +and the same reviewable third-party dependency model. diff --git a/scripts/setup-agent-plugins.ps1 b/scripts/setup-agent-plugins.ps1 new file mode 100644 index 000000000000..4fd30b002041 --- /dev/null +++ b/scripts/setup-agent-plugins.ps1 @@ -0,0 +1,34 @@ +$ErrorActionPreference = "Stop" + +function Require-Command([string]$Name) { + if (-not (Get-Command $Name -ErrorAction SilentlyContinue)) { + throw "'$Name' is required but was not found on PATH." + } +} + +Require-Command "node" +Require-Command "codex" + +$RepoRoot = Split-Path -Parent $PSScriptRoot +Push-Location $RepoRoot +try { + $marketplaces = (& codex plugin marketplace list 2>&1 | Out-String) + if ($marketplaces -notmatch "llama-cpp-local") { + Write-Host "Registering the repository-local plugin marketplace..." + & codex plugin marketplace add . + if ($LASTEXITCODE -ne 0) { throw "Failed to register the local marketplace." } + } + + foreach ($Plugin in @("ponytail", "mattpocock-skills")) { + Write-Host "Installing $Plugin from llama-cpp-local..." + & codex plugin add "$Plugin@llama-cpp-local" + if ($LASTEXITCODE -ne 0) { throw "Failed to install $Plugin." } + } +} +finally { + Pop-Location +} + +Write-Host "" +Write-Host "Repository-local agent plugins are installed." +Write-Host "Open /hooks in Codex and review/trust Ponytail's lifecycle hooks." diff --git a/scripts/setup-agent-plugins.sh b/scripts/setup-agent-plugins.sh new file mode 100755 index 000000000000..1bb8d2e5a34d --- /dev/null +++ b/scripts/setup-agent-plugins.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -euo pipefail + +command -v node >/dev/null 2>&1 || { echo "node is required but was not found on PATH." >&2; exit 1; } +command -v codex >/dev/null 2>&1 || { echo "codex is required but was not found on PATH." >&2; exit 1; } + +repo_root="$(cd "$(dirname "$0")/.." && pwd)" +cd "$repo_root" + +if ! codex plugin marketplace list 2>&1 | grep -q 'llama-cpp-local'; then + echo "Registering the repository-local plugin marketplace..." + codex plugin marketplace add . +fi + +for plugin in ponytail mattpocock-skills; do + echo "Installing $plugin from llama-cpp-local..." + codex plugin add "$plugin@llama-cpp-local" +done + +cat <<'EOF' + +Repository-local agent plugins are installed. +Open /hooks in Codex and review/trust Ponytail's lifecycle hooks. +EOF diff --git a/scripts/update-agent-skills.ps1 b/scripts/update-agent-skills.ps1 deleted file mode 100644 index 89a38e416fd0..000000000000 --- a/scripts/update-agent-skills.ps1 +++ /dev/null @@ -1,52 +0,0 @@ -$ErrorActionPreference = "Stop" - -# Refresh only the curated stable Matt Pocock skills used by this repository. -# The skills CLI writes/updates skills-lock.json and copies into .agents/skills. -$skills = @( - "ask-matt", - "code-review", - "codebase-design", - "diagnosing-bugs", - "domain-modeling", - "grill-me", - "grill-with-docs", - "grilling", - "handoff", - "implement", - "improve-codebase-architecture", - "prototype", - "research", - "resolving-merge-conflicts", - "setup-matt-pocock-skills", - "tdd", - "teach", - "to-questionnaire", - "to-spec", - "to-tickets", - "triage", - "wait-what", - "wayfinder", - "wizard", - "writing-for-agents" -) - -$args = @( - "skills@latest", - "add", - "mattpocock/skills", - "--agent", "codex", - "--copy", - "--yes" -) - -foreach ($skill in $skills) { - $args += @("--skill", $skill) -} - -& npx --yes @args -if ($LASTEXITCODE -ne 0) { - exit $LASTEXITCODE -} - -Write-Host "" -Write-Host "Skills refreshed. Review changes under .agents/skills/ and skills-lock.json before committing." diff --git a/scripts/update-agent-skills.sh b/scripts/update-agent-skills.sh deleted file mode 100755 index b86948417a35..000000000000 --- a/scripts/update-agent-skills.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Refresh only the curated stable Matt Pocock skills used by this repository. -# The skills CLI writes/updates skills-lock.json and copies into .agents/skills. -npx --yes skills@latest add mattpocock/skills \ - --agent codex \ - --copy \ - --yes \ - --skill ask-matt \ - --skill code-review \ - --skill codebase-design \ - --skill diagnosing-bugs \ - --skill domain-modeling \ - --skill grill-me \ - --skill grill-with-docs \ - --skill grilling \ - --skill handoff \ - --skill implement \ - --skill improve-codebase-architecture \ - --skill prototype \ - --skill research \ - --skill resolving-merge-conflicts \ - --skill setup-matt-pocock-skills \ - --skill tdd \ - --skill teach \ - --skill to-questionnaire \ - --skill to-spec \ - --skill to-tickets \ - --skill triage \ - --skill wait-what \ - --skill wayfinder \ - --skill wizard \ - --skill writing-for-agents - -echo -echo "Skills refreshed. Review changes under .agents/skills/ and skills-lock.json before committing." diff --git a/scripts/update-mattpocock-skills.ps1 b/scripts/update-mattpocock-skills.ps1 new file mode 100644 index 000000000000..9951a84a3cf2 --- /dev/null +++ b/scripts/update-mattpocock-skills.ps1 @@ -0,0 +1,134 @@ +$ErrorActionPreference = "Stop" + +function Require-Command([string]$Name) { + if (-not (Get-Command $Name -ErrorAction SilentlyContinue)) { + throw "'$Name' is required but was not found on PATH." + } +} + +Require-Command "git" + +$RepoRoot = Split-Path -Parent $PSScriptRoot +$Dest = Join-Path $RepoRoot "third_party/mattpocock-skills" +$Temp = Join-Path ([System.IO.Path]::GetTempPath()) ("mattpocock-skills-" + [guid]::NewGuid().ToString("N")) + +$Skills = @( + "ask-matt", + "code-review", + "codebase-design", + "diagnosing-bugs", + "domain-modeling", + "grill-me", + "grill-with-docs", + "grilling", + "handoff", + "implement", + "improve-codebase-architecture", + "prototype", + "research", + "resolving-merge-conflicts", + "setup-matt-pocock-skills", + "tdd", + "teach", + "to-questionnaire", + "to-spec", + "to-tickets", + "triage", + "wait-what", + "wayfinder", + "wizard", + "writing-for-agents" +) + +try { + & git clone --depth 1 https://github.com/mattpocock/skills.git $Temp + if ($LASTEXITCODE -ne 0) { + throw "Failed to clone mattpocock/skills." + } + + $Revision = (& git -C $Temp rev-parse HEAD).Trim() + $Package = Get-Content (Join-Path $Temp "package.json") -Raw | ConvertFrom-Json + $Version = $Package.version + + if (Test-Path $Dest) { + Remove-Item -Recurse -Force $Dest + } + New-Item -ItemType Directory -Force -Path (Join-Path $Dest "skills") | Out-Null + New-Item -ItemType Directory -Force -Path (Join-Path $Dest ".codex-plugin") | Out-Null + + foreach ($Skill in $Skills) { + $Source = Join-Path $Temp "skills/engineering/$Skill" + if (-not (Test-Path $Source)) { + $Source = Join-Path $Temp "skills/productivity/$Skill" + } + if (-not (Test-Path $Source)) { + throw "Promoted skill '$Skill' was not found in the expected upstream buckets." + } + Copy-Item -Recurse $Source (Join-Path $Dest "skills/$Skill") + } + + Copy-Item (Join-Path $Temp "LICENSE") $Dest + + $Manifest = @{ + name = "mattpocock-skills" + version = $Version + description = "Matt Pocock's agent skills for real engineering: grilling, spec/ticket flows, TDD, code review, domain modelling and more." + author = @{ name = "Matt Pocock"; url = "https://www.aihero.dev" } + homepage = "https://github.com/mattpocock/skills" + repository = "https://github.com/mattpocock/skills" + license = "MIT" + keywords = @("engineering","skills","tdd","code-review","grilling","domain-modeling","productivity") + skills = "./skills/" + interface = @{ + displayName = "Matt Pocock Skills" + shortDescription = "Engineering workflow skills" + longDescription = "Grilling, specs, tickets, TDD, code review, domain modeling, debugging, architecture and productivity workflows." + developerName = "Matt Pocock" + category = "Developer Tools" + } + } | ConvertTo-Json -Depth 5 + + [System.IO.File]::WriteAllText( + (Join-Path $Dest ".codex-plugin/plugin.json"), + $Manifest + [Environment]::NewLine, + [System.Text.UTF8Encoding]::new($false) + ) + + [System.IO.File]::WriteAllText( + (Join-Path $Dest "UPSTREAM_REVISION"), + $Revision + [Environment]::NewLine, + [System.Text.UTF8Encoding]::new($false) + ) + + $Note = @" +# Vendored Matt Pocock skill bundle + +Source: https://github.com/mattpocock/skills + +Upstream revision: `$Revision` + +This directory is a repository-local Codex packaging adapter around Matt Pocock's +promoted skill set. + +Only the curated promoted skill directories are copied into the flat `skills/` tree. +Their contents are copied unchanged. The project-authored Codex manifest points at +that generated promoted-only tree. + +Refresh with `scripts/update-mattpocock-skills.ps1` or +`scripts/update-mattpocock-skills.sh`, review the diff, then commit the update. +"@ + [System.IO.File]::WriteAllText( + (Join-Path $Dest "VENDORED.md"), + $Note, + [System.Text.UTF8Encoding]::new($false) + ) + + Write-Host "Matt Pocock skills vendored at upstream revision $Revision" + Write-Host "Review: git diff -- third_party/mattpocock-skills" + Write-Host "Restart Codex/ChatGPT after accepting the update so the local plugin cache refreshes." +} +finally { + if (Test-Path $Temp) { + Remove-Item -Recurse -Force $Temp + } +} diff --git a/scripts/update-mattpocock-skills.sh b/scripts/update-mattpocock-skills.sh new file mode 100755 index 000000000000..1f1add0df7b6 --- /dev/null +++ b/scripts/update-mattpocock-skills.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash +set -euo pipefail + +command -v git >/dev/null 2>&1 || { echo "git is required but was not found on PATH." >&2; exit 1; } + +repo_root="$(cd "$(dirname "$0")/.." && pwd)" +dest="$repo_root/third_party/mattpocock-skills" +tmp="$(mktemp -d)" + +cleanup() { rm -rf "$tmp"; } +trap cleanup EXIT + +skills=( + ask-matt + code-review + codebase-design + diagnosing-bugs + domain-modeling + grill-me + grill-with-docs + grilling + handoff + implement + improve-codebase-architecture + prototype + research + resolving-merge-conflicts + setup-matt-pocock-skills + tdd + teach + to-questionnaire + to-spec + to-tickets + triage + wait-what + wayfinder + wizard + writing-for-agents +) + +git clone --depth 1 https://github.com/mattpocock/skills.git "$tmp/src" +revision="$(git -C "$tmp/src" rev-parse HEAD)" +version="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))["version"])' "$tmp/src/package.json")" + +rm -rf "$dest" +mkdir -p "$dest/skills" "$dest/.codex-plugin" + +for skill in "${skills[@]}"; do + src="$tmp/src/skills/engineering/$skill" + if [[ ! -d "$src" ]]; then + src="$tmp/src/skills/productivity/$skill" + fi + if [[ ! -d "$src" ]]; then + echo "Promoted skill '$skill' was not found in the expected upstream buckets." >&2 + exit 1 + fi + cp -R "$src" "$dest/skills/$skill" +done + +cp "$tmp/src/LICENSE" "$dest/" + +python3 - "$dest/.codex-plugin/plugin.json" "$version" <<'PY' +import json, sys +path, version = sys.argv[1], sys.argv[2] +obj = { + "name": "mattpocock-skills", + "version": version, + "description": "Matt Pocock's agent skills for real engineering: grilling, spec/ticket flows, TDD, code review, domain modelling and more.", + "author": {"name": "Matt Pocock", "url": "https://www.aihero.dev"}, + "homepage": "https://github.com/mattpocock/skills", + "repository": "https://github.com/mattpocock/skills", + "license": "MIT", + "keywords": ["engineering","skills","tdd","code-review","grilling","domain-modeling","productivity"], + "skills": "./skills/", + "interface": { + "displayName": "Matt Pocock Skills", + "shortDescription": "Engineering workflow skills", + "longDescription": "Grilling, specs, tickets, TDD, code review, domain modeling, debugging, architecture and productivity workflows.", + "developerName": "Matt Pocock", + "category": "Developer Tools", + }, +} +with open(path, "w", encoding="utf-8") as f: + json.dump(obj, f, indent=2) + f.write("\n") +PY + +printf '%s\n' "$revision" > "$dest/UPSTREAM_REVISION" + +cat > "$dest/VENDORED.md" <