SuperAPI AI Directory

mir-publish-snippet

General & other

View repository

Updated 10-16 08:49

About this skill

publish-snippet

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

  1. Check the target snippet
    npx mir info <name>
    
  2. 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
  3. Review the quality of the snippet before publishing (check from the perspective of thereview-snippet skill)
    • 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
  4. 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
      
  5. If a snippet with the same name already exists, confirm with the user and, if necessary, add --force add
    npx mir publish <name> --force
    
  6. After a successful publish, perform an operation check
    # registry に表示されることを確認
    npx mir list
    # 実際にインストールできることを確認
    npx mir install <name> --out-dir=/tmp/mir-publish-test-<name>
    
  7. 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)