mir-update-published-snippet
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseupdate-published-snippet
update-published-snippet
公開済の snippet を更新する skill。
A skill for updating published snippets.
トリガー
Trigger
ユーザが「公開済の snippet を更新したい」「publish した snippet を修正したい」「snippet のバージョンを上げたい」と言った場合に使用する。
Use this when the user says "I want to update a published snippet", "I want to fix a published snippet", or "I want to upgrade the version of a snippet."
手順
Steps
- 対象の snippet の現在の状態を確認する
bash
npx mir info <name> - リモート registry に公開済みの場合、ログイン済みか確認する
bash
# ログインしていない場合は先にログインが必要 npx mir login - 更新先の registry を必ずユーザに確認する。 以下の選択肢を提示すること:
- ローカル registry (): 自分の PC 内にのみ保存される
~/.mir/registry/ - ⚠️🌍 official-registry ⚠️🌍: 全世界の誰でも閲覧・インストール可能になります! 更新して問題ないか十分に確認してください
- ローカル registry (
- snippet のテンプレートや変数定義を修正する(ユーザの要件に応じて)
- で変数定義を最新化する
mir syncbashnpx mir sync <name> - snippet の品質をレビューする(skill の観点でチェック)
review-snippet - snippet.yaml の フィールドを更新する
version- 破壊的変更: メジャーバージョンを上げる
- 機能追加: マイナーバージョンを上げる
- バグ修正: パッチバージョンを上げる
- を付けて上書き公開する
--force- ローカルの場合:
bash
npx mir publish <name> --force - official-registry の場合:
bash
npx mir publish <name> --force --registry=official
- ローカルの場合:
- 更新後の動作確認を行う
bash
npx mir install <name> --out-dir=/tmp/mir-update-test-<name> - テスト用ディレクトリを削除する
- Check the current status of the target snippet
bash
npx mir info <name> - If it is published to a remote registry, check if you are logged in
bash
# You need to log in first if you are not logged in npx mir login - Be sure to confirm the target registry with the user. Present the following options:
- Local registry (): Saved only on your own PC
~/.mir/registry/ - ⚠️🌍 official-registry ⚠️🌍: Anyone in the world can view and install it! Please fully confirm that it is safe to update
- Local registry (
- Modify the snippet template and variable definitions according to the user's requirements
- Update variable definitions to the latest with
mir syncbashnpx mir sync <name> - Review the quality of the snippet (check from the perspective of the skill)
review-snippet - Update the field in snippet.yaml
version- Breaking changes: Increase the major version
- Feature additions: Increase the minor version
- Bug fixes: Increase the patch version
- Overwrite and publish with
--force- For local registry:
bash
npx mir publish <name> --force - For official-registry:
bash
npx mir publish <name> --force --registry=official
- For local registry:
- Verify the functionality after update
bash
npx mir install <name> --out-dir=/tmp/mir-update-test-<name> - Delete the test directory
注意事項
Notes
- なしでは同名 snippet の上書きはできない
--force - version の更新を忘れないようにする
- 破壊的変更がある場合はユーザに明確に伝える
- リモート registry への更新は snippet の owner のみ可能(最初に publish したユーザー)
- リモート registry への publish には事前に が必要
mir login
- You cannot overwrite a snippet with the same name without
--force - Do not forget to update the version
- Clearly inform the user if there are breaking changes
- Only the snippet owner (the user who first published it) can update to the remote registry
- You need to log in with in advance to publish to the remote registry
mir login