Skills.MD
# Fix PR Review Workflow
Workflow for addressing review comments on pull requests.
## Prerequisites
- PR number is required
- Use `git-workflow` Skill for commit conventions
## Process Overview
```
1. Fetch PR details
2. Get review comments
3. Classify by file type
4. Load appropriate development skill
5. Fix each comment
6. Run verification
7. Push changes
```
## Step 1: Fetch PR Information
```bash
# Get PR details
gh pr view {pr_number}
# Get PR diff to see modified files
gh pr diff {pr_number} --name-only
# Get review comments
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments
```
## Step 2: Classify by Modified Files
| Files Modified | Development Skill |
|----------------|-------------------|
| `internal/`, `pkg/`, `cmd/`, `*.go` | `go-development` |
| `apps/ripple-lib-server/`, `*.ts` | `typescript-development` |
| `apps/erc20-token/contracts/`, `*.sol` | `solidity-development` |
| `scripts/`, `*.sh` | `shell-scripts` |
| `Makefile`, `make/*.mk` | `makefile-update` |
| `tools/atlas/`, `*.sql`, `*.hcl` | `db-migration` |
| `docs/`, `*.md` | `docs-update` |
## Step 3: Load Development Skill
Based on classification, load the appropriate skill:
| Skill | Path |
|-------|------|
| Go | `.claude/skills/go-development/SKILL.md` |
| TypeScript | `.claude/skills/typescript-development/SKILL.md` |
| Solidity | `.claude/skills/solidity-development/SKILL.md` |
| Shell | `.claude/skills/shell-scripts/SKILL.md` |
| Makefile | `.claude/skills/makefile-update/SKILL.md` |
| Database | `.claude/skills/db-migration/SKILL.md` |
| Docs | `.claude/skills/docs-update/SKILL.md` |
## Step 4: Address Comments
### Priority Order
1. **Security** - Address security concerns first
2. **Functionality** - Fix bugs or logic issues
3. **Code Quality** - Style, naming, documentation
### Comment Categories
| Category | Action |
|----------|--------|
| Bug fix requested | Fix the issue, add test if applicable |
| Refactoring suggestion | Apply if improves readability |
| Style/naming | Follow project conventions |
| Documentation | Add/update comments |
| Question | Respond in code comment or PR |
## Step 5: Run Verification
Run verification commands from the loaded development skill:
### Go Files
```bash
make go-lint && make tidy && make check-build && make gotest
```
### TypeScript Files
```bash
cd apps/ripple-lib-server && npm run lint && npm run build && npm test
```
### Shell Scripts
```bash
make shfmt
```
### Multiple Languages
If PR modifies multiple file types, run all applicable verification commands.
## Step 6: Commit and Push
```bash
# Stage changes
git add .
# Commit with descriptive message
git commit -m "$(cat <<'EOF'
fix(scope): address PR review comments
- Fix: [specific fix 1]
- Fix: [specific fix 2]
- Update: [update description]
EOF
)"
# Push to update PR
git push
```
## Common Review Patterns
### Error Handling (Go)
**Review comment**: "Missing error context"
```go
// Before
return err
// After
return fmt.Errorf("failed to create wallet: %w", err)
```
### Logging Security
**Review comment**: "Don't log sensitive data"
```go
// Before
log.Info("Processing key", "key", privateKey)
// After
log.Info("Processing key", "keyID", keyID)
```
### Code Duplication
**Review comment**: "Extract to helper function"
```go
// Before: Duplicated code in multiple places
// After: Create helper function
func helperFunction(params) result {
// extracted logic
}
```
## Related Skills
- `go-development` - Go code changes
- `typescript-development` - TypeScript changes
- `shell-scripts` - Shell script changes
- `git-workflow` - Branch and commit workflow
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「fix-pr-review」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次