Skip to content

スキル名の区切り文字(ハイフン / ドット)を選択可能に#16

Open
ysak-y wants to merge 9 commits into
mainfrom
skill-name-separator
Open

スキル名の区切り文字(ハイフン / ドット)を選択可能に#16
ysak-y wants to merge 9 commits into
mainfrom
skill-name-separator

Conversation

@ysak-y

@ysak-y ysak-y commented Jul 17, 2026

Copy link
Copy Markdown

概要

一部の LLM プラットフォームは Agent Skills 準拠のハイフン区切りのスキル名しか使えないため(参考: spec-kit #2354)、miko のスキル名の区切り文字を選択できるようにしました。あわせてスキル名内のアンダースコアをハイフンに統一しています。

方式

  1. install.sh が言語選択に続けて区切り文字を対話で確認します。デフォルトはどこでも動作するハイフン区切り(/miko-setup)で、ドット区切り(/miko.setup、従来形式)も選べます。非対話実行時はプロンプトなしでハイフンになります
  2. 選択は .miko/configseparator= に保存され、スキルディレクトリ名とファイル内のスキル名参照(frontmatter の handoffs 含む)がインストール・アップグレード時に自動変換されます。後から変更する場合は miko を削除して再インストールします
  3. tone_guide(日英)に「出力でスキル名に言及するときは config の separator に従う」を明記し、LLM が生成する案内文のスキル名表記も設定に追従させます
  4. スキル名の _- に統一miko.new_capmiko.new-cap 等 6 スキル)。ハイフン区切り選択時に miko-new_harae のような混在表記になるのを避けるためです
  5. 既存インストールは upgrade 時に separator=. が補完されドット区切りのまま。旧アンダースコア名のスキルは削除確認のうえ新名で再配置されます

あわせて修正

  • upgrade.sh が macOS 標準の bash 3.2 で中断する問題(protected_skills が空のときの set -u 下での空配列展開)
  • bash 3.2 で変数直後にマルチバイト文字が続くと変数名の解釈に失敗する問題(${VAR} ブレース化)

レビューの手引き

コミットを段階で分けています:

  • 8c3e1ac + aa008d8: 初版(setup スキルでの初回確認方式 + 切り替えスクリプト)
  • 84b1ac5: アンダースコア → ハイフンの機械的リネームのみ(+116/−116 の対称置換。削除行がすべて旧名・追加行がすべて新名を含むことを検証済み)
  • 1f67518: インストール時プロンプト方式への変更 + tone_guide 追記
  • dbdb68f: switch_separator.sh / skills_manifest の廃止(区切り文字の変更は再インストールに一本化)

初版で導入して後続コミットで廃止したものがあるため、ブランチ全体の Files changed で見るのが確実です。実質は install.sh / upgrade.sh / miko.setup / tone_guide / README / リネームに収まります。

テスト

ローカル tarball を使い、すべて macOS 標準 /bin/bash(3.2)で実施:

  • 対話インストール(疑似 tty): 「2」回答 → ドット配置 / 空回答 → ハイフン配置
  • 非対話インストール → プロンプトなしでハイフン配置、_ を含むスキル名ゼロ、参照の残存ゼロ
  • 実際の v1.3.2(main の HEAD)をインストール → 本ブランチへアップグレード → 旧アンダースコア名 6 スキルが削除確認に列挙され、承認後に新名で再配置。separator=. が補完されドット維持
  • プロテクト済みカスタムスキルは upgrade で無傷
  • ~/work/boron-student で実際にインストールし、動作確認

🤖 Generated with Claude Code

https://claude.ai/code/session_01TZs89bL3xt4Yy7iVY3ooE2

ysak-y and others added 2 commits July 17, 2026 15:33
一部の LLM プラットフォームは Agent Skills 準拠のハイフン区切りの
スキル名しか使えないため、どこでも動作するハイフン区切り
(/miko-setup)で配置するように変更。

- install.sh: ハイフン区切りで配置し、ファイル内のスキル名参照を
  自動変換。MIKO_SEPARATOR 環境変数(. / -)で明示指定も可能
- miko.setup: 初回実行時にドット区切りへの変更を確認するステップを追加
- ofuda/switch_separator.sh: 区切り文字をいつでも切り替えられる
  スクリプトを同梱。.miko/skills_manifest で miko 管理スキルのみを
  対象にし、ユーザーのカスタムスキルには触れない
