Skip to content

Commit 6345984

Browse files
committed
feat: add new tests and readme
1 parent b7f7b65 commit 6345984

13 files changed

Lines changed: 3269 additions & 559 deletions

.claude/command/gh-pr.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Create a PR on github with an accurate description following our naming convention for the current changes. $ARGUMENTS

.claude/skills/create-skill.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
name: create-skill
3+
description: Use when creating new Claude Code skills - guides SKILL.md structure, description writing, and file organization
4+
---
5+
6+
# Creating Claude Code Skills
7+
8+
Skills are directories with a `SKILL.md` file that extend Claude's capabilities. Claude auto-discovers them based on the description field.
9+
10+
## Location
11+
12+
```bash
13+
.claude/skills/skill-name/ # Project (shared via git)
14+
~/.claude/skills/skill-name/ # Personal (local only)
15+
```
16+
17+
## SKILL.md Structure
18+
19+
```yaml
20+
---
21+
name: kebab-case-name # Lowercase, hyphens, numbers. Max 64 chars
22+
description: [WHAT] + [WHEN] # Max 1024 chars. THIS IS HOW CLAUDE FINDS IT
23+
allowed-tools: Read, Grep # Optional: restrict to specific tools
24+
---
25+
26+
# Skill Title
27+
28+
## Instructions
29+
30+
Clear, actionable guidance for Claude. Include examples inline if short.
31+
```
32+
33+
## The Description is Everything
34+
35+
Claude decides when to use a skill based ONLY on the description. Be specific about both WHAT and WHEN.
36+
37+
```yaml
38+
# ✓ Good - clear trigger conditions
39+
description: Use when creating pull requests - handles branch naming, commit messages, and PR descriptions
40+
41+
# ✓ Good - specific scope
42+
description: Write SEO-optimized markdown articles with proper frontmatter and structure
43+
44+
# ✗ Bad - vague, no trigger
45+
description: Helps with git stuff
46+
47+
# ✗ Bad - what but no when
48+
description: Formats code according to standards
49+
```
50+
51+
## Supporting Files (Optional)
52+
53+
Most skills only need `SKILL.md`. Add supporting files ONLY when the content is too large or complex for the main file.
54+
55+
```
56+
my-skill/
57+
├── SKILL.md # Required - main instructions
58+
├── templates.md # Only if templates are extensive
59+
└── scripts/
60+
└── helper.sh # Only if automation is needed
61+
```
62+
63+
**When to add templates.md:**
64+
- Multiple reusable formats (PR templates, code snippets, config examples)
65+
- Content too long to inline in SKILL.md
66+
67+
**When to add scripts/:**
68+
- Automation Claude should execute (build, deploy, data transform)
69+
- Complex multi-step shell commands
70+
71+
Reference them from SKILL.md when relevant:
72+
```markdown
73+
Use the PR template from [templates.md](templates.md).
74+
Run `bash scripts/deploy.sh` to publish.
75+
```
76+
77+
Claude reads supporting files on-demand - don't add them "just in case".
78+
79+
## Checklist
80+
81+
- [ ] `name`: kebab-case, ≤64 chars
82+
- [ ] `description`: includes WHAT it does AND WHEN to use it
83+
- [ ] Instructions are actionable, not vague
84+
- [ ] Tested: ask Claude "what skills handle X?" to verify discovery

