Skip to content

feat: add sync-skills skill mirror - #6

Merged
BramVR merged 6 commits into
mainfrom
claude/intelligent-heyrovsky-522af1
Jul 22, 2026
Merged

feat: add sync-skills skill mirror#6
BramVR merged 6 commits into
mainfrom
claude/intelligent-heyrovsky-522af1

Conversation

@BramVR

@BramVR BramVR commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Ports upstream steipete/agent-scripts' scripts/sync-skills — the helper that builds the per-machine agent skill mirror — adapted to this fork's documented layout.

Why

The mirror had drifted badly and nothing was maintaining it. Before this change, ~/.claude/skills held 9 broken links pointing at a skill experiment deleted back in July (code-review, domain-modeling, grilling, implement, improve-codebase-architecture, prototype, research, to-spec, wayfinder — all confirmed absent from origin/main), while ~20 skills that exist in skills/ were invisible to Claude Code entirely: beeper, create-cli, frontend-design, hopper-debugger, instruments-profiling, markdown-converter, maya-dev, maya-plugin-e2e, nano-banana-pro, native-app-performance, notcrawl, openai-image-gen, release-tweets, sonos, the four swift*/swiftui-* ones, to-issues, to-prd, xurl. ~/.codex/skills/bram-maintainer-loop-v2 pointed into a deleted worktree.

Keeping the README's hand-maintained symlink list in sync by hand is what failed; the script replaces it.

What changed

scripts/sync-skills (new) — idempotent mirror builder. Adaptations from upstream:

  • Flat per-skill symlinks for both roots. Upstream gives Codex a whole-root link (~/.codex/skills/agent-scripts -> …/skills); the README here explicitly forbids that shape, and it would duplicate every skill against the existing per-skill links. Both roots get <name> -> <canonical skill dir>.
  • Canonicalized targets (pwd -P), so repo-owned skills resolve to their own repo (gog -> ~/Projects/gogcli/.agents/skills/gog) rather than chaining through a symlink.
  • Two guards upstream doesn't need. Skip when a skill already lives in the root being mirrored into — otherwise the codex-local teach skill would get ln -sfn'd inside itself — and never clobber a real file/dir.
  • Added -n/--dry-run, --no-instructions, and AGENT_SCRIPTS_DIR / MANAGER_SKILLS_DIR overrides. The ~/Projects/manager source is skipped silently when absent.

Sources in collision priority order: agent-scripts/skills > manager skills > codex-local extras. Broken links are always pruned; healthy links into a managed root are pruned only when the skill is gone; hand-made foreign links are left alone.

Docs — README's 23-line hand-maintained Codex symlink list replaced with the sync-skills section, plus a scripts/ entry; CHANGELOG entry; one AGENTS.MD line telling agents to run it after adding/removing/renaming a skill.

