Smart Flow Tool
Powerful command for display, comprehensive, flow, status. Includes structured workflows, validation checks, and reusable patterns for git.
Smart Flow Tool
Intelligent Git Flow manager that auto-detects the appropriate workflow action based on repository state.
When to Use This Command
Run this command when you need to:
- Execute Git Flow operations without remembering specific sub-commands for each branch type
- Let the tool detect your current branch type and suggest the logical next action
- Manage complex Git Flow workflows with automatic state detection and guidance
Consider alternatives when:
- You want explicit control over every Git Flow step and prefer individual commands
- Your repository does not follow Git Flow conventions and uses a simpler branching model
Quick Start
Configuration
name: smart-flow-tool type: command category: git
Example Invocation
claude command:run smart-flow-tool --action auto
Example Output
Analyzing repository state...
Current branch: feature/payment-gateway
Branch type: feature
Base: develop
Commits ahead: 7
Working tree: clean
Tests: passing
Recommended action: FINISH
This feature branch has 7 commits and all tests pass.
Ready to merge back into develop.
Proceed with finish? [Y/n]
Merging feature/payment-gateway into develop... done.
Branch cleaned up successfully.
Core Concepts
Smart Detection Overview
| Aspect | Details |
|---|---|
| Branch Detection | Identifies feature, release, hotfix, develop, or main from branch name prefix |
| State Analysis | Checks commit count, test status, merge readiness, and upstream sync state |
| Action Mapping | Maps branch type plus state to recommended action (start, finish, publish) |
| Interactive | Prompts for confirmation before executing destructive or merge operations |
| Fallback | Falls back to manual selection when auto-detection is ambiguous |
Decision Workflow
Detect Branch Type
|
+-- feature/* --> Check tests + commits
| |
| ready? --> FINISH
| not ready? --> CONTINUE
|
+-- release/* --> Check changelog + version
| |
| tagged? --> FINISH
| not tagged? --> BUMP VERSION
|
+-- develop --> Suggest START feature or release
|
+-- main --> Suggest START hotfix if needed
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| action | string | auto | Force action: start, finish, publish, or auto for detection |
| type | string | auto | Force branch type: feature, release, hotfix, or auto |
| name | string | (none) | Name for new branches when action is start |
| skip-tests | boolean | false | Skip test execution during state analysis |
| verbose | boolean | false | Show detailed reasoning for recommended action |
Best Practices
-
Let auto-detection guide you - The tool is most valuable when you trust its recommendations. It analyzes repository state comprehensively and provides accurate suggestions based on branch conventions.
-
Use verbose mode for learning - When onboarding new team members, enable verbose mode so they can see why the tool recommends each action, building their Git Flow understanding organically.
-
Configure branch prefixes consistently - The auto-detection relies on conventional prefixes. Ensure your team uses feature/, release/, and hotfix/ consistently across all repositories.
-
Integrate with CI status - The tool checks local test results by default but configuring it to query your CI pipeline status provides more reliable readiness assessments.
-
Review before confirming - Always review the proposed action especially for finish operations that merge and delete branches. A moment of review prevents accidental data loss.
Common Issues
-
Branch type not detected - Non-standard branch names like
wip/experimentare not recognized. Rename the branch to use a standard prefix or specify the type parameter manually. -
Multiple actions seem appropriate - When the tool cannot decide between actions it prompts for manual selection. This typically happens on a feature branch with both merge-ready commits and uncommitted work.
-
Stale branch state after network changes - Run
git fetch --allbefore invoking the tool to ensure branch tracking information is current for accurate recommendations.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.