.claude/skills/skill.md

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
---
2+
name: creating-pr
3+
description: Use when creating or updating pull requests with comprehensive descriptions and meaningful commits - streamlines PR workflow with branch management and commit best practices
4+
---
5+
6+
You are an expert Git and GitHub workflow automation specialist with deep knowledge of version control best practices and pull request management. Your primary responsibility is streamlining the pull request creation process, ensuring high-quality commits with meaningful descriptions.
7+
8+
## Common Operations
9+
10+
### GitHub CLI Commands Reference
11+
12+
```bash
13+
# PR Management
14+
gh pr view # View current branch PR
15+
gh pr list # List open PRs
16+
gh pr view <number> --json number -q .number # Get PR number
17+
gh pr create --title "" --body "" # Create new PR
18+
gh pr edit --body "" # Update description
19+
gh pr edit --add-label "" # Add labels
20+
21+
# Git Commands
22+
git branch --show-current # Current branch
23+
git status # Check changes
24+
git diff # View unstaged changes
25+
git diff --cached # View staged changes
26+
git diff HEAD~1..HEAD # Last commit diff
27+
git rev-parse HEAD # Get commit SHA
28+
git log -1 --pretty=%s # Last commit message
29+
```
30+
31+
## Workflow
32+
33+
### Creating/Updating Pull Requests
34+
35+
1. **Branch Management**:
36+
37+
- Check current branch: `git branch --show-current`
38+
- If on main/master/next, create feature branch with conventional naming
39+
- Switch to new branch: `git checkout -b <username>/<features|fixes>/<branch-name>`
40+
- Current branch convention `<username>/<features|fixes>/<branch-name>`
41+
42+
2. **Analyze & Stage**:
43+
44+
- Review changes: `git status` and `git diff`
45+
- Identify change type (feature, fix, refactor, docs, test, chore)
46+
- Stage ALL changes: `git add .` (preferred due to slow Husky hooks)
47+
- Verify: `git diff --cached`
48+
49+
3. **Commit & Push**:
50+
51+
- **Single Commit Strategy**: Use one comprehensive commit per push due to slow Husky hooks
52+
- Format: `type: brief description` (simple format preferred)
53+
- Commit: `git commit -m "type: description"` with average git comment
54+
- Push: `git push -u origin branch-name`
55+
56+
4. **PR Management**:
57+
58+
- Check existing: `gh pr view`
59+
- If exists: push updates, **add update comment** (preserve original description)
60+
- If not: `gh pr create` with title and description
61+
62+
## Update Comment Templates
63+
64+
When updating existing PRs, use these comment templates to preserve the original description:
65+
66+
### General PR Update Template
67+
68+
```markdown
69+
## 🔄 PR Update
70+
71+
**Commit**: `<commit-sha>` - `<commit-message>`
72+
73+
### Changes Made
74+
75+
- [List specific changes in this update]
76+
- [Highlight any breaking changes]
77+
- [Note new features or fixes]
78+
79+
### Impact
80+
81+
- [Areas of code affected]
82+
- [Performance/behavior changes]
83+
- [Dependencies updated]
84+
85+
### Testing
86+
87+
- [How to test these changes]
88+
- [Regression testing notes]
89+
90+
### Next Steps
91+
92+
- [Remaining work if any]
93+
- [Items for review focus]
94+
95+
🤖 Generated with [Claude Code](https://claude.ai/code)
96+
```
97+
98+
### Critical Fix Update Template
99+
100+
```markdown
101+
## 🚨 Critical Fix Applied
102+
103+
**Commit**: `<commit-sha>` - `<commit-message>`
104+
105+
### Issue Addressed
106+
107+
[Description of critical issue fixed]
108+
109+
### Solution
110+
111+
[Technical approach taken]
112+
113+
### Verification Steps
114+
115+
1. [Step to reproduce original issue]
116+
2. [Step to verify fix]
117+
3. [Regression test steps]
118+
119+
### Risk Assessment
120+
121+
- **Impact**: [Low/Medium/High]
122+
- **Scope**: [Files/features affected]
123+
- **Backwards Compatible**: [Yes/No - details if no]
124+
125+
🤖 Generated with [Claude Code](https://claude.ai/code)
126+
```
127+
128+
### Feature Enhancement Template
129+
130+
```markdown
131+
## ✨ Feature Enhancement
132+
133+
**Commit**: `<commit-sha>` - `<commit-message>`
134+
135+
### Enhancement Details
136+
137+
[Description of feature improvement/addition]
138+
139+
### Technical Implementation
140+
141+
- [Key architectural decisions]
142+
- [New dependencies or patterns]
143+
- [Performance considerations]
144+
145+
### User Experience Impact
146+
147+
[How this affects end users]
148+
149+
### Testing Strategy
150+
151+
[Approach to testing this enhancement]
152+
153+
🤖 Generated with [Claude Code](https://claude.ai/code)
154+
```
155+
156+
## Example Usage Patterns
157+
158+
### Creating PR:
159+
160+
1. Create branch and make changes
161+
2. Stage, commit, push → triggers PR creation
162+
3. Each subsequent push triggers update comment
163+
164+
### Commit Message Conventions
165+
166+
- `feat:` - New features
167+
- `fix:` - Bug fixes
168+
- `refactor:` - Code refactoring
169+
- `docs:` - Documentation changes
170+
- `test:` - Test additions/modifications
171+
- `chore:` - Maintenance tasks
172+
- `style:` - Formatting changes
173+
174+
### Branch Naming Conventions
175+
176+
- `feature/description` - New features
177+
- `fix/bug-description` - Bug fixes
178+
- `refactor/component-name` - Code refactoring
179+
- `docs/update-readme` - Documentation updates
180+
- `test/add-unit-tests` - Test additions

0 commit comments

Comments
 (0)