Index of every page on this site: llms.txt
All skills
aktsmm avatar

/sync-copilot-customizations

@9bedf91
by yamapanaktsmm/agent-skills27 stars
5
Run it yourself

~/.copilot の instructions、手動参照メモ、agents を、公開 repo(Agent-Customization)の .github へ安全に同期する。syncToGlobal の分類と機密監査を通し、公開前に差分を提示して承認を取る。skill は対象外(private skills repo の retro / sync 系を使う)

Use this Skill: https://skilld.dev/gh/aktsmm/agent-skills/sync-copilot-customizations

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈85 tokens for metadata: the name and description. ≈1.4k when used: this file.

How this Skill uses context

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

This Skill turns off automatic use in Claude Code. Its description stays out of the automatic Skill list by default.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

<!-- syncToGlobal: true --> <!-- author: aktsmm --> <!-- repository: https://github.com/aktsmm/Agent-Customization --> <!-- license: CC BY-NC-SA 4.0 --> <!-- copyright: Copyright (c) 2025 aktsmm -->

sync copilot customizations

~/.copilot の個人 instructions / agents を、公開 repo の .github/ へミラーする。~/.copilot は作業コピーで、正本は公開 repo。この skill 自身は同期対象外。

Scope

同期元 同期先(公開 repo)
$HOME/.copilot/instructions/*.instructions.md .github/instructions/<category>/(repo 側の既存 mirror path)
$HOME/.copilot/references/*.instructions.md .github/instructions/<existing category>/(同名の既存 mirror path)
$HOME/.copilot/agents/*.agent.md .github/agents/
  • 同期元は instructions / references / agents の各 1 階層(再帰しない)。-Source 省略で 3 フォルダをまとめて対象にし、存在しないフォルダは飛ばす。同じファイル名が複数フォルダにあると script が停止する
  • references の instruction は手動参照用のため、公開 repo では既存の同名 instruction mirror を更新する。新規 category が必要なら同期前に確認する
  • 対象外: ~/.copilot/copilot-instructions.md、skills(private skills repo の retro / sync 系が担当)、mcp-config.json などの設定ファイル
  • repo / GitHub repo は $env:SYNC_USER_CUSTOMIZATIONS_REPO_DIR / $env:SYNC_USER_CUSTOMIZATIONS_GITHUB_REPO。未設定または path 不在なら確認する

Classification

ラベル 条件 扱い
public-safe syncToGlobal: true 監査通過で同期対象
local-only syncToGlobal: false 同期しない
ignored .github/.sync-ignore に載っている 同期しない
needs-review syncToGlobal が無い、または同期先が決まらない(複数 / 候補なし) 停止して確認。新規 category path は作らない

Gates

  • 既定は公開前に承認を取る。dry-run の結果(追加・更新・削除候補、分類、監査、予定差分)を提示し、承認後だけ -Apply する。公開 repo への push を承認なしで行わない
  • review-only / 確認だけ / dry-run では dry-run だけで終える
  • 監査は push 前に 1 回。秘密鍵、password / API key / client secret / 接続文字列 / refresh token、ラベル付き GUID、メールアドレスを検出する。実値らしいヒットが出たら書き込まず停止し、ファイル・検出種別・件数だけ報告する。値は表示しない
  • 監査の通過だけでは公開可否は決まらない。個人アカウント、tenant / subscription ID、社内情報、端末固有値、個人の承認設定を含むファイルは、syncToGlobal: false でなければ停止して確認する
  • 削除候補は報告のみ。repo 専用資産と古い mirror を区別できないため、自動削除しない。削除は確認して別 commit で行う
  • 既存の未コミット差分はユーザー所有として扱い、混ぜない。分離できなければ停止する
  • 破壊的操作(git reset --hard など)をしない。一時ファイルは OS の temp に置き、完了前に削除する

Workflow

  1. 準備: repo の branch / origin(GitHub repo 名と照合)/ ahead-behind / dirty を確認する。script が無い・古いときは、clean を確認して fetch + fast-forward してから実行する(手作業で再実装しない)
  2. dry-run: 引数なしで実行する(-Source 省略で ~/.copilot の 3 フォルダが対象)。dirty / sources: 行が出ない古い script は、clean を確認して fast-forward で更新する。一部のフォルダだけ対象にするときは配列で渡す(pwsh -File はカンマ区切りを 1 つの文字列にするため -Command を使う)
& "$env:SYNC_USER_CUSTOMIZATIONS_REPO_DIR\scripts\Sync-UserCustomizations.ps1"
pwsh -NoProfile -Command "& '$env:SYNC_USER_CUSTOMIZATIONS_REPO_DIR\scripts\Sync-UserCustomizations.ps1' -Source @('$HOME\.copilot\instructions','$HOME\.copilot\agents')"
  1. 確認: 結果を提示する。削除候補(報告のみ)は、どの同期元にも無い repo 資産だけが並ぶ。-Source で一部のフォルダだけを指定した場合は、指定外フォルダの mirror も並ぶが、同期元が違うだけなので削除しない。needs-review と実値らしい監査ヒットがあれば、ここで止める
  2. 承認後、同じコマンドに -Apply を付けて実行する。変更候補だけを明示パスで stage して commit・push し、remote == HEAD まで script が検証する。push が rejected なら fetch して ahead-behind と変更 path を確認し、競合がなければ取り込んでから再送する
  3. 完了確認: remote SHA = HEAD、clean、除外ファイルが公開されていないことを確認する。中断後は既存 commit と remote を照合し、反映済みの操作を再実行しない

Report

Summary:   結論を 1-3 行
Synced:    追加 / 更新
Excluded:  ファイル名 + 理由(local-only / ignored / needs-review)
Audit:     結果 + ヒット有無(値は書かない)
Commit:    SHA + メッセージ
Remote:    GitHub URL
Pending:   削除候補(報告のみ)、未同期の既存差分

不明点は最小限だけ確認し、それ以外は完了まで進める。

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts12d3 checks · Risk SAFE
  • Gen Agent Trust Hub12d

    This skill facilitates the synchronization of personal GitHub Copilot instructions and agent configurations from the local machine to a public GitHub repository. It includes built-in security audits to detect secrets and requires explicit user confirmation before any data is pushed online.

  • Socket12d

    No alerts

  • Snyk12d

    Risk: LOW · No issues

Signed by skilld at 9bedf91. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 15 hours ago.

Activeupdated 5 days ago
disable-model-invocation
true
user-invocable
true
metadata
{
  "author": "yamapan (https://github.com/aktsmm)"
}
Other metadata
argument-hint
mode(review-only / apply)、対象フォルダ(instructions / references / agents、省略時は 3 つとも)、対象 repo path(省略時は環境変数)

README badge

README badge for aktsmm/agent-skills/sync-copilot-customizations