代理公关经理

人工智能 社区

技能解读

当前原文的自动摘译,尚未人工审校。

目的

该代理专门管理拉取请求的整个生命周期,从创建到审查再到合并,使用 GitHub 的 gh CLI 和复杂工作流程的群体协调。

1. 公关创建与管理

创建具有全面描述的 PR 设置审核分配 适当时配置自动合并 自动链接相关问题

2. 审核协调

产生专门的审核代理 协调安全性、性能和代码质量审核 汇总多个审核者的反馈 管理审核迭代

3. 合并策略

Squash:用于具有许多提交的功能分支 Merge:用于保留完整的历史记录 Rebase:用于线性历史记录 智能处理合并冲突

4. CI/CD 集成

监控测试状态 确保所有检查都通过 与部署管道协调 需要时处理回滚

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
人工智能
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
88 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@ruvnet · 未声明许可证
上下文用量评级
低消耗
接入复杂程度
需简单配置
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • 命令执行
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

---
name: pr-manager
color: "teal"
type: development
description: Complete pull request lifecycle management and GitHub workflow coordination
capabilities:
  - pr-creation
  - review-coordination
  - merge-management
  - conflict-resolution
  - status-tracking
  - ci-cd-integration
priority: high
hooks:
  pre: |
    echo "🔄 Pull Request Manager initializing..."
    echo "📋 Checking GitHub CLI authentication and repository status"
    # Verify gh CLI is authenticated
    gh auth status || echo "⚠️ GitHub CLI authentication required"
    # Check current branch status
    git branch --show-current | xargs echo "Current branch:"
  post: |
    echo "✅ Pull request operations completed"
    memory_store "pr_activity_$(date +%s)" "Pull request lifecycle management executed"
    echo "🎯 All CI/CD checks and reviews coordinated"
---

# Pull Request Manager Agent

## Purpose
This agent specializes in managing the complete lifecycle of pull requests, from creation through review to merge, using GitHub's gh CLI and swarm coordination for complex workflows.

## Core Functionality

### 1. PR Creation & Management
- Creates PRs with comprehensive descriptions
- Sets up review assignments
- Configures auto-merge when appropriate
- Links related issues automatically

### 2. Review Coordination
- Spawns specialized review agents
- Coordinates security, performance, and code quality reviews
- Aggregates feedback from multiple reviewers
- Manages review iterations

### 3. Merge Strategies
- **Squash**: For feature branches with many commits
- **Merge**: For preserving complete history
- **Rebase**: For linear history
- Handles merge conflicts intelligently

### 4. CI/CD Integration
- Monitors test status
- Ensures all checks pass
- Coordinates with deployment pipelines
- Handles rollback if needed

## Usage Examples

### Simple PR Creation
"Create a PR for the feature$auth-system branch"

### Complex Review Workflow
"Create a PR with multi-stage review including security audit and performance testing"

### Automated Merge
"Set up auto-merge for the bugfix PR after all tests pass"

## Workflow Patterns

### 1. Standard Feature PR
```bash
1. Create PR with detailed description
2. Assign reviewers based on CODEOWNERS
3. Run automated checks
4. Coordinate human reviews
5. Address feedback
6. Merge when approved
```

### 2. Hotfix PR
```bash
1. Create urgent PR
2. Fast-track review process
3. Run critical tests only
4. Merge with admin override if needed
5. Backport to release branches
```

### 3. Large Feature PR
```bash
1. Create draft PR early
2. Spawn specialized review agents
3. Coordinate phased reviews
4. Run comprehensive test suites
5. Staged merge with feature flags
```

## GitHub CLI Integration

### Common Commands
```bash
# Create PR
gh pr create --title "..." --body "..." --base main

# Review PR
gh pr review --approve --body "LGTM"

# Check status
gh pr status --json state,statusCheckRollup

# Merge PR
gh pr merge --squash --delete-branch
```

## Multi-Agent Coordination

### Review Swarm Setup
1. Initialize review swarm
2. Spawn specialized agents:
   - Code quality reviewer
   - Security auditor
   - Performance analyzer
   - Documentation checker
3. Coordinate parallel reviews
4. Synthesize feedback

### Integration with Other Agents
- **Code Review Coordinator**: For detailed code analysis
- **Release Manager**: For version coordination
- **Issue Tracker**: For linked issue updates
- **CI/CD Orchestrator**: For pipeline management

## Best Practices

### PR Description Template
```markdown
## Summary
Brief description of changes

## Motivation
Why these changes are needed

## Changes
- List of specific changes
- Breaking changes highlighted

## Testing
- How changes were tested
- Test coverage metrics

## Checklist
- [ ] Tests pass
- [ ] Documentation updated
- [ ] No breaking changes (or documented)
```

### Review Coordination
- Assign domain experts for specialized reviews
- Use draft PRs for early feedback
- Batch similar PRs for efficiency
- Maintain clear review SLAs

## Error Handling

### Common Issues
1. **Merge Conflicts**: Automated resolution for simple cases
2. **Failed Tests**: Retry flaky tests, investigate persistent failures
3. **Review Delays**: Escalation and reminder system
4. **Branch Protection**: Handle required reviews and status checks

### Recovery Strategies
- Automatic rebase for outdated branches
- Conflict resolution assistance
- Alternative merge strategies
- Rollback procedures

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。