AGENT SKILL

sync-upstream-skills

Re-transplant owned skills from their mattpocock upstream after a git pull, applying upstream content changes while preserving opencode-native frontmatter. Also checks for duplicate skill names and dangling cross-skill references. Use when the user says "sync skills", "refresh from upstream", "pull matt's skills", or wants to bring the owned transplanted skills up to date.

License 许可
MIT
最近更新
2026-11-10
Stars
★ 1
Forks
0

01 前言 Front Matter

name
sync-upstream-skills
license
MIT
description
Re-transplant owned skills from their mattpocock upstream after a git pull, applying upstream content changes while preserving opencode-native frontmatter. Also checks for duplicate skill names and dangling cross-skill references. Use when the user says "sync skills", "refresh from upstream", "pull matt's skills", or wants to bring the owned transplanted skills up to date.

02 资源文件 1

03 SKILL.md 正文

Sync Upstream Skills

This repo owns a small set of skills transplanted from mattpocock's skills repo. They live here with opencode-native frontmatter (the upstream's disable-model-invocation: true becomes metadata.opencode/autoinvoke: false or is dropped; argument-hint and other Claude-specific fields are dropped). This skill re-applies upstream changes on demand without re-introducing a live second source.

The mapping

Read mapping.json in this directory. Each entry maps an owned skill name (the directory name under skills/) to its upstream path relative to ~/repos/mattpocock/skills/skills/.

Procedure

1. Update the upstream

git -C ~/repos/mattpocock/skills pull

If already up to date, report that and stop.

2. For each mapped skill

For each name -> upstream-path entry in mapping.json:

  1. Read the upstream SKILL.md at ~/repos/mattpocock/skills/skills/<upstream-path>/SKILL.md.
  2. Read the owned SKILL.md at skills/<name>/SKILL.md.
  3. Compare the body (everything after the frontmatter delimiter). opencode ignores Claude-specific frontmatter fields (disable-model-invocation, argument-hint, policy.* in agents/openai.yaml), so ignore those when diffing; only the prose body is what changes upstream.
  4. If the body changed:
    • Take the upstream body verbatim.
    • Re-attach the owned frontmatter (preserve name, description, metadata.opencode/autoinvoke, license). If the upstream description changed, update ours to match verbatim (the description is what steers the model's invocation in opencode, so it must stay in sync).
    • Write the merged file back to skills/<name>/SKILL.md.
  5. Copy any sibling files the upstream changed (e.g. *-FORMAT.md, GLOSSARY.md). These are resource files referenced by the skill body. Copy verbatim; they carry no opencode frontmatter.
  6. If the upstream added a new sibling file the owned copy doesn't have, copy it. If the upstream removed one, delete ours.

3. Dup-name check

After syncing, scan every skills/*/SKILL.md in this repo:

  • Extract the name field from each frontmatter.
  • Report any name that appears more than once. opencode requires the directory name to match the name field and last-write-wins resolves duplicates by source order, so two skills with the same name silently shadow each other.
  • Also report any skill directory whose name doesn't match its frontmatter name (opencode validation: ^[a-z0-9]+(-[a-z0-9]+)*$, must match the directory).

4. Dangling cross-reference check

Several transplanted skills reference other skills by name in their body (e.g. grill-with-docs calls /domain-modeling, grill-me calls /grilling). For each /skill-name reference in any owned skill body:

  • If skill-name is not in mapping.json and not present as a directory under skills/, report it as a dangling reference. The skill would tell the agent to load a skill that doesn't exist in this repo.

5. Report

Summarize: which skills changed, which sibling files changed, any dup-name or dangling-reference issues found. Then ask the user to review and commit.

What this skill does NOT do

  • It does not add a live ~/.opencode/skills source or a skills array pointing at matt's repo. The single-source rule stands: this repo is the only global source, matt's repo is pull-only.
  • It does not transplanted-skills sync rename or namespace skills. If you want to rename a transplanted skill, edit the directory + frontmatter name together and remove the entry from mapping.json (or point it at a new upstream) manually.
  • It does not add new transplanted skills. To add one, create the directory, copy SKILL.md + siblings, write opencode-native frontmatter, and add an entry to mapping.json by hand.

Frontmatter translation table

When syncing, translate upstream frontmatter to opencode-native:

Upstream field Owned field
name name (verbatim)
description description (verbatim; keep up to date, this steers model invocation)
disable-model-invocation: true metadata.opencode/autoinvoke: false (user-invoked)
(no disable-model-invocation) omit metadata.opencode/autoinvoke (model-invoked)
argument-hint drop (opencode ignores it)
policy.* in agents/openai.yaml drop (opencode-specific; not transplanted)
(none) license: MIT (attribution)

OpenCode 2 reads name and description (display + selection) and metadata.opencode/autoinvoke (set false to keep a skill out of the model's list while it stays loadable by ID). license/compatibility are accepted but not interpreted; slash: true is ignored — it was never an opencode field, so do not re-introduce it. Guard: tests/test_skill_frontmatter.py.

04 同仓库更多 Skills

georgernstgraf
georgernstgraf/opencode-helpers

teach

Teach the user a new skill or concept, within this workspace.

教师与教育
★ 1
georgernstgraf
georgernstgraf/opencode-helpers

repograde

Grade student repositories with optional date filtering in single-repo or bulk mode

★ 1
georgernstgraf
georgernstgraf/opencode-helpers

projectgrade

Grade student project repositories based on Git commits, GitHub Issues, and Pull Requests

★ 1
georgernstgraf
georgernstgraf/opencode-helpers

lehrplan

Richtet österreichische HTL-Unterrichts-Repositorien ein und pflegt sie — drei Kernaufgaben: das gesetzliche Lehrplan-Material eines Ausbildungszweigs (z. B. WII, WIT, KIF) aus dem RIS beschaffen inklusive jährlichem Novellen-Check, den Lehrplan eines konkreten Gegenstands aus dem Gesetz extrahieren (mit Erläuterung pro Lernziel: was der Inhalt tatsächlich IST, plus praktische Anwendungen), und Semesterpläne interaktiv entwerfen. Aufrufen, wenn der Nutzer 'Lehrplan', 'Unterrichtsvorbereitung prüfen', 'Lehrplan auf Novellen prüfen', 'RIS sync', 'Lehrplan extrahieren', 'Jahrespläne neu ziehen', 'Semesterplan erstellen/überarbeiten', 'Erläuterungen ergänzen', 'Gesetzesmaterial holen' sagt oder in einem Repo arbeitet, das der lehrplan/-Konvention folgt.

★ 1
georgernstgraf
georgernstgraf/opencode-helpers

knowledge-persistence

Persist session context into the structured docs/ai knowledge files

资料检索与研究
★ 1
georgernstgraf
georgernstgraf/opencode-helpers

knowledge-exam

Generate German knowledge-check exams and solution files from the taught material (class Git history + WebUntis Lehrstoff)

资料检索与研究
★ 1