Skip to content

Commit 65bcb5d

Browse files
duyetclaudeduyetbot
authored
feat(github,commit): remove terminal-ui-design, add batch ops and PR templates (#20)
* feat(github,commit): remove terminal-ui-design, add batch ops and PR templates - Remove terminal-ui-design plugin (consolidated with frontend-design) - Add GitHub batch commands: bulk-close-issues, bulk-merge-prs, bulk-label - Add PR templates to commit plugin (default, bugfix, feature) - Add PR automation GitHub Action for auto-labeling and reviewer assignment - Enhance GitHub documentation with examples, troubleshooting, and gotchas - Add github/examples/ directory with automation scripts - Update plugin versions: github@1.2.0, commit@1.3.0 Co-Authored-By: duyetbot <duyetbot@users.noreply.github.com> * feat(github): add watch-and-fix command for automated PR fix loop - Add /github:watch-and-fix command that watches PR, fixes issues from AI reviews, and auto-merges when ready - Add options: --auto-merge, --max-iterations, --dry-run, --pr - Add watch-and-fix.sh example script with full implementation - Update github plugin to v1.3.0 - Update documentation with watch-and-fix usage examples Co-Authored-By: duyetbot <duyetbot@users.noreply.github.com> --------- Co-authored-by: Claude Code <claude@anthropic.com> Co-authored-by: duyetbot <duyetbot@users.noreply.github.com>
1 parent 10abd81 commit 65bcb5d

27 files changed

Lines changed: 1372 additions & 330 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
"source": "./commit",
1515
"description": "Create a Git commit with semantic commit message format"
1616
},
17-
{
18-
"name": "terminal-ui-design",
19-
"source": "./terminal-ui-design",
20-
"description": "Create distinctive, production-grade terminal user interfaces with high design quality"
21-
},
2217
{
2318
"name": "frontend-design",
2419
"source": "./frontend-design",

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Add any other context or screenshots about the feature request here.
2222
**Which plugin would this affect?**
2323
- [ ] team-agents
2424
- [ ] commit
25-
- [ ] terminal-ui-design
2625
- [ ] frontend-design
2726
- [ ] interview
2827
- [ ] statusline

.github/workflows/pr-automation.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
description: >-
3+
Agentic workflow for PR automation: auto-label based on changed files,
4+
auto-assign reviewers based on code ownership, and welcome first-time contributors.
5+
---
6+
7+
# PR Automation Workflow
8+
9+
Automatically triages pull requests with labels, reviewers, and welcome messages.
10+
11+
## Triggers
12+
13+
- `pull_request: opened` - When a new PR is opened
14+
- `pull_request: reopened` - When a PR is reopened
15+
16+
## Features
17+
18+
### Auto-Label
19+
Labels PRs based on changed file paths:
20+
- `area:api` - Changes in `src/api/` or `api/`
21+
- `area:frontend` - Changes in `src/frontend/`, `components/`, or `ui/`
22+
- `area:backend` - Changes in `src/backend/` or `server/`
23+
- `area:docs` - Changes in `docs/` or `*.md` files
24+
- `area:tests` - Changes in `tests/` or `test/`
25+
- `type:breaking` - If commit contains "BREAKING CHANGE"
26+
- `documentation` - If only documentation files changed
27+
28+
### Auto-Assign Reviewers
29+
Assigns reviewers based on changed files:
30+
- Frontend changes → `frontend-team` team
31+
- Backend changes → `backend-team` team
32+
- API changes → `api-team` team
33+
- Infrastructure → `devops-team` team
34+
35+
### Welcome First-Time Contributors
36+
For first-time contributors:
37+
- Adds `first-time-contributor` label
38+
- Posts welcome message with contribution guidelines
39+
40+
## Configuration
41+
42+
### Custom Labels
43+
Edit the workflow file to add custom label patterns:
44+
45+
```yaml
46+
- name: Auto-label
47+
run: |
48+
# Add custom patterns here
49+
if echo "$FILES" | grep -q "^path/to/files/"; then
50+
gh pr edit "$PR_NUMBER" --add-label "custom-label"
51+
fi
52+
```
53+
54+
### Custom Reviewers
55+
Edit the reviewer mapping:
56+
57+
```yaml
58+
- name: Auto-assign reviewers
59+
run: |
60+
# Map file paths to reviewers/teams
61+
if echo "$FILES" | grep -q "^your/path/"; then
62+
gh pr edit "$PR_NUMBER" --add-reviewer "your-team"
63+
fi
64+
```
65+
66+
### Custom Welcome Message
67+
Edit the welcome comment:
68+
69+
```yaml
70+
- name: Welcome first-time contributors
71+
run: |
72+
gh pr comment "$PR_NUMBER" --body "Your custom welcome message"
73+
```
74+
75+
## Permissions
76+
77+
The workflow requires the following permissions:
78+
- `pull-requests: write` - To add labels and comments
79+
- `contents: read` - To read repository files
80+
81+
## Usage
82+
83+
The workflow runs automatically on PR creation. No manual invocation needed.
84+
85+
To test changes to the workflow:
86+
1. Create a test branch
87+
2. Make a small change
88+
3. Open a PR
89+
4. Verify labels and assignments are applied
90+
91+
## Example Output
92+
93+
For a PR changing `src/api/users.ts`:
94+
- Labels applied: `area:api`, `area:backend`
95+
- Reviewers assigned: `api-team`
96+
- If first-time contributor: Welcome comment posted
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: PR Automation
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
permissions:
8+
pull-requests: write
9+
contents: read
10+
11+
jobs:
12+
pr-automation:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Get changed files
19+
id: changed-files
20+
run: |
21+
# Get list of changed files
22+
FILES=$(gh pr diff "$PR_NUMBER" --name-only)
23+
echo "files<<EOF" >> $GITHUB_OUTPUT
24+
echo "$FILES" >> $GITHUB_OUTPUT
25+
echo "EOF" >> $GITHUB_OUTPUT
26+
env:
27+
PR_NUMBER: ${{ github.event.pull_request.number }}
28+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Auto-label based on files
31+
run: |
32+
PR_NUMBER=${{ github.event.pull_request.number }}
33+
FILES="${{ steps.changed-files.outputs.files }}"
34+
35+
# Area labels based on file paths
36+
if echo "$FILES" | grep -q "^src/api/\|^api/"; then
37+
gh pr edit "$PR_NUMBER" --add-label "area:api"
38+
fi
39+
40+
if echo "$FILES" | grep -q "^src/frontend/\|^components/\|^ui/"; then
41+
gh pr edit "$PR_NUMBER" --add-label "area:frontend"
42+
fi
43+
44+
if echo "$FILES" | grep -q "^src/backend/\|^server/"; then
45+
gh pr edit "$PR_NUMBER" --add-label "area:backend"
46+
fi
47+
48+
if echo "$FILES" | grep -q "^docs/\|\.md$"; then
49+
gh pr edit "$PR_NUMBER" --add-label "area:docs"
50+
fi
51+
52+
if echo "$FILES" | grep -q "^tests/\|^test/"; then
53+
gh pr edit "$PR_NUMBER" --add-label "area:tests"
54+
fi
55+
56+
# Check for breaking changes in commits
57+
COMMITS=$(gh api repos/${{ github.repository }}/pulls/$PR_NUMBER/commits --jq '.[].commit.message' | grep -i "BREAKING CHANGE" || true)
58+
if [ -n "$COMMITS" ]; then
59+
gh pr edit "$PR_NUMBER" --add-label "type:breaking"
60+
fi
61+
62+
# Documentation only
63+
if echo "$FILES" | grep -v "^docs/\|\.md$" | grep -q .; then
64+
:
65+
else
66+
gh pr edit "$PR_NUMBER" --add-label "documentation"
67+
fi
68+
env:
69+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
71+
- name: Auto-assign reviewers based on files
72+
run: |
73+
PR_NUMBER=${{ github.event.pull_request.number }}
74+
FILES="${{ steps.changed-files.outputs.files }}"
75+
76+
# Assign reviewers based on code areas
77+
if echo "$FILES" | grep -q "^src/frontend/\|^components/\|^ui/"; then
78+
gh pr edit "$PR_NUMBER" --add-reviewer "frontend-team" || true
79+
fi
80+
81+
if echo "$FILES" | grep -q "^src/backend/\|^server/"; then
82+
gh pr edit "$PR_NUMBER" --add-reviewer "backend-team" || true
83+
fi
84+
85+
if echo "$FILES" | grep -q "^src/api/\|^api/"; then
86+
gh pr edit "$PR_NUMBER" --add-reviewer "api-team" || true
87+
fi
88+
89+
if echo "$FILES" | grep -q "^infra/\|^deploy/\|^\.github/"; then
90+
gh pr edit "$PR_NUMBER" --add-reviewer "devops-team" || true
91+
fi
92+
env:
93+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
94+
95+
- name: Welcome first-time contributors
96+
run: |
97+
PR_NUMBER=${{ github.event.pull_request.number }}
98+
AUTHOR=${{ github.event.pull_request.user.login }}
99+
100+
# Check if this is the author's first PR
101+
PR_COUNT=$(gh pr list --author "$AUTHOR" --state all --limit 1 --json number --jq 'length')
102+
103+
if [ "$PR_COUNT" -eq 1 ]; then
104+
gh pr edit "$PR_NUMBER" --add-label "first-time-contributor"
105+
106+
gh pr comment "$PR_NUMBER" --body '## Welcome! 👋
107+
108+
Thank you for your first contribution to this project! We appreciate you taking the time to improve our codebase.
109+
110+
### Next Steps
111+
- A maintainer will review your PR shortly
112+
- Please check for any review comments and address them
113+
- Feel free to ask questions if anything is unclear
114+
115+
### Contribution Guidelines
116+
- Ensure all tests pass
117+
- Update documentation if needed
118+
- Keep changes focused and atomic
119+
120+
Thanks again for contributing! 🎉'
121+
fi
122+
env:
123+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111
- Marketplace.json for centralized plugin registry
1212
- GitHub issue templates (bug report, feature request)
13+
- GitHub batch commands: bulk-close-issues, bulk-merge-prs, bulk-label
14+
- PR templates for commit plugin (default, bugfix, feature)
15+
- PR automation GitHub Action for auto-labeling and reviewer assignment
16+
- Enhanced GitHub documentation with examples and troubleshooting
1317

1418
### Changed
1519
- Improved documentation consistency across plugins
1620
- Better version tracking in plugin manifests
21+
- GitHub plugin: Enhanced batch operations and PR workflow
22+
- Commit plugin: Added PR template support and draft PR option
23+
24+
### Removed
25+
- terminal-ui-design plugin (consolidated with frontend-design)
1726

1827
### Fixed
1928

@@ -22,7 +31,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2231
### Added
2332
- team-agents: Leader, Senior Engineer, Junior Engineer for parallel execution
2433
- commit: Semantic commit message format with PR workflows
25-
- terminal-ui-design: Production-grade terminal UI creation
2634
- frontend-design: Anti-slop frontend design patterns
2735
- interview: Socratic requirements gathering
2836
- statusline: Configurable status bar with API tracking

README.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Available on **[skills.sh](https://skills.sh)** — the open agent skills ecosys
2121
# Install plugins
2222
/plugin install team-agents@duyet-claude-plugins
2323
/plugin install commit@duyet-claude-plugins
24-
/plugin install terminal-ui-design@duyet-claude-plugins
2524
/plugin install frontend-design@duyet-claude-plugins
2625
/plugin install interview@duyet-claude-plugins
2726
/plugin install statusline@duyet-claude-plugins
@@ -64,7 +63,6 @@ npx skills add duyet/claude-plugins
6463
|--------|------|--------------|
6564
| [👥 team-agents](#👥-team-agents) | Skill | Leader, Senior Engineer, and Junior Engi... |
6665
| [📝 commit](#📝-commit) | Command | Create a Git commit with semantic commit... |
67-
| [🎨 terminal-ui-design](#🎨-terminal-ui-design) | Skill | Create distinctive, production-grade ter... |
6866
| [🎨 frontend-design](#🎨-frontend-design) | Skill | Create distinctive, production-grade fro... |
6967
| [💬 interview](#💬-interview) | Command | Conduct in-depth requirements interviews... |
7068
| [📊 statusline](#📊-statusline) | Hook | Configurable status bar showing context ... |
@@ -115,17 +113,6 @@ Skills:
115113

116114
---
117115

118-
### 🎨 terminal-ui-design
119-
120-
**Create distinctive, production-grade terminal user interfaces with high design quality**
121-
122-
**Components:**
123-
124-
Skills:
125-
- **terminal-ui-design**
126-
127-
---
128-
129116
### 🎨 frontend-design
130117

131118
**Create distinctive, production-grade frontend interfaces avoiding AI slop aesthetics. Emphasizes shadcn/ui, Recharts, and bold design choices.**

commit/.claude-plugin/plugin.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "commit",
3-
"description": "Create a Git commit with semantic commit message format",
4-
"version": "1.2.1",
3+
"description": "Create a Git commit with semantic commit message format and PR workflow with templates",
4+
"version": "1.3.0",
55
"author": {
66
"name": "duyet"
77
}

commit/.pr-templates/bugfix.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Summary
2+
Fixes {{ issue description }}
3+
4+
## Root Cause
5+
{{ explanation of what was causing the bug }}
6+
7+
## Solution
8+
{{ how the bug was fixed }}
9+
10+
## Changes
11+
- {{ change 1 }}
12+
- {{ change 2 }}
13+
14+
## Testing
15+
{{ how the fix was tested }}
16+
17+
## Regression Risk
18+
{{ assessment of potential side effects }}
19+
20+
## Related Issues
21+
Closes #{{ issue number }}
22+
23+
---
24+
Generated with [Claude Code](https://claude.com/claude-code)

commit/.pr-templates/default.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## Summary
2+
{{ brief description of what this PR does }}
3+
4+
## Changes
5+
- {{ key change 1 }}
6+
- {{ key change 2 }}
7+
- {{ key change 3 }}
8+
9+
## Context
10+
{{ background information, motivation, or link to issue }}
11+
12+
## Testing
13+
{{ how the changes were tested }}
14+
15+
## Checklist
16+
- [ ] Tests pass
17+
- [ ] Documentation updated (if needed)
18+
- [ ] No breaking changes (or documented)
19+
20+
---
21+
Generated with [Claude Code](https://claude.com/claude-code)

commit/.pr-templates/feature.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Summary
2+
{{ feature description }}
3+
4+
## Motivation
5+
{{ why this feature is needed }}
6+
7+
## Implementation
8+
{{ high-level overview of implementation }}
9+
10+
## Changes
11+
- {{ change 1 }}
12+
- {{ change 2 }}
13+
- {{ change 3 }}
14+
15+
## Breaking Changes
16+
{{ list any breaking changes, or "None" }}
17+
18+
## Migration Guide
19+
{{ if breaking changes, how users should migrate }}
20+
21+
## Testing
22+
{{ how the feature was tested }}
23+
24+
## Documentation
25+
{{ link to documentation updates, or "N/A" }}
26+
27+
## Related Issues
28+
Closes #{{ issue number }}
29+
30+
---
31+
Generated with [Claude Code](https://claude.com/claude-code)

0 commit comments

Comments
 (0)