feat(workflow): Add workflow plugin v1.0.0
Git workflow, code quality, context management and testing commands: - commit, push, pr, issue - git operations - simplify, refactor, verify, check - code quality - catchup, onboard, save, cleanup - context management - test, format, sync - development utilities Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
158
plugins/workflow/README.md
Normal file
158
plugins/workflow/README.md
Normal file
@@ -0,0 +1,158 @@
|
||||
# Workflow Plugin for Claude Code
|
||||
|
||||
A comprehensive plugin providing Git workflow, code quality, testing, and context management commands for Claude Code.
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Add to your project
|
||||
claude plugins add workflow --source https://gitea.romfast.ro/romfast/claude-plugins
|
||||
|
||||
# Or test locally
|
||||
claude --plugin-dir ./plugins/workflow
|
||||
```
|
||||
|
||||
## Commands Overview
|
||||
|
||||
### Git Workflow (5 commands)
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `/workflow:commit` | Smart commit with conventional message |
|
||||
| `/workflow:push` | Push with safety checks |
|
||||
| `/workflow:pr` | Create PR with auto-generated summary |
|
||||
| `/workflow:sync` | Pull + rebase + push in one command |
|
||||
| `/workflow:issue <n>` | Analyze and fix GitHub issue #n |
|
||||
|
||||
### Code Quality (4 commands)
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `/workflow:simplify` | Reduce code complexity without changing behavior |
|
||||
| `/workflow:format` | Run code formatters (prettier, eslint, black) |
|
||||
| `/workflow:cleanup` | Remove unused imports and dead code |
|
||||
| `/workflow:refactor` | Detect patterns and suggest improvements |
|
||||
|
||||
### Testing & Verification (3 commands)
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `/workflow:test` | Smart test runner (changed files only) |
|
||||
| `/workflow:check` | Run typecheck + lint + test combined |
|
||||
| `/workflow:verify` | End-to-end verification of implementation |
|
||||
|
||||
### Context Management (3 commands)
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `/workflow:catchup` | Rebuild context after /clear |
|
||||
| `/workflow:save` | Save progress to HANDOFF.md |
|
||||
| `/workflow:onboard` | Quick onboarding to a new project |
|
||||
|
||||
## Usage Examples
|
||||
|
||||
### Daily Workflow
|
||||
|
||||
```bash
|
||||
# Start of day - sync your branch
|
||||
/workflow:sync
|
||||
|
||||
# After implementing a feature
|
||||
/workflow:check # Verify everything works
|
||||
/workflow:commit # Create commit
|
||||
|
||||
# Create PR when ready
|
||||
/workflow:pr
|
||||
|
||||
# End of day - save context
|
||||
/workflow:save
|
||||
/clear
|
||||
|
||||
# Next session - restore context
|
||||
/workflow:catchup
|
||||
```
|
||||
|
||||
### Fix a GitHub Issue
|
||||
|
||||
```bash
|
||||
/workflow:issue 42
|
||||
```
|
||||
|
||||
This will:
|
||||
1. Fetch issue details from GitHub
|
||||
2. Search codebase for relevant files
|
||||
3. Implement the fix
|
||||
4. Run tests
|
||||
5. Create a commit referencing the issue
|
||||
|
||||
### Code Review Workflow
|
||||
|
||||
```bash
|
||||
# After making changes
|
||||
/workflow:verify # Full verification
|
||||
/workflow:simplify # Simplify if needed
|
||||
/workflow:commit # Commit changes
|
||||
/workflow:pr # Create PR
|
||||
```
|
||||
|
||||
### New Project Onboarding
|
||||
|
||||
```bash
|
||||
cd /path/to/new/project
|
||||
claude
|
||||
|
||||
# In Claude:
|
||||
/workflow:onboard
|
||||
```
|
||||
|
||||
## Subagents
|
||||
|
||||
The plugin includes specialized subagents for complex tasks:
|
||||
|
||||
### code-simplifier
|
||||
Used by `/workflow:simplify` for multi-file simplification.
|
||||
|
||||
### app-verifier
|
||||
Used by `/workflow:verify` for comprehensive verification.
|
||||
|
||||
## Templates
|
||||
|
||||
Located in `templates/`:
|
||||
|
||||
- `commit-message.md` - Conventional commit format
|
||||
- `pr-template.md` - Pull request body template
|
||||
- `handoff-template.md` - Context handoff format
|
||||
|
||||
## Configuration
|
||||
|
||||
The plugin auto-detects your project's tech stack and tools. No configuration needed.
|
||||
|
||||
### Supported Stacks
|
||||
|
||||
- **JavaScript/TypeScript**: Jest, Vitest, ESLint, Prettier
|
||||
- **Python**: pytest, mypy, ruff, black
|
||||
- **Go**: go test, go fmt
|
||||
- **Rust**: cargo test, cargo fmt
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Use `/workflow:check` before committing** - Catch issues early
|
||||
2. **Use `/workflow:save` before `/clear`** - Preserve context
|
||||
3. **Use `/workflow:catchup` to restore context** - Continue seamlessly
|
||||
4. **Use `/workflow:issue` for GitHub issues** - Automate the fix process
|
||||
|
||||
## Inspiration
|
||||
|
||||
This plugin is inspired by:
|
||||
- [wshobson/commands](https://github.com/wshobson/commands)
|
||||
- [awesome-claude-code](https://github.com/hesreallyhim/awesome-claude-code)
|
||||
- [claude-code-tips](https://github.com/ykdojo/claude-code-tips)
|
||||
- [Anthropic Best Practices](https://www.anthropic.com/engineering/claude-code-best-practices)
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions welcome! Please follow the conventional commit format.
|
||||
Reference in New Issue
Block a user