feat(project-bootstrap): recommend superpowers plugin if missing
CLAUDE.md template adds `use superpowers` as a trigger, but that line is silently dead until the official plugin is installed. New Step 5.6 reads ~/.claude/plugins/installed_plugins.json and, when the `superpowers@claude-plugins-official` key is absent, prints a chat-only recommendation with the install command and the upstream link (github.com/anthropics/claude-plugins-official). Strict no-auto-install: slash commands aren't callable from a skill, and silent plugin install would be overreach. Bumps project-bootstrap 1.0.0 → 1.1.0. Rebuilt dist archive. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: project-bootstrap
|
||||
version: 1.0.0
|
||||
version: 1.1.0
|
||||
description: >
|
||||
Initializes or upgrades a project in the current folder: git, .gitignore, README.md,
|
||||
.wiki/ using Karpathy's method, .tasks/ for task tracking, CLAUDE.md with skill triggers.
|
||||
@@ -272,6 +272,50 @@ This file is overwritten if `project-bootstrap` is re-run on the same project. F
|
||||
|
||||
If a delegated setup-skill is unavailable on this machine (e.g. user installed only a subset), record the missing skill as `unknown` in the version column so the gap is visible.
|
||||
|
||||
---
|
||||
|
||||
## Step 5.6 — Recommend `superpowers` plugin (chat-only, never auto-install)
|
||||
|
||||
The `CLAUDE.md` template just written contains `use superpowers` as a trigger.
|
||||
That trigger is a no-op unless the official `superpowers` plugin is installed
|
||||
on the host. On a fresh machine the plugin is often absent, and the user
|
||||
won't know the trigger is silently dead. Detect and recommend.
|
||||
|
||||
Read `~/.claude/plugins/installed_plugins.json`. The path is identical on
|
||||
Windows / Linux / macOS — `~` resolves correctly under git-bash too.
|
||||
|
||||
Look for the key `superpowers@claude-plugins-official` under `plugins`.
|
||||
Two outcomes:
|
||||
|
||||
- **Installed** — say nothing. Skip to Step 6.
|
||||
- **Missing** (key absent, or the JSON file itself doesn't exist) — print
|
||||
this block in chat exactly once. Do **not** write it into any project file:
|
||||
|
||||
```
|
||||
ℹ️ Recommended: install the official `superpowers` plugin
|
||||
|
||||
CLAUDE.md now contains `use superpowers`, but that trigger is a no-op
|
||||
until the plugin is installed. With it, every session auto-loads
|
||||
brainstorming, planning, code-review, debugging, and TDD skills.
|
||||
|
||||
Install (run inside Claude Code):
|
||||
/plugin install superpowers@claude-plugins-official
|
||||
|
||||
Source: https://github.com/anthropics/claude-plugins-official
|
||||
|
||||
After install + Claude Code restart, the trigger picks it up.
|
||||
```
|
||||
|
||||
**Hard rule — never auto-install.** Slash commands aren't callable from a
|
||||
skill, and silently mutating user-level plugin state without consent is
|
||||
overreach. The recommendation is informational. The user can install it
|
||||
later, ignore it entirely, or remove the `use superpowers` line from
|
||||
`CLAUDE.md` if they prefer a leaner setup.
|
||||
|
||||
If the JSON file is malformed (rare), treat as "missing" and print the
|
||||
recommendation. Do not crash the bootstrap over a plugin-detection edge
|
||||
case — the file isn't ours to fix here.
|
||||
|
||||
## Step 6 — Commit
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user