fix: auto-install skills on Codespaces startup - #447
Conversation
This reverts commit aec06b7.
📝 WalkthroughWalkthroughThis PR enhances the Codespaces development environment configuration and refactors the skill installation script. It adds a post-start command to the devcontainer setup and improves the script with flexible path resolution, file validation, prerequisite checks, and installation status tracking. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Review: fix: auto-install skills on Codespaces startup概要Codespaces起動時のスキル自動インストール機能の追加と改善です。全体的に良い実装ですが、いくつかの改善点と懸念事項があります。 ✅ 良い点
🔴 重大な問題1. テストカバレッジの欠如(BLOCKER)問題: 影響: CLAUDE.mdで定義された品質基準(70%+行カバレッジ)を満たしていない可能性があります。 推奨対応: # test/script/install-skills.bats などで以下をテスト
- skills.txt が存在しない場合の動作
- 各パス検索の優先順位(引数/ワークスペース/ホーム)
- リポジトリマッピングの正確性
- 既にインストール済みスキルのスキップ
- npx コマンドが存在しない場合のエラーハンドリング2. ハードコードされたリポジトリマッピング(保守性問題)問題: script/install-skills.sh:57-74 のcase文でリポジトリとスキル名を手動マッピングしています。 リスク:
推奨対応: # Option 1: npx skills list -g から実際のインストール済みスキル一覧を取得
installed_skills=$(npx skills list -g | grep -v "^$" | awk '{print $1}')
# Option 2: 設定ファイルでマッピング管理
# .claude/skills/mappings.json
{
"vercel-labs/agent-skills": ["vercel-composition-patterns", "vercel-react-best-practices", ...],
"supabase/agent-skills": ["supabase-postgres-best-practices"]
}
|
| 基準 | 状態 | 備考 |
|---|---|---|
| Test Coverage 70%+ | ❌ | シェルスクリプトのテストが不足 |
| Lint/Format Pass | ShellCheck実行状況不明 | |
| Diff ≤ 400行 | ✅ | 合計51行の変更 |
| Linked Issue | Issue番号が明示されていない | |
| Conventional Commits | ✅ | fix: タイプで適切 |
| Documentation | ✅ | PRの説明は明確 |
総評
機能追加の方向性は正しいですが、テストカバレッジの欠如がBLOCKERです。CLAUDE.mdの品質基準を満たすため、マージ前にシェルスクリプトのテストを追加してください。
🤖 Generated by Claude Code
|
🎉 This PR is included in version 1.66.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
postStartCommandを追加install-skills.shのskills.txtパス検索を改善(ワークスペース優先)Background
Dockerイメージビルド時にスキルのインストールが一部失敗することがあり、Codespacesでスキルが読み込まれない問題が発生していました。
Changes
.devcontainer/codespaces/devcontainer.jsonにpostStartCommandを追加script/install-skills.shを改善:Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes