Shared agent instructions, skills, and small portable helpers for Peter's local workspaces.
This repo is the canonical place for:
AGENTS.MD: shared hard rules for Codex/Claude-style agentsagent-tooling/: code-agent and skill update machinery — matrix generator, distribution-topology reconciler, verify/validate gates,skill-authors.json,skill-topology.json(versioned desired distribution for registered skill sources),skills-matrix.mdskills/: exact tracked mirror ofsteipete/agent-scripts:mainother-skills/: owner-grouped tracked holding area for foreign skills; each source dir carries.source.jsonprovenancecodex-skills/: repo-owned Codex-only authoring sourcescripts/: dependency-light personal helpers used across projectshooks/: local guardrails such as skill validation
Skills are the main routing layer. Each skills/<name>/SKILL.md or codex-skills/<name>/SKILL.md has YAML front matter:
---
name: skill-name
description: "Short generic trigger phrase."
---Rules:
- Keep descriptions short and generic; optimize for routing, not documentation.
- Keep skill bodies terse and operational.
- Prefer helper scripts under
skills/<name>/scripts/when a workflow has repeatable commands. - Validate after edits:
agent-tooling/validate-skills. - Quote
descriptionin front matter.
Global discovery — one skills root per CLI:
- Claude Code:
~/.claude/skillsonly;agent-tooling/update-skill-topology.shacquires upstream inventories into tracked staging and reconciles native plugins;agent-tooling/sync-skill-surfaces.shdistributes matrix-selected, marker-owned copies offline. - Codex:
~/.agents/skillsonly; the same matrix selects everyType: skillrow independently for Claude and Codex.Type: pluginrows remain report-only. - The old
~/.codex/skillsroot is legacy. Distribute migrates every non-system entry into collision-safe timestamped backups and verifies that only Codex's.systementry may remain. - Evidence note:
C:\Users\kendv\.codex\skills-migrated-20260707-091501was the local backup that shaped the migration tests (legacy skill dirs plus plain pointer files). It is documentation evidence only; scripts and tests must synthesize their own fixtures instead of depending on that path. - Recovery from migrated backups:
docs/codex-skill-backup-recovery.md. Upstream mirror rollback:docs/upstream-skills-mirror-rollback.md.
Tracked skills/ content mirrors steipete/agent-scripts:main exactly, including upstream-owned symlinks. Tracked mirror names win source collisions. Source-only and npx-only inventories stage under tracked other-skills/<owner>/ (no per-skill copy markers; provenance in .source.json), never directly in an agent surface.
Shared hard rules live in AGENTS.MD.
Run agent-tooling/setup-agent-instructions.sh explicitly once per machine. It creates missing shared pointers, preserves real files and foreign symlinks, and is never called by routine skill updates. Claude Code reads CLAUDE.md, so setup creates:
~/.codex/AGENTS.md -> ~/Projects/agent-scripts/AGENTS.MD~/.claude/CLAUDE.md -> ~/Projects/agent-scripts/AGENTS.MD~/.claude/AGENTS.md -> ~/Projects/agent-scripts/AGENTS.MD
Downstream repos should use a pointer-style AGENTS.MD:
READ ~/Projects/agent-scripts/AGENTS.MD BEFORE ANYTHING (skip if missing).
Repo-specific rules go below that pointer. Do not copy the shared blocks into downstream repos.
agent-tooling/update-all.sh
- Top-level updater: four ordered steps —
update-agents.sh,update-skill-topology.sh(acquire),generate-skills-matrix.sh, thensync-skill-surfaces.sh(distribute). - No fail-fast; prints a
✓/✗summary and exits non-zero if any step failed.
agent-tooling/verify.sh
- Single local/CI verifier: skill validation, Bash syntax, topology cutover policy, updater/copy regressions, Bash maintainer policy, browser helper tests/runtime smoke, and video-downloader smoke checks; the maintainer policy path does not require Ruby.
- Missing tools or installed dependencies fail early with setup guidance.
agent-tooling/update-skill-topology.sh / agent-tooling/sync-skill-surfaces.sh
- Public commands and private topology core are Bash; topology reconciliation neither invokes nor requires Node. Browser-helper verification keeps its unrelated Node requirement.
- Acquire (
update-skill-topology.sh) refreshes upstreams, mirrors complete foreign inventories into trackedother-skills/staging with.source.jsonprovenance, and reconciles native plugins (including verified dual-plugin duplicate cleanup). It never reads or writes the matrix and never manages ordinary agent surfaces.--checkpreviews only upstream/staging and native-plugin drift without writes. - Distribute (
sync-skill-surfaces.sh) is fully offline and matrix-owned. It resolves selected names from tracked repo and staging content, reconciles both surfaces under one marker owner, adopts known pre-cutover agent-scripts owners, removes owned unselected copies, preserves and reports foreign entries, and reads neither the topology manifest nor adapter registry. - Acquire human mode streams discovery, planning, adapter, and verification progress before its result table; distribute prints its surface result and add/refresh/remove actions. Both keep diagnostics on standard error and support
--checkfor a non-mutating preview or--jsonfor one JSON document. Acquire exit codes are0reconciled/check-clean,1drift/adapter/verification failure,2invalid usage or manifest,3user decision required, and130interrupted. Distribute uses0for reconciled/check-clean,1for drift or reconciliation failure,2for invalid usage or matrix, and130for interruption. - OpenAI Codex is Claude-only; Waza and claude-mem are dual-plugin skills with manifest-scoped native Claude/Codex adapters and explicit expected skill identities. Check mode compares installed versions with each configured marketplace snapshot, confirms every declared skill through each native plugin install, and reports pending/blocked/verified migration gates plus retained and eventual duplicate-copy removals without mutation. Reconciliation removes tracked, untracked, managed, or edited copies of only the verified skill after both native paths pass; partial native success retains both copies, and cleanup failure remains visible without fallback delivery. Human and JSON output separate native reconciliation, runtime verification, retained copies, gated removals, and blocking failures; repeated healthy reconciliation reports clean/idempotent state. Recovery stays plugin-managed and is limited to upstream repair, native rollback, or an explicit manifest decision. Unknown installed third-party plugins return decision-required before mutation; Claude official and Codex system plugins are ignored. Report-only plugin rows disappear on regeneration when their local cache is removed, and their destination cells remain informational. Claude-mem still requires runnable Bun, uv, and uvx and preserves the shared
~/.claude-memworker/database contract. - The matrix currently selects most Matt skills for both surfaces, with
code-reviewCodex-only because Claude supplies that built-in. Unknown npx lock sources return decision-required; known legacy npx lock entries also require an explicit decision and remain byte-identical. - Exit
3from acquire means no native-plugin or staging mutation occurred. Inspect--check --jsondecisions, make an explicit manifest or installed-state decision, then rerun; do not guess a fallback or delete unowned entries.
agent-tooling/update-agents.sh
- Updates the agent CLIs:
claude update(native) andnpm install -g @openai/codex. - Tries both even if one fails; prints version before/after each.
Removed public commands: update-repo-skills.sh, update-cc-plugins.sh, update-cli-skills.sh, update-waza.sh, update-claude-mem.sh, update-mattpocock-skills.sh, update-visual-explainer.sh, update-khazix-skills.sh, and update-anthropic-skills.sh. No aliases or shims. Their mechanics now live only in agent-tooling/distribution-topology/adapters/.
Topology authoring:
- Refresh tracked
skills/from the upstreamsteipete/agent-scripts:mainmirror; do not add fork-only content there. Mirrored skills default to Claude. - Put repo-owned Codex-only skills under
codex-skills/; they default to Codex. - Select Claude/Codex destinations by editing
Y/NonType: skillrows inagent-tooling/skills-matrix.md; the topology manifest has no distribution overrides. - Review newly appended skill rows and change
N/Nonly when the skill should reach a surface. Selected rows that no longer resolve fail loudly; unselected rows do not block reconciliation. Plugin rows and their destination cells are report-only. - For an external skill-bearing source, add exactly one
agent-tooling/skill-topology.jsonsource and one private adapter registration with its matrix source identity. Stage source-only and npx-only inventories under the matchingother-skills/<owner>/; never write them directly intoskills/. Record source defaults and plugin policy in the manifest; never add another public updater. - Preview upstream/staging drift with
agent-tooling/update-skill-topology.sh --check; run it to acquire. Regenerateagent-tooling/skills-matrix.mdto append new skills without changing selections, then preview surfaces offline withagent-tooling/sync-skill-surfaces.sh --check. Runagent-tooling/verify.shbefore commit.
scripts/committer
- Stages exactly the listed files.
- Enforces a non-empty commit message.
- Runs skill validation before committing.
agent-tooling/setup-agent-instructions.sh
- Explicit one-machine setup for the three shared
AGENTS.MD/CLAUDE.mdpointers; not part of topology reconciliation or routine updates. - Idempotent; preserves real user files and foreign symlinks.
agent-tooling/validate-skills
- Checks every repo-owned
skills/*/SKILL.mdandcodex-skills/*/SKILL.md. - Verifies YAML front matter plus required
nameanddescription. - Enable as a local hook with
git config core.hooksPath hooks. - Requires Python 3 with PyYAML (
pip install pyyaml; add--break-system-packageson an externally-managed Python).
scripts/docs-list.ts
- Walks
docs/. - Enforces
summaryandread_whenfront matter. - Prints onboarding summaries for repos that wire it in.
scripts/browser-tools.ts
- Standalone Chrome DevTools helper.
- Common commands:
start --profile,nav <url>,eval '<js>',screenshot,console,network,search --content "<query>",content <url>,inspect,kill --all --force. - Requires Node.js 22.18 or newer; run with
node scripts/browser-tools.ts --help.
Treat this repo as canonical for shared agent rules and portable helper scripts.
When syncing downstream repos:
- Pull latest here first.
- Ensure each target repo starts with the pointer-style
AGENTS.MD. - Preserve repo-local rules below the pointer.
- Copy helper changes both directions only when the helper is meant to stay byte-identical.
- Keep scripts dependency-free and portable; no repo-specific imports or path aliases.
For submodules, repeat the pointer check inside each subrepo, push those changes, then bump submodule SHAs in the parent repo.