SuperAPI AI Directory

mir-update-published-snippet

Coding & development

View repository

Updated 10-16 08:49

About this skill

update-published-snippet

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

  1. Check the current state of the target snippet
    npx mir info <name>
    
  2. If it is published to a remote registry, check whether you are logged in
    # ログインしていない場合は先にログインが必要
    npx mir login
    
  3. 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
  4. Modify the snippet template and variable definitions (according to the user's requirements)
  5. mir sync Update the variable definitions with
    npx mir sync <name>
    
  6. Review the quality of the snippet (check from the perspective of thereview-snippet skill)
  7. snippet.yaml の version Update the field
    • Breaking changes: bump the major version
    • Feature additions: bump the minor version
    • Bug fixes: bump the patch version
  8. --force Overwrite-publish with
    • For local:
      npx mir publish <name> --force
      
    • For official-registry:
      npx mir publish <name> --force --registry=official
      
  9. Verify the behavior after the update
    npx mir install <name> --out-dir=/tmp/mir-update-test-<name>
    
  10. Delete the test directory

Notes

  • --force You 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 login in advance