A skill to publish a snippet to the registry.
Triggers
Use when the user says "publish the snippet", "publish it", or "register it in the registry".
Procedure
- Check the target snippet
npx mir info <name> - Always confirm the publish destination 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 make sure it is safe to publish
- Local registry (
- Review the quality of the snippet before publishing (check from the perspective of the
review-snippetskill)- Read the snippet.yaml definition and check for any problems
- Read the template file and check for any problems
- Check whether maintenance comments (reference file paths, design intent) are written
- If there are problems, report them to the user and propose fixes
- If there are no problems in the review, execute the publish
- For local:
npx mir publish <name> - For official-registry:
npx mir publish <name> --registry=official
- For local:
- If a snippet with the same name already exists, confirm with the user and, if necessary, add
--forceaddnpx mir publish <name> --force - After a successful publish, perform an operation check
# registry に表示されることを確認 npx mir list # 実際にインストールできることを確認 npx mir install <name> --out-dir=/tmp/mir-publish-test-<name> - Delete the test directory
Notes
- When publishing to a remote registry, specify
--registry=<name>specify - Logging in to the remote registry in advance is required:
npx mir login [--registry=<name>] - Do not skip the pre-publish review (to prevent publishing low-quality snippets)
- After publishing, always verify operation with an install test
- Ownership of a snippet belongs to the user who first published it (only the owner can overwrite it)