Add Claude Code compatible plugin system #34
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.
Implement a plugin system that is drop-in compatible with Claude Code plugins, allowing users to install and use plugins from the Claude Code ecosystem with minimal or no modifications.
Plugin discovery from multiple directories with priority ordering:
Support for Claude Code plugin manifest (.claude-plugin/plugin.json) with custom paths for commands, agents, skills, hooks, and MCP servers
Native Rust plugin support via tycode-plugin.toml and dynamic loading
Commands: Slash commands from markdown files with YAML frontmatter
Agents: Subagent definitions from markdown files
Skills: Integrated with existing skills system, plugin skill dirs
Hooks: Shell command execution with JSON stdin/stdout protocol
MCP Servers: Plugin-provided MCP server configurations
Implemented hook events matching Claude Code specification:
Hook features:
JSON input via stdin with session context
Configurable timeouts with process termination on timeout
Tool name matchers for selective hook execution
${CLAUDE_PLUGIN_ROOT} variable expansion
/plugins - List all installed plugins
/plugin install - Install from GitHub or local path
/plugin uninstall - Remove a plugin
/plugin enable/disable - Toggle plugin state
/plugin info - Show plugin details
/plugin reload - Reload all plugins
/hooks - List all registered hooks from enabled plugins
owner/repo - GitHub shorthand
owner/repo@branch - GitHub with branch/tag
name@owner/repo - Named install with custom directory name
github:owner/repo - Explicit GitHub prefix
./path or /path - Local filesystem
Comprehensive README section on plugins and hooks
Security note about hook shell command execution
Commands reference table with all slash commands
Plugin System TODOs section for planned features