feat: create Claude Code plugin for sharing commands across repos - #1352
Conversation
Transforms dotfiles into a Claude Code plugin that can be installed in any repo. **The Problem**: PR #1344 added /close-issue via symlink in dotfiles, but other repos (like lifehacking) can't access it. The old command generation system was removed in #1320. **The Solution**: Use Claude Code's official plugin system to share commands: ``` .claude-plugin/ ├── plugin.json # Plugin metadata ├── marketplace.json # Distribution manifest └── commands/ # Symlinked to knowledge base ├── close-issue.md ├── create-issue.md ├── extract-best-frame.md └── retro.md ``` ## Installation in Other Repos **Local (for testing):** ```bash /plugin marketplace add ~/ppv/pillars/dotfiles /plugin install dotfiles-commands ``` **GitHub (after merge):** ```bash /plugin marketplace add atxtechbro/dotfiles /plugin install dotfiles-commands@atxtechbro ``` ## Benefits - ✅ Official Claude Code extension system (modern approach) - ✅ Commands shareable across all repos via plugin install - ✅ Single source of truth (knowledge base remains authoritative) - ✅ Expandable with agents, hooks, MCP servers later - ✅ Per-repo control (install only where needed) Principles: systems-stewardship (single source of truth), dotfiles-as-plugin (shareable setup)
|
⏳ Code review in progress. Analyzing for code quality issues and best practices. Detailed findings will be posted upon completion. Using Amazon Q Developer for GitHubAmazon Q Developer1 is an AI-powered assistant that integrates directly into your GitHub workflow, enhancing your development process with intelligent features for code development, review, and transformation. Slash Commands
FeaturesAgentic Chat Code Review CustomizationYou can create project-specific rules for Amazon Q Developer to follow:
Example rule: FeedbackTo provide feedback on Amazon Q Developer, create an issue in the Amazon Q Developer public repository. For more detailed information, visit the Amazon Q for GitHub documentation. Footnotes
|
There was a problem hiding this comment.
Overall Assessment
This PR introduces an innovative approach to sharing Claude Code commands across repositories using the official plugin system. The concept is solid and addresses a real need for command portability, but there are several implementation issues that need to be addressed before this will function correctly.
Critical Issues
Symlink Implementation: The most critical issue is that the command files contain path strings rather than actual symbolic links. Claude Code will read the file content (the path string) instead of following symlinks to the target procedures. This needs to be fixed for the plugin to work.
Plugin Metadata: The plugin.json is missing essential fields like command definitions, entry points, and engine compatibility requirements that Claude Code plugins typically need.
Recommendations
- Fix symlinks: Use actual
ln -scommands to create proper symbolic links instead of files containing path strings - Enhance plugin.json: Add command definitions, main entry point, and engine compatibility fields
- Add version tracking: Include version information in marketplace.json for better release management
- Fix file formatting: Ensure all files have proper trailing newlines
Strengths
- Excellent architectural approach using official Claude Code plugin system
- Clear documentation and rationale in the PR description
- Good separation of concerns with knowledge base as single source of truth
- Well-thought-out installation instructions for both local and GitHub scenarios
The core idea is excellent and will provide significant value once the implementation details are corrected.
| @@ -0,0 +1 @@ | |||
| ../../knowledge/procedures/close-issue-procedure.md No newline at end of file | |||
There was a problem hiding this comment.
The symlink files contain only relative paths as text content rather than actual symbolic links. This approach won't work as intended because Claude Code will read the file content (the path string) instead of following a symlink to the target file. Consider using actual symbolic links or copying the content directly.
| @@ -0,0 +1,8 @@ | |||
| { | |||
| "name": "dotfiles-commands", | |||
There was a problem hiding this comment.
The plugin.json is missing several important fields that are typically required for Claude Code plugins. Consider adding fields like main (entry point), commands (command definitions), and engines (compatibility requirements) to ensure proper plugin functionality.
| { | ||
| "name": "dotfiles-commands", |
There was a problem hiding this comment.
The marketplace.json structure looks correct, but consider adding version information and more detailed metadata. The source field pointing to "." is appropriate for a self-contained plugin, but you may want to add a version field to track plugin releases.
| { | |
| "name": "dotfiles-commands", | |
| { | |
| "name": "dotfiles-commands", | |
| "source": ".", | |
| "version": "1.0.0", | |
| "description": "Shared procedures and slash commands from dotfiles knowledge base", | |
| "keywords": ["commands", "procedures", "github", "automation"] | |
| } |
| @@ -0,0 +1 @@ | |||
| ../../knowledge/procedures/issue-creation-procedure.md No newline at end of file | |||
There was a problem hiding this comment.
Same issue as with close-issue.md - this file contains a path string rather than being an actual symlink. All command files in the commands directory have this same problem and will not function as intended.
| @@ -0,0 +1 @@ | |||
| ../../knowledge/procedures/close-issue-procedure.md No newline at end of file | |||
There was a problem hiding this comment.
🛑 Missing Newline: The file is missing a trailing newline character, which can cause issues with Git and text processing tools. This is indicated by the "No newline at end of file" message in the diff.
| @@ -0,0 +1,13 @@ | |||
| { | |||
| "name": "dotfiles-marketplace", | |||
There was a problem hiding this comment.
Consider using a more descriptive name for the marketplace. "dotfiles-marketplace" might be confusing since this is specifically for command sharing. Something like "dotfiles-commands-marketplace" would be clearer about the purpose.
Adds required YAML front matter with description field to all procedure files so Claude Code can discover and display them as slash commands in autocomplete. **Root Cause**: Claude Code requires YAML front matter for command discovery: ```yaml --- description: Command description --- ``` Without this, procedures are invisible to `/plugin` system even when installed. **Changes**: - close-issue-procedure.md: Add "Close GitHub issue with PR workflow" - issue-creation-procedure.md: Add "Create GitHub issue with validated labels" - extract-best-frame-procedure.md: Add "Extract best frame from video using AI" - retro-procedure.md: Add "Run retrospective to capture learnings" - README.md: Add note about restarting Claude Code after plugin install **After this PR merges**: 1. Uninstall/reinstall plugin to get updated procedures 2. Restart Claude Code 3. Commands will appear in autocomplete Fixes command discovery from PR #1352
…#1354) Adds required YAML front matter with description field to all procedure files so Claude Code can discover and display them as slash commands in autocomplete. **Root Cause**: Claude Code requires YAML front matter for command discovery: ```yaml --- description: Command description --- ``` Without this, procedures are invisible to `/plugin` system even when installed. **Changes**: - close-issue-procedure.md: Add "Close GitHub issue with PR workflow" - issue-creation-procedure.md: Add "Create GitHub issue with validated labels" - extract-best-frame-procedure.md: Add "Extract best frame from video using AI" - retro-procedure.md: Add "Run retrospective to capture learnings" - README.md: Add note about restarting Claude Code after plugin install **After this PR merges**: 1. Uninstall/reinstall plugin to get updated procedures 2. Restart Claude Code 3. Commands will appear in autocomplete Fixes command discovery from PR #1352
Removes the deprecated command generation architecture that was replaced by Claude Code's native plugin system (PR #1352). **What Was Removed:** - `utils/generate-claude-commands.sh` - Template processor - `utils/generate-commands.sh` - Multi-provider command generation - `utils/sync-claude-commands.sh` - Command sync tool - `utils/prompt_orchestrator.py` - Template engine - CI/CD validation for command sync - All references from README, setup.sh, and settings.json **Why:** - PR #1320 moved to "provider-agnostic, slash-free invocation" - PR #1352 introduced plugin system as replacement - Template generation no longer used or maintained - Symlinks in `.claude-plugin/` handle distribution now **What Remains:** - `.claude-plugin/` - Plugin distribution (current architecture) - `.claude/commands/` - Local commands for dotfiles repo - `knowledge/procedures/` - Single source of truth **Cleanup Also:** - Removed 16 old worktrees (leftover branches) - Pruned git worktree references Closes #1319 follow-up
Removes the deprecated command generation architecture that was replaced by Claude Code's native plugin system (PR #1352). **What Was Removed:** - `utils/generate-claude-commands.sh` - Template processor - `utils/generate-commands.sh` - Multi-provider command generation - `utils/sync-claude-commands.sh` - Command sync tool - `utils/prompt_orchestrator.py` - Template engine - CI/CD validation for command sync - All references from README, setup.sh, and settings.json **Why:** - PR #1320 moved to "provider-agnostic, slash-free invocation" - PR #1352 introduced plugin system as replacement - Template generation no longer used or maintained - Symlinks in `.claude-plugin/` handle distribution now **What Remains:** - `.claude-plugin/` - Plugin distribution (current architecture) - `.claude/commands/` - Local commands for dotfiles repo - `knowledge/procedures/` - Single source of truth **Cleanup Also:** - Removed 16 old worktrees (leftover branches) - Pruned git worktree references Closes #1319 follow-up
Remove all documentation and procedures for the prompt orchestrator system that was deleted in PR #1355 (Oct 9, 2025). The entire template generation architecture was replaced by Claude Code's native plugin system. ## Files Removed **Documentation (obsolete):** - `docs/prompt-orchestration.md` - Described template syntax for deleted orchestrator - `docs/prompt-orchestrator-security.md` - Security docs for deleted code **Procedure (obsolete):** - `knowledge/procedures/command-lifecycle-management.md` - Referenced deleted tools: - utils/sync-claude-commands.sh (removed PR #1355) - utils/generate-commands.sh (removed PR #1355) - .claude/command-templates/ (never existed) **Artifacts (untracked):** - `utils/__pycache__/prompt_orchestrator.cpython-312.pyc` - Not in git, removed manually ## Updated **knowledge/principles/systems-stewardship.md:26** - Updated gitignore example: - Old: Referenced deleted `.claude/command-templates` - New: References current `mlruns/` (MLflow tracking data) ## Context The prompt orchestrator (utils/prompt_orchestrator.py) was removed in commit 688fe9d along with 1,131 lines of template generation tooling. These docs were orphaned but not removed at the time. ## Impact - 3 docs files removed (~150 lines) - 1 procedure removed (42 lines) - 1 principle example updated - Zero functional loss - all referenced deleted systems Related to #1355 (orchestrator removal) Related to #1352 (plugin system replacement) Principle: subtraction-creates-value
Remove all documentation, procedures, and vestigial syntax for the prompt orchestrator system deleted in PR #1355 (Oct 9, 2025). The entire template generation architecture was replaced by Claude Code's native plugin system. ## Files Removed **Documentation (obsolete):** - `docs/prompt-orchestration.md` - Described template syntax for deleted orchestrator - `docs/prompt-orchestrator-security.md` - Security docs for deleted code **Procedure (obsolete):** - `knowledge/procedures/command-lifecycle-management.md` - Referenced deleted tools: - utils/sync-claude-commands.sh (removed PR #1355) - utils/generate-commands.sh (removed PR #1355) - .claude/command-templates/ (never existed) **Artifacts (untracked):** - `utils/__pycache__/prompt_orchestrator.cpython-312.pyc` - Not in git, removed manually ## Vestigial Syntax Removed **commands/close-issue.md** - Removed 2 non-functional markers: - Line 52: `{{ INJECT:principles/tracer-bullets.md }}` - Line 69: `{{ INJECT:principles/eager-evolution.md }}` **commands/extract-best-frame.md** - Removed 1 non-functional marker: - Line 211: `{{ INJECT:principles/tracer-bullets.md }}` These `{{ INJECT: }}` markers were remnants of the deleted orchestrator's template processing. They're not processed by any current system - GitHub Actions only processes `{{ KNOWLEDGE_BASE }}` and local commands don't process them at all. The principles are already available in context, making these markers vestigial documentation cruft. ## Updated **knowledge/principles/systems-stewardship.md:26** - Updated gitignore example: - Old: Referenced deleted `.claude/command-templates` - New: References current `mlruns/` (MLflow tracking data) ## Context The prompt orchestrator (utils/prompt_orchestrator.py) was removed in commit 688fe9d along with 1,131 lines of template generation tooling. These docs and syntax markers were orphaned but not removed at the time. ## Impact - 3 docs files removed (~150 lines) - 1 procedure removed (42 lines) - 3 vestigial syntax markers removed - 1 principle example updated - Zero functional loss - all referenced deleted systems or non-functional syntax Related to #1355 (orchestrator removal) Related to #1352 (plugin system replacement) Principle: subtraction-creates-value
#1377) Remove all documentation, procedures, and vestigial syntax for the prompt orchestrator system deleted in PR #1355 (Oct 9, 2025). The entire template generation architecture was replaced by Claude Code's native plugin system. ## Files Removed **Documentation (obsolete):** - `docs/prompt-orchestration.md` - Described template syntax for deleted orchestrator - `docs/prompt-orchestrator-security.md` - Security docs for deleted code **Procedure (obsolete):** - `knowledge/procedures/command-lifecycle-management.md` - Referenced deleted tools: - utils/sync-claude-commands.sh (removed PR #1355) - utils/generate-commands.sh (removed PR #1355) - .claude/command-templates/ (never existed) **Artifacts (untracked):** - `utils/__pycache__/prompt_orchestrator.cpython-312.pyc` - Not in git, removed manually ## Vestigial Syntax Removed **commands/close-issue.md** - Removed 2 non-functional markers: - Line 52: `{{ INJECT:principles/tracer-bullets.md }}` - Line 69: `{{ INJECT:principles/eager-evolution.md }}` **commands/extract-best-frame.md** - Removed 1 non-functional marker: - Line 211: `{{ INJECT:principles/tracer-bullets.md }}` These `{{ INJECT: }}` markers were remnants of the deleted orchestrator's template processing. They're not processed by any current system - GitHub Actions only processes `{{ KNOWLEDGE_BASE }}` and local commands don't process them at all. The principles are already available in context, making these markers vestigial documentation cruft. ## Updated **knowledge/principles/systems-stewardship.md:26** - Updated gitignore example: - Old: Referenced deleted `.claude/command-templates` - New: References current `mlruns/` (MLflow tracking data) ## Context The prompt orchestrator (utils/prompt_orchestrator.py) was removed in commit 688fe9d along with 1,131 lines of template generation tooling. These docs and syntax markers were orphaned but not removed at the time. ## Impact - 3 docs files removed (~150 lines) - 1 procedure removed (42 lines) - 3 vestigial syntax markers removed - 1 principle example updated - Zero functional loss - all referenced deleted systems or non-functional syntax Related to #1355 (orchestrator removal) Related to #1352 (plugin system replacement) Principle: subtraction-creates-value
Git Statistics
Summary
Transforms dotfiles into a Claude Code plugin that can be installed in any repo, solving the problem of sharing slash commands across multiple repositories.
The Problem: PR #1344 added
/close-issuevia symlink in dotfiles, but other repos (like lifehacking) can't access it. The old command generation system that synced to~/.claude/commands/was removed in #1320 for provider-agnostic reasons.The Solution: Use Claude Code's official plugin system introduced in their recent plugins announcement. Dotfiles becomes a shareable plugin that other repos can install.
What Changed
Created plugin structure:
Benefits
🎯 Modern Approach:
🔧 Technical:
Installation in Other Repos
Local (for testing):
/plugin marketplace add ~/ppv/pillars/dotfiles /plugin install dotfiles-commandsGitHub (after merge):
Implementation Notes
This "dotfiles-as-plugin" approach:
Test Plan
.claude-plugin/structure with manifests/close-issueautocomplete works after plugin installRelated: Continues the work from #1344 (symlink approach) by making it shareable across repos