Comprehensive developer toolkit providing reusable skills for Java/Spring Boot, TypeScript/NestJS/React/Next.js, Python, PHP, AWS CloudFormation, AI/RAG, DevOps, and more.
90
90%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Risky
Do not use without reviewing
Perform comprehensive code review of a GitHub pull request including code quality, security, architecture, performance, and best practices analysis.
/devkit.github.review-pr $ARGUMENTS| Argument | Description |
|---|---|
$ARGUMENTS | Combined arguments passed to the command |
git branch --show-currentgit config --get remote.origin.urlgit status --porcelainAgent Selection: To execute this GitHub task, use the following approach:
general-purpose agent with GitHub CLI expertise and code analysis capabilitiesArguments received: $ARGUMENTS
$1: PR number (required - e.g., 123)
$2: Review focus (optional - defaults to full)
$3: Output format (optional - defaults to summary)
Available review focuses:
full - Complete comprehensive review (default)security - Security vulnerabilities and risks onlyperformance - Performance bottlenecks and optimizationsarchitecture - Design patterns and architectural decisionstesting - Test coverage and qualitystyle - Code style and conventionsOutput formats:
summary - Concise executive summary (default)detailed - Comprehensive detailed reportchecklist - Review checklist formatissues - GitHub issues-ready format# Validate PR number
if [ -z "$1" ]; then
echo "Error: PR number is required"
echo "Usage: /developer-kit:devkit.github.review-pr <pr-number> [review-focus] [output-format]"
exit 1
fi
PR_NUMBER=$1
REVIEW_FOCUS=${2:-full}
OUTPUT_FORMAT=${3:-summary}
# Check GitHub CLI authentication
if ! gh auth status > /dev/null 2>&1; then
echo "Error: GitHub CLI not authenticated. Run: gh auth login"
exit 1
fi
# Fetch PR information
echo "Fetching PR #$PR_NUMBER details..."
PR_TITLE=$(gh pr view $PR_NUMBER --json title -q .title)
PR_AUTHOR=$(gh pr view $PR_NUMBER --json author -q .author.login)
PR_STATE=$(gh pr view $PR_NUMBER --json state -q .state)
PR_BASE=$(gh pr view $PR_NUMBER --json baseRefName -q .baseRefName)
PR_HEAD=$(gh pr view $PR_NUMBER --json headRefName -q .headRefName)
PR_URL=$(gh pr view $PR_NUMBER --json url -q .url)
PR_CREATED=$(gh pr view $PR_NUMBER --json createdAt -q .createdAt)
PR_ADDITIONS=$(gh pr view $PR_NUMBER --json additions -q .additions)
PR_DELETIONS=$(gh pr view $PR_NUMBER --json deletions -q .deletions)
PR_CHANGED_FILES=$(gh pr view $PR_NUMBER --json changedFiles -q .changedFiles)
echo "PR Title: $PR_TITLE"
echo "Author: $PR_AUTHOR"
echo "State: $PR_STATE"
echo "Branch: $PR_HEAD -> $PR_BASE"
echo "Changes: +$PR_ADDITIONS -$PR_DELETIONS across $PR_CHANGED_FILES files"# Get list of changed files with their status
gh pr diff $PR_NUMBER --name-only > changed_files.tmp
echo ""
echo "Changed files:"
cat changed_files.tmp
echo ""
# Categorize files by type
JAVA_FILES=$(grep '\.java$' changed_files.tmp | wc -l)
JS_FILES=$(grep -E '\.(js|jsx|ts|tsx)$' changed_files.tmp | wc -l)
PY_FILES=$(grep '\.py$' changed_files.tmp | wc -l)
CONFIG_FILES=$(grep -E '\.(xml|yml|yaml|json|properties)$' changed_files.tmp | wc -l)
TEST_FILES=$(grep -i 'test' changed_files.tmp | wc -l)
DOC_FILES=$(grep -E '\.(md|txt|adoc)$' changed_files.tmp | wc -l)
echo "File types:"
echo "- Java files: $JAVA_FILES"
echo "- JavaScript/TypeScript files: $JS_FILES"
echo "- Python files: $PY_FILES"
echo "- Configuration files: $CONFIG_FILES"
echo "- Test files: $TEST_FILES"
echo "- Documentation files: $DOC_FILES"# Download full diff
gh pr diff $PR_NUMBER > pr_diff.tmp
# Get diff statistics
TOTAL_LINES=$(wc -l < pr_diff.tmp)
ADDED_LINES=$(grep '^+' pr_diff.tmp | grep -v '^+++' | wc -l)
REMOVED_LINES=$(grep '^-' pr_diff.tmp | grep -v '^---' | wc -l)
echo ""
echo "Diff statistics:"
echo "- Total lines in diff: $TOTAL_LINES"
echo "- Lines added: $ADDED_LINES"
echo "- Lines removed: $REMOVED_LINES"
echo ""Analyze:
Review for:
Evaluate:
Check for:
Verify:
# Check for potential secrets in diff
echo "Scanning for potential secrets..."
# Common secret patterns
grep -iE '(password|secret|api_key|access_key|private_key|token)\s*[:=]' pr_diff.tmp > secrets.tmp || true
if [ -s secrets.tmp ]; then
echo "WARNING: Potential secrets found:"
cat secrets.tmp
else
echo "No obvious secrets detected"
fiIdentify:
Look for:
# Check for test files in PR
echo ""
echo "Test file analysis:"
TEST_FILES_IN_PR=$(grep -i 'test' changed_files.tmp | wc -l)
SRC_FILES_IN_PR=$(grep -v -i 'test' changed_files.tmp | wc -l)
TEST_RATIO=$(echo "scale=2; $TEST_FILES_IN_PR / $SRC_FILES_IN_PR" | bc 2>/dev/null || echo "N/A")
echo "- Test files: $TEST_FILES_IN_PR"
echo "- Source files: $SRC_FILES_IN_PR"
echo "- Test ratio: $TEST_RATIO"Evaluate:
Assess:
Consider:
Check:
Issues that must be fixed before merge:
Issues that should be addressed:
Issues to consider:
Nice-to-have improvements:
# Pull Request Review: #$PR_NUMBER
## Summary
[High-level assessment of the PR]
## Findings
### Critical Issues (Must Fix)
- Issue 1: Description and location
- Issue 2: Description and location
### Major Issues (Should Fix)
- Issue 1: Description and location
- Issue 2: Description and location
### Minor Issues (Consider Fixing)
- Issue 1: Description and suggestion
- Issue 2: Description and suggestion
### Suggestions
- Suggestion 1: Enhancement idea
- Suggestion 2: Alternative approach
## Code Quality Metrics
- Test Coverage: [Percentage or assessment]
- Code Complexity: [Assessment]
- Security: [Assessment]
- Performance: [Assessment]
## Recommendation
[APPROVE | REQUEST CHANGES | COMMENT]
## Next Steps
1. Address critical issues
2. Consider major issues
3. Respond to questions and suggestionsComprehensive report with:
## Code Review Checklist
### Functionality
- [ ] Changes implement the intended feature
- [ ] Edge cases are handled
- [ ] Error scenarios are covered
- [ ] Business logic is correct
### Code Quality
- [ ] Code is readable and maintainable
- [ ] Naming is clear and consistent
- [ ] No code duplication
- [ ] Proper abstraction levels
### Security
- [ ] No security vulnerabilities introduced
- [ ] Input validation is present
- [ ] Authentication/authorization is correct
- [ ] No secrets in code
### Performance
- [ ] No obvious performance issues
- [ ] Efficient algorithms used
- [ ] Resources are properly managed
- [ ] Database queries are optimized
### Testing
- [ ] Unit tests are present
- [ ] Tests cover happy path
- [ ] Tests cover edge cases
- [ ] Tests are meaningful
### Documentation
- [ ] Code is self-documenting or commented
- [ ] API documentation is updated
- [ ] README is updated if needed
- [ ] Breaking changes are documented# Generate review summary
REVIEW_SUMMARY="# PR Review Summary
**Review Focus**: $REVIEW_FOCUS
**Date**: $(date +%Y-%m-%d)
## Assessment
[Your assessment here]
## Key Findings
- Finding 1
- Finding 2
- Finding 3
## Recommendation
[Your recommendation]
"
# Post review comment
gh pr comment $PR_NUMBER --body "$REVIEW_SUMMARY"
echo ""
echo "Review comment posted to PR #$PR_NUMBER"# If critical issues found
# gh pr review $PR_NUMBER --request-changes --body "Critical issues found that must be addressed before merge"
# If approved
# gh pr review $PR_NUMBER --approve --body "LGTM! Great work on this PR."
# If just commenting
# gh pr review $PR_NUMBER --comment --body "Review completed. See comments for details."Good examples:
Bad examples:
# Remove temporary files
rm -f changed_files.tmp pr_diff.tmp secrets.tmp
echo ""
echo "Review completed for PR #$PR_NUMBER"
echo "View PR: $PR_URL"The review can be enhanced by checking:
Based on the provided PR number and review focus:
Remember: Be thorough, constructive, and professional. Focus on helping the author improve their code while maintaining high quality standards.
# Comprehensive review of PR #123
/developer-kit:devkit.github.review-pr 123# Security-only review of PR #456
/developer-kit:devkit.github.review-pr 456 security# Detailed review report for PR #789
/developer-kit:devkit.github.review-pr 789 full detailed# Performance review in checklist format
/developer-kit:devkit.github.review-pr 321 performance checklistdocs
plugins
developer-kit-ai
developer-kit-aws
agents
docs
skills
aws
aws-cli-beast
aws-cost-optimization
aws-drawio-architecture-diagrams
aws-sam-bootstrap
aws-cloudformation
aws-cloudformation-auto-scaling
aws-cloudformation-bedrock
aws-cloudformation-cloudfront
aws-cloudformation-cloudwatch
aws-cloudformation-dynamodb
aws-cloudformation-ec2
aws-cloudformation-ecs
aws-cloudformation-elasticache
references
aws-cloudformation-iam
references
aws-cloudformation-lambda
aws-cloudformation-rds
aws-cloudformation-s3
aws-cloudformation-security
aws-cloudformation-task-ecs-deploy-gh
aws-cloudformation-vpc
references
developer-kit-core
agents
commands
skills
developer-kit-devops
developer-kit-java
agents
commands
docs
skills
aws-lambda-java-integration
aws-rds-spring-boot-integration
aws-sdk-java-v2-bedrock
aws-sdk-java-v2-core
aws-sdk-java-v2-dynamodb
aws-sdk-java-v2-kms
aws-sdk-java-v2-lambda
aws-sdk-java-v2-messaging
aws-sdk-java-v2-rds
aws-sdk-java-v2-s3
aws-sdk-java-v2-secrets-manager
clean-architecture
graalvm-native-image
langchain4j-ai-services-patterns
references
langchain4j-mcp-server-patterns
references
langchain4j-rag-implementation-patterns
references
langchain4j-spring-boot-integration
langchain4j-testing-strategies
langchain4j-tool-function-calling-patterns
langchain4j-vector-stores-configuration
references
qdrant
references
spring-ai-mcp-server-patterns
spring-boot-actuator
spring-boot-cache
spring-boot-crud-patterns
spring-boot-dependency-injection
spring-boot-event-driven-patterns
spring-boot-openapi-documentation
spring-boot-project-creator
spring-boot-resilience4j
spring-boot-rest-api-standards
spring-boot-saga-pattern
spring-boot-security-jwt
assets
references
scripts
spring-boot-test-patterns
spring-data-jpa
references
spring-data-neo4j
references
unit-test-application-events
unit-test-bean-validation
unit-test-boundary-conditions
unit-test-caching
unit-test-config-properties
references
unit-test-controller-layer
unit-test-exception-handler
references
unit-test-json-serialization
unit-test-mapper-converter
references
unit-test-parameterized
unit-test-scheduled-async
references
unit-test-service-layer
references
unit-test-utility-methods
unit-test-wiremock-rest-api
references
developer-kit-php
developer-kit-project-management
developer-kit-python
developer-kit-specs
commands
docs
hooks
test-templates
tests
skills
developer-kit-tools
developer-kit-typescript
agents
docs
hooks
rules
skills
aws-cdk
aws-lambda-typescript-integration
better-auth
clean-architecture
drizzle-orm-patterns
dynamodb-toolbox-patterns
references
nestjs
nestjs-best-practices
nestjs-code-review
nestjs-drizzle-crud-generator
nextjs-app-router
nextjs-authentication
nextjs-code-review
nextjs-data-fetching
nextjs-deployment
nextjs-performance
nx-monorepo
react-code-review
react-patterns
shadcn-ui
tailwind-css-patterns
tailwind-design-system
references
turborepo-monorepo
typescript-docs
typescript-security-review
zod-validation-utilities
references
github-spec-kit