SuperAPI AI Directory

mir-getting-started

General & other

View repository

Updated 10-16 08:44

About this skill

getting-started

A skill that installs mir and teaches its basic usage.

Trigger

Use this when the user is using mir for the first time or wants to know how to use it.

Procedure

  1. Check whether mir is installed
    npx @tbsten/mir --version
    
  2. If it is not installed, guide the user through the installation method
    npm i -g @tbsten/mir
    # または
    npx @tbsten/mir
    
  3. Confirm what the user wants to do. If it is not specified, present the options:
    • I want to use publicly available snippets → Guide the user on how to search for and install snippets
    • I want to create and publish my own snippets → Guide the user on how to create and publish snippets
  4. Provide guidance according to the selection

If the user wants to use snippets

# プロジェクトの初期化
mir init

# 利用可能な snippet を一覧表示
mir list

# snippet の詳細を確認
mir info <name>

# snippet をインストール
mir install <name>

If the user wants to create and publish snippets

# プロジェクトの初期化
mir init

# snippet の雛形を作成
mir create <name>

# テンプレートファイルを .mir/snippets/<name>/ に配置
# .mir/snippets/<name>.yaml で変数を定義

# 変数定義を同期
mir sync <name>

# 動作確認
mir install <name> --out-dir=/tmp/test

# ローカル registry に公開
mir publish <name>

# リモート registry(official 等)に公開する場合:
# 1. まずログイン(GitHub OAuth)
mir login
# 2. リモート registry に公開
mir publish <name> --registry=official

Notes

  • mir init Before running, confirm that you are in the project's root directory
  • Adjust the level of detail in the explanation according to the user's proficiency