cmd: add init-plugin command for plugin scaffolding [minor-release]#14
Merged
Conversation
Scaffold a Claude Code plugin directory from a name argument: empty skills/agents/hooks/output-styles dirs (each with a .gitkeep), plus .claude-plugin/plugin.json, .mcp.json, .lsp.json and settings.json skeletons. Refuses to overwrite an existing directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
claudex init-plugin <name>command that scaffolds a Claude Code plugin directory, so starting a new plugin doesn't mean hand-creating the tree and remembering the manifest shape.Running
claudex init-plugin my-plugincreates./my-plugin/:Details
<name>(cobra.ExactArgs(1)) — becomes both the directory name and theplugin.json"name".versionis hardcoded to0.0.1..gitkeepso they survive version control; config files are written as minimal valid JSON skeletons..lsp.jsonis a bare{}— a standalone.lsp.jsonis a language→config map, so the empty form has nolspServerswrapper (unlike.mcp.json, which keepsmcpServers). Confirmed against the plugins reference../<name>directory (exits non-zero).--for-aiemits the plain[OK]path.Verification
go build ./...,go vet ./...,gofmt -lall clean..gitkeepfiles and correct JSON; rerun on an existing dir refuses with exit 1;--for-aiprints the plain path.🤖 Generated with Claude Code