mir-update-published-snippet
Original:🇨🇳 Chinese
Translated
Update and upgrade published mir snippets. Use this when you want to update a published snippet, fix a published snippet, or upgrade the version of a snippet.
2installs
Sourcetbsten/mir
Added on
NPX Install
npx skill4agent add tbsten/mir mir-update-published-snippetTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →update-published-snippet
A skill for updating published snippets.
Trigger
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
- 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
- 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