CI — the shell syntax check covered only skills/*/scripts/*, so nothing in scripts/ was ever checked. Now covers both.

Verification

  • bash -n clean; CI's syntax loop run locally over skills scripts — passes.
  • Applied on this Mac: 48 skills, ~/.claude/skills and ~/.codex/skills now identical, zero broken links, all 9 dead links pruned and bram-maintainer-loop-v2 retargeted to canonical.
  • Re-run is a no-op: skills mirror up to date (48 skills).
  • scripts/validate-skills passes (41 skills).

Reviewer notes

  • This PR carries 5 pre-existing commits (49213a413f0c0b94) that were sitting unpushed on local main; origin/main was behind them. Only 4cb18d84 is new work.
  • Running the script has side effects outside the repo — it writes ~/.claude/skills, ~/.codex/skills, and the global instruction pointers ~/.claude/CLAUDE.md, ~/.claude/AGENTS.md, ~/.codex/AGENTS.md -> AGENTS.MD. The README already documented those three pointers as the intended global setup; two of them were simply missing. Use --no-instructions to skip them, --dry-run to preview everything.
  • Unrelated pending work in the main checkout conflicts on one line: an uncommitted README edit adds craft-prompt to the symlink list this PR deletes. Correct resolution is dropping that line — sync-skills links craft-prompt automatically.
  • scripts/validate-skills has a latent locale bug, pre-existing and not touched here: under a bare locale it fails every UTF-8 SKILL.md with invalid byte sequence in US-ASCII. LANG=en_US.UTF-8 works around it.

BramVR added 6 commits July 14, 2026 15:12
Adapt upstream steipete/agent-scripts sync-skills to Bram's layout: flat
per-skill symlinks for both ~/.claude/skills and ~/.codex/skills instead of
upstream's whole-root Codex link, canonicalized targets, --dry-run and
--no-instructions flags, AGENT_SCRIPTS_DIR/MANAGER_SKILLS_DIR overrides.

Replaces the hand-maintained Codex symlink list in the README. Extends the
CI shell syntax check to scripts/.
Copilot AI review requested due to automatic review settings July 22, 2026 12:15
@BramVR
BramVR merged commit 70aed48 into main Jul 22, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an idempotent scripts/sync-skills helper to rebuild the per-machine Claude/Codex skill mirror from canonical sources, replacing the previously hand-maintained symlink list and extending CI shell syntax checks to include scripts/.

Changes:

  • Add scripts/sync-skills to create/retarget per-skill symlinks in ~/.claude/skills and ~/.codex/skills, prune broken/stale managed links, and optionally link global AGENTS.MD pointers.
  • Update docs and repo guidance (README.md, AGENTS.MD, CHANGELOG.md) to standardize on the script-driven mirror workflow.
  • Add/adjust several skills (new maya-plugin-e2e, updates to one-password, obsidian, hermes-win, bram-maintainer-loop) and broaden CI’s bash syntax scan scope.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
skills/one-password/SKILL.md Updates 1Password workflow guidance (service-account path + tmux usage).
skills/obsidian/SKILL.md Updates Obsidian vault path guidance and adds CLI troubleshooting note.
skills/maya-plugin-e2e/SKILL.md Adds a new Maya plugin E2E proof workflow skill.
skills/maya-plugin-e2e/agents/openai.yaml Registers the new skill for the OpenAI agent UI.
skills/hermes-win/SKILL.md Adds GoHealth CLI operational notes and restore procedure.
skills/bram-maintainer-loop/SKILL.md Tightens maintainer-loop worker creation and permission-integrity guidance.
scripts/sync-skills New mirror builder/pruner for Claude/Codex per-skill symlinks + optional instruction pointers.
README.md Replaces the manual symlink list with scripts/sync-skills instructions and notes.
CHANGELOG.md Documents the skill mirror sync addition.
AGENTS.MD Adds guidance to run scripts/sync-skills after skill add/remove/rename; adds GitHub untrusted comment rule.
AGENTS.md Removes a now-redundant file (GitHub safety guidance moved into AGENTS.MD).
.github/workflows/ci.yml Expands bash syntax check scope to include scripts/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/obsidian/SKILL.md
Comment on lines 12 to +16
- App config: `~/Library/Application Support/obsidian/obsidian.json`
- Default vault name: `obsidian`
- Usual local vault path: `~/obsidian`
- Usual local vault path: `/Users/bram/obsidian`
- Official CLI: `obsidian`
- Vault commands resolve the vault from cwd; run them from `~/obsidian`.
- Vault commands resolve the vault from cwd; run them from `/Users/bram/obsidian`.
Comment thread skills/obsidian/SKILL.md
Comment on lines 21 to 25
command -v obsidian
obsidian version
obsidian vaults
cd ~/obsidian
cd /Users/bram/obsidian
obsidian commands filter=search:
Comment thread skills/obsidian/SKILL.md
Comment on lines 28 to 30
Global commands like `version` and `vaults` work outside a vault. Vault-content
commands may print `Vault not found.` outside `~/obsidian`. Use `obsidian
commands may print `Vault not found.` outside `/Users/bram/obsidian`. Use `obsidian
commands`, not `obsidian help`, for CLI discovery.
Comment thread skills/obsidian/SKILL.md

```bash
cd ~/obsidian
cd /Users/bram/obsidian
Comment thread skills/obsidian/SKILL.md
Comment on lines +60 to +61
sed -n '1,220p' "/Users/bram/obsidian/Folder/Note.md"
rg -n "term" "/Users/bram/obsidian"
Comment thread skills/obsidian/SKILL.md

```bash
cd ~/obsidian
cd /Users/bram/obsidian
Comment thread skills/obsidian/SKILL.md

```bash
cd ~/obsidian
cd /Users/bram/obsidian
- Scope: vault `Codex Automation`, `read_items` + `write_items`; no vault creation. Recovery: `Private/Bram Codex Service Account`, field `token`.
- Export only for the single command: `OP_SERVICE_ACCOUNT_TOKEN="$BRAM_OP_SERVICE_ACCOUNT_TOKEN" op item get "<known item>" --vault "Codex Automation" ...`.
- Never use `op signin` or `--account` on the service path. Missing/expired/inaccessible: report exact error and ask; no automatic desktop fallback.
- Service-account `op` reads require an explicit vault query.
@@ -0,0 +1,146 @@
---
name: maya-plugin-e2e
description: "Maya plugin UI/e2e proof workflow: use when testing Maya plugins through Maya Stall, Windows Maya hosts, pluginArtifacts, screenshots/recordings, Scenario Result JSON, untrusted-plugin popups, UI clicking, or PR closeout gates that need real Maya evidence."
Comment thread scripts/sync-skills
Comment on lines +19 to +25
AGENT_SCRIPTS=${AGENT_SCRIPTS_DIR:-$HOME/Projects/agent-scripts}
AGENT_SKILLS="$AGENT_SCRIPTS/skills"
MANAGER_SKILLS=${MANAGER_SKILLS_DIR:-$HOME/Projects/manager/skills}
CODEX_ROOT="$HOME/.codex/skills"
CLAUDE_ROOT="$HOME/.claude/skills"
AGENTS_MD="$AGENT_SCRIPTS/AGENTS.MD"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants