A skill to update a published snippet.
Triggers
Use when the user says "I want to update a published snippet", "I want to fix a published snippet", or "I want to bump the snippet version".
Procedure
- Check the current state of the target snippet
npx mir info <name> - If it is published to a remote registry, check whether you are logged in
# ログインしていない場合は先にログインが必要 npx mir login - Always confirm the destination registry with the user. Present the following options:
- Local registry (
~/.mir/registry/): stored only on your own PC - ⚠️🌍 official-registry ⚠️🌍: It will become viewable and installable by anyone in the world! Please check thoroughly whether it is safe to update
- Local registry (
- Modify the snippet template and variable definitions (according to the user's requirements)
mir syncUpdate the variable definitions withnpx mir sync <name>- Review the quality of the snippet (check from the perspective of the
review-snippetskill) - snippet.yaml の
versionUpdate the field- Breaking changes: bump the major version
- Feature additions: bump the minor version
- Bug fixes: bump the patch version
--forceOverwrite-publish with- For local:
npx mir publish <name> --force - For official-registry:
npx mir publish <name> --force --registry=official
- For local:
- Verify the behavior after the update
npx mir install <name> --out-dir=/tmp/mir-update-test-<name> - Delete the test directory
Notes
--forceYou cannot overwrite a snippet with the same name without- Do not forget to update the version
- If there are breaking changes, clearly communicate them to the user
- Only the owner of the snippet (the user who first published it) can update it in a remote registry
- Publishing to a remote registry requires
mir loginin advance