- upgrade.sh: separator 設定に追従。既存インストールはドット区切りの
  まま維持(確認も走らない)
- upgrade.sh: protected_skills が空のとき bash 3.2 の set -u で
  中断する問題を修正

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZs89bL3xt4Yy7iVY3ooE2
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZs89bL3xt4Yy7iVY3ooE2
@ysak-y ysak-y self-assigned this Jul 17, 2026
@ysak-y
ysak-y requested a review from kikaineko July 17, 2026 06:36
ysak-y and others added 2 commits July 17, 2026 16:06
区切り文字をハイフンにしたとき miko-new_harae のような
_ と - の混在表記になるのを避けるため、スキル名内の _ を - に変更する。

対象: new-cap / new-harae / quick-catchup / quick-impl /
split-proposal / catchup-system-hld

ディレクトリ名のリネームと、全ドキュメント内の参照の機械的な置換のみ。
CHANGELOG の過去エントリは履歴として旧名のまま残す。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZs89bL3xt4Yy7iVY3ooE2
setup スキルでの初回確認方式をやめ、install.sh が言語選択に続けて
区切り文字(ハイフン / ドット)を対話で確認する方式にする。
デフォルトはどこでも動作するハイフン区切り。非対話実行時は
プロンプトなしでハイフンになる。

- miko.setup: 初回確認ステップと separator_confirmed フラグを廃止
- MIKO_SEPARATOR 環境変数を廃止(プロンプトで選べるため不要。
  非対話環境は後から .miko/switch_separator.sh で変更できる)
- tone_guide (ja/en): 出力でスキル名に言及するときは .miko/config の
  separator に従う旨を明記

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZs89bL3xt4Yy7iVY3ooE2
Comment thread ofuda/guides/tone_guide.md Outdated

## スキル名の表記

miko のスキル名の区切り文字は、インストール時の選択によりドット(`/miko.xxx`)またはハイフン(`/miko-xxx`)になる。出力でスキル名に言及するときは、`.miko/config` の `separator` の値に従うこと:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SKILL.md内部は ドット区切りであることを明記してください

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread ofuda/guides/tone_guide.md Outdated

miko のスキル名の区切り文字は、インストール時の選択によりドット(`/miko.xxx`)またはハイフン(`/miko-xxx`)になる。出力でスキル名に言及するときは、`.miko/config` の `separator` の値に従うこと:

- `separator=.` → ドット区切りで表記する

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `separator=.` → ドット区切りで表記する
- `separator=dot` → ドット区切りで表記する
- `separator=hyphen` → ハイフン区切りで表記する

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9b0d462 な感じで全体で dot/hyphen 表記にしました

Comment thread ofuda/guides/tone_guide.md Outdated
- `separator=.` → ドット区切りで表記する
- `separator=-` → ハイフン区切りで表記する

config が読めない場合は、実行中のスキル自身の名前に使われている区切り文字に合わせる。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaultは dot であるってすればいいかと思います

@ysak-y ysak-y Jul 17, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


---

## スキル名の表記

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これトーンガイドにあるのは、ちょっと違和感があるんですよね。本当は。
ただ、置き場所としてここが便利というだけで。
なので、ちょっとそういう断りはいれたい気持ち...まぁいれても意味ないっていえば、そうかもなんですが...

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ysak-y and others added 5 commits July 17, 2026 16:33
区切り文字の変更は頻繁な操作ではないため、専用の切り替えスクリプトを
持たず「miko を削除して再インストール」に一本化する。
skills_manifest は switch_separator.sh 専用だったため合わせて廃止。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZs89bL3xt4Yy7iVY3ooE2
記号 (./-) より意図が読み取りやすいため、レビュー指摘に従い
語 (dot/hyphen) で保存する。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZs89bL3xt4Yy7iVY3ooE2
出力時は原文の表記ではなく .miko/config の separator に従うことを
はっきりさせる(レビュー指摘)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZs89bL3xt4Yy7iVY3ooE2
「実行中のスキル名に合わせる」より単純な規則にする(レビュー指摘)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZs89bL3xt4Yy7iVY3ooE2
トーンのルールではなく、全スキルが必ず読む指示書として
便宜上ここに置いている旨を明記する(レビュー指摘)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TZs89bL3xt4Yy7iVY3ooE2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants