workflow-tools
Work smarter with loop detection, parallel decisions, and file size analysis
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install clawskills:clawskills~leegitw-workflow-toolscURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/clawskills%3Aclawskills~leegitw-workflow-tools/file -o leegitw-workflow-tools.mdGit 仓库获取源码
git clone leegitw/workflow-tools# workflow-tools (工具)
Unified skill for workflow utilities including open loop detection, parallel/serial
decision framework, MCE file analysis, and subworkflow spawning. Consolidates 4 skills.
**Trigger**: 明示呼出 (explicit invocation)
**Source skills**: loop-closer, parallel-decision, MCE (minimal-context-engineering), subworkflow-spawner
**Removed**: pbd-strength-classifier (redundant with `/fm classify`)
## Installation
```bash
openclaw install leegitw/workflow-tools
```
**Dependencies**:
- `leegitw/failure-memory` (for loop context)
- `leegitw/constraint-engine` (for enforcement context)
```bash
# Install with dependencies
openclaw install leegitw/context-verifier
openclaw install leegitw/failure-memory
openclaw install leegitw/constraint-engine
openclaw install leegitw/workflow-tools
```
**Standalone usage**: Loop detection, parallel decisions, and MCE analysis work independently.
Full integration provides constraint-aware workflow recommendations.
**Data handling**: This skill operates within your agent's trust boundary. When triggered,
it uses your agent's configured model for workflow analysis and decision support. No external APIs
or third-party services are called. Results are written to `output/` subdirectories in your workspace.
**⚠️ File access**: This skill reads user-specified directories and files for analysis:
- `/wt loops [path]` scans the specified directory (default: current working directory)
- `/wt mce <file>` reads the specified file for size analysis
The metadata declares only config and output paths. See Security Considerations for details.
## What This Solves
Workflows accumulate friction — loops that never close, decisions about parallel vs serial execution, files that grow too large. This skill provides utilities for common workflow problems:
1. **Loop detection** — find DEFERRED, PLACEHOLDER, and TODO markers before marking work complete
2. **Parallel decisions** — 5-factor framework for when to parallelize vs serialize
3. **MCE analysis** — identify files exceeding size thresholds, suggest splits
**The insight**: Small tools that do one thing well. Don't overthink the workflow — detect, decide, analyze, move on.
## Usage
```
/wt <sub-command> [arguments]
```
## Sub-Commands
| Command | CJK | Logic | Trigger |
|---------|-----|-------|---------|
| `/wt loops` | 循環 | scan(DEFERRED∨PLACEHOLDER∨TODO)→openloop[] | Explicit |
| `/wt parallel` | 並列 | 5因子→serial∨parallel | Explicit |
| `/wt mce` | 極限 | file.lines>200→split_suggestions[] | Explicit |
| `/wt subworkflow` | 副流 | task→spawn(clawhub.skill) | Explicit |
## Arguments
### /wt loops
| Argument | Required | Description |
|----------|----------|-------------|
| path | No | Directory to scan (default: current) |
| --pattern | No | Custom patterns to detect (comma-separated) |
| --exclude | No | Paths to exclude (comma-separated) |
### /wt parallel
| Argument | Required | Description |
|----------|----------|-------------|
| task | Yes | Description of task to evaluate |
| --factors | No | Specific factors to evaluate (default: all 5) |
### /wt mce
| Argument | Required | Description |
|----------|----------|-------------|
| file | Yes | File to analyze |
| --threshold | No | Line threshold (default: 200) |
| --suggest | No | Generate split suggestions |
### /wt subworkflow
| Argument | Required | Description |
|----------|----------|-------------|
| task | Yes | Task description |
| --skill | No | Specific ClawHub skill to use |
| --background | No | Run in background |
## Configuration
Configuration is loaded from (in order of precedence):
1. `.openclaw/workflow-tools.yaml` (OpenClaw standard)
2. `.claude/workflow-tools.yaml` (Claude Code compatibility)
3. Defaults (built-in)
```yaml
# .openclaw/workflow-tools.yaml
loops:
patterns: # Patterns to detect as open loops
- "TODO:"
- "FIXME:"
- "HACK:"
- "XXX:"
- "DEFERRED:"
- "PLACEHOLDER:"
exclude: # Paths to exclude from scanning
- "vendor/"
- "node_modules/"
mce:
threshold: 200 # Line threshold for MCE compliance
warning_threshold: 300 # Line threshold for warning
parallel:
default_factors: 5 # Number of factors to evaluate
```
## Core Logic
### Open Loop Detection
Scans for unclosed work items:
| Pattern | Type | Example |
|---------|------|---------|
| `DEFERRED:` | Postponed work | `// DEFERRED: handle edge case` |
| `PLACEHOLDER:` | Temporary code | `// PLACEHOLDER: implement auth` |
| `TODO:` | Task marker | `// TODO: add error handling` |
| `FIXME:` | Bug marker | `// FIXME: race condition` |
| `HACK:` | Technical debt | `// HACK: workaround for bug` |
| `XXX:` | Attention needed | `// XXX: review this logic` |
### Parallel vs Serial Decision Framework
Five factors determine parallel suitability:
| Factor | Question | Parallel If | Serial If |
|--------|----------|-------------|-----------|
| **Team** | Can different people work on parts? | Independent parts | Shared expertise needed |
| **Coupling** | How connected are the tasks? | Loose coupling | Tight coupling |
| **Interface** | Are boundaries clear? | Well-defined | Fluid/evolving |
| **Pattern** | Is approach consistent? | Divergent exploration | Convergent refinement |
| **Integration** | How complex is merging? | Simple merge | Complex coordination |
Decision matrix:
| Factors favoring parallel | Recommendation |
|---------------------------|----------------|
| 5/5 | Strongly parallel |
| 4/5 | Parallel with coordination checkpoints |
| 3/5 | Consider case-by-case |
| 2/5 | Serial with parallel sub-tasks |
| 0-1/5 | Serial |
### MCE (Minimal Context Engineering)
File size thresholds for context efficiency:
| Lines | Status | Action |
|-------|--------|--------|
| ≤200 | ✓ MCE compliant | No action needed |
| 201-300 | ⚠ Approaching limit | Consider refactoring |
| >300 | ✗ Exceeds MCE | Split recommended |
Split suggestions based on:
- Function/method boundaries
- Logical groupings
- Import dependencies
- Test coverage boundaries
### Subworkflow Spawning
Delegate tasks to specialized ClawHub skills:
```
Task → Skill Selection → Spawn → Monitor → Collect Results
```
Available skill categories:
- `research-*`: Investigation and analysis
- `generate-*`: Content generation
- `validate-*`: Verification and testing
- `transform-*`: Data transformation
### Example: Deployment Workflow Analysis
```
/wt parallel "Deploy new payment service to production"
[PARALLEL VS SERIAL ANALYSIS]
Task: "Deploy new payment service to production"
Factor Analysis:
1. Team: ✗ Serial - Single SRE team handles deploys
2. Coupling: ✗ Serial - Payment depends on auth service
3. Interface: ✓ Parallel - Clear API contracts defined
4. Pattern: ✗ Serial - Requires sequential rollout (canary → staging → prod)
5. Integration: ✗ Serial - Payment gateway integration must be verified
Score: 1/5 factors favor parallel
Recommendation: SERIAL deployment
Rationale: High-risk service requiring careful sequential verification.
```
### Example: Infrastructure Loop Detection
```
/wt loops infra/ --pattern "MANUAL:,HARDCODED:"
[OPEN LOOPS DETECTED]
Scanned: ./infra
Files checked: 23
Infrastructure Issues (5):
infra/terraform/main.tf:45 HARDCODED: AWS region
infra/k8s/deployment.yaml:78 MANUAL: replica count
infra/docker/Dockerfile:12 TODO: multi-stage build
infra/scripts/deploy.sh:34 FIXME: rollback not implemented
infra/helm/values.yaml:56 PLACEHOLDER: production secrets
Summary: 2 high, 2 medium, 1 low priority
Action: Address HARDCODED and FIXME before next release.
```
## Output
### /wt loops output
```
[OPEN LOOPS DETECTED]
Scanned: ./src
Files checked: 47
Open loops found (12):
High Priority (FIXME, XXX):
src/auth/handler.go:45 FIXME: race condition in token refresh
src/api/client.go:123 XXX: review error handling
Medium Priority (TODO):
src/handlers/user.go:78 TODO: add input validation
src/db/queries.go:234 TO