Guides
A Spring Boot 3 backend service demonstrating agent-assisted code quality improvement, refactoring patterns, and best practices for Java development.From the repository description
npx -y skills add barrida/agent-skills-demo --skill guidesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
13.0 KB, ~3.3k tokens by cl100k_base, as published. Nobody here has run it
π How to Use Pull Request Skill in GitHub Workflow
Overview: When & Where to Use PR Skill
You'll use the Pull Request skill in 3 key moments:
1. BEFORE pushing β Self-validate PR locally
2. AFTER pushing β Quick validation before team review starts
3. DURING review β Detailed analysis if issues found
π Scenario: Your Real GitHub Workflow
Let's walk through a real example with your OrderService refactoring.
Step 1: You've Made All Changes Locally β
Your branch: feature/refactor-orderservice
Changes made:
β
Extracted methods
β
Created enum
β
Updated tests
β
All tests passing locally
Step 2: Before Pushing to GitHub
OPTION A: Use PR Skill to Self-Validate (RECOMMENDED) π―
Open Copilot Chat in IntelliJ and ask:
#file:.github/prompts/pull-request.prompt.md
I'm about to push my branch and create a PR. Please validate:
PR Title: [REFACTOR] Extract methods from OrderService to improve testability
PR Description:
## What Changed
Split OrderService.placeOrder() from 38-line god method into 4 focused methods:
- validatePlaceOrderRequest() - validates inputs
- addItemsToOrder() - processes items
- calculateTotal() - shared calculation (eliminates duplicate)
- notifyCustomer() - sends notifications
## Why
- Reduces cyclomatic complexity from 8 to 2
- Eliminates code duplication
- Improves testability
- Follows DDD principles
## How to Test
1. Checkout branch
2. Run: ./gradlew test (all 3 tests pass)
3. Try creating order: POST /orders with valid items
4. Verify response contains calculated total
## Fixes
Fixes #42
Files Changed:
#file:src/main/java/com/demo/service/OrderService.java
#file:src/test/java/com/demo/OrderServiceTest.java
Tests: All passing (3/3)
Build: Successful
Is this PR ready to push?
Copilot Response:
## Pull Request Review: [REFACTOR] Extract methods from OrderService
### π PR Description & Motivation
β
Title format correct
β
Clear what/why/how
β
Issue linked (#42)
β
No breaking changes
### π― Scope & Single Responsibility
β
Single logical change (method extraction)
β
No scope creep
β
Reasonable size (~170 LOC)
β
Focused commits
### β
Testing Coverage
β
Tests updated
β
All passing (3/3)
β
Test names follow pattern
β
AAA pattern used
### π Documentation & Code Quality
β
Javadoc added to extracted methods
β
Follows copilot-instructions.md
β
No dead code
β
Error messages specific
### π Security & Performance
β
No secrets
β
Input validation present
β
calculateTotal() efficient (Stream API)
### ποΈ Dependencies & Build
β
No new dependencies
β
./gradlew clean build passes
β
Java 17 / Spring Boot 3.2 compatible
### π Follow-Up Items
β
Tech debt acknowledged (future: event system)
β
Next steps outlined
---
## β
Summary
**Ready to Merge:** YES
**Blockers:** 0
**Warnings:** 0
You're good to push! This PR will review quickly because:
- Clear, focused changes
- Comprehensive tests
- Follows team standards
- Small enough to review in <15 min
Then you know: β Safe to push!
Step 3: Push to GitHub & Create PR
git push origin feature/refactor-orderservice
Go to GitHub β Click "Create Pull Request" button
Fill in the PR form:
Title: [REFACTOR] Extract methods from OrderService to improve testability
Description:
## What Changed
Split OrderService.placeOrder() from 38-line god method into 4 focused methods:
- validatePlaceOrderRequest() - validates inputs
- addItemsToOrder() - processes items
- calculateTotal() - shared calculation (eliminates duplicate)
- notifyCustomer() - sends notifications
## Why
- Reduces cyclomatic complexity from 8 to 2
- Eliminates code duplication
- Improves testability
- Follows DDD principles
## How to Test
1. Pull latest code
2. Run: ./gradlew test
3. Try creating order: POST /orders
Fixes #42
Click "Create Pull Request"
Step 4: PR Created on GitHub π
Now your PR is live at:
https://github.com/yourorg/agent-skills-demo/pull/123
What Happens Automatically:
- GitHub Actions run (if configured): tests, build, checkstyle β
- PR appears in team's review queue
- Team members get notified
Step 5: During Team Review (Optional Use)
If a reviewer (or you doing self-review) wants detailed analysis, they can use the PR skill:
Reviewer asks Copilot:
#file:.github/prompts/pull-request.prompt.md
GitHub PR #123: [REFACTOR] Extract methods from OrderService
Review the PR changes:
#file:src/main/java/com/demo/service/OrderService.java
#file:src/test/java/com/demo/OrderServiceTest.java
CI/CD Status: β
All checks passed
Build: β
Success
Tests: β
3/3 passing
Are there any concerns I should flag in code review?
π Real-World Timeline
12:00 PM - You finish refactoring locally
All tests passing β
12:15 PM - Use PR skill to validate before pushing
Copilot says: Ready to merge β
12:20 PM - Push to GitHub & create PR
PR #123 created β
12:25 PM - GitHub Actions run automatically
All checks pass β
12:30 PM - Team notified of PR
Reviewers start reviewing
1:00 PM - Reviewer uses PR skill for detailed check
Looks good, approves β
1:05 PM - You merge PR to master
Changes deployed β
π You Have 3 Usage Patterns
Pattern 1: Pre-Submission Self-Review (Before pushing)
When: Right before git push
Who: You (author)
What: Validate PR is ready
Command:
#file:.github/prompts/pull-request.prompt.md
I'm about to create a PR. Is it ready?
PR Title: ...
PR Description: ...
Files: #file:...
Tests: All passing
Ready to push?
Benefit: Catch issues BEFORE your PR is public; faster review time
Pattern 2: Quick GitHub Check (After PR created)
When: Right after PR created on GitHub
Who: You or reviewer
What: Quick validation of PR completeness
Command:
#file:.github/prompts/pull-request.prompt.md
GitHub PR #123: [REFACTOR] Extract methods from OrderService
CI Status: β
All checks passed
Tests: β
3/3 passing
Any blockers or warnings?
Benefit: Quick sanity check; makes sure nothing was missed
Pattern 3: Detailed Review (During code review)
When: Reviewer wants systematic analysis
Who: Code reviewer
What: Comprehensive PR validation
Command:
#file:.github/prompts/pull-request.prompt.md
Code review for GitHub PR #123
Changes:
#file:src/main/java/com/demo/service/OrderService.java
#file:src/test/java/com/demo/OrderServiceTest.java
Review against all checklist items.
Any concerns for approval?
Benefit: Thorough, systematic check; consistent standards
π― Recommended Workflow for Your Team
Step 1: Developer (Before Pushing)
Write code β
Run local tests β
USE PR SKILL β Validate readiness
Push to GitHub β
Step 2: GitHub (Automatic)
GitHub Actions run β
Code coverage check β
Build passes β
All checks green β
Step 3: Reviewer (Optional)
Pull PR changes locally (optional)
USE PR SKILL β Detailed validation
Review code manually
Approve or request changes
Step 4: Merge
Squash commits (if needed)
Merge to master
Delete branch
π‘ Pro Tips
Tip 1: Use Draft PR First
If unsure, create PR as Draft:
Instead of: "Create Pull Request"
Click: "Create draft pull request"
GitHub Status: DRAFT β οΈ
Then:
1. Use PR skill to validate
2. Fix any issues
3. Mark as "Ready for Review"
Tip 2: Request Specific Reviewers
After creating PR on GitHub:
Click "Reviewers" β Add team members who know this code
For OrderService: Add backend team lead
For OrderController: Add API team
Tip 3: Link to Issue
In PR description, link to issue:
Fixes #42 β Auto-closes issue when merged
Relates to #45 β Links without closing
Closes #42, #43 β Close multiple issues
Tip 4: Use PR Template
Create .github/pull_request_template.md:
## What Changed
<!-- Describe your changes -->
## Why
<!-- Why is this change needed? -->
## How to Test
<!-- Steps to verify the change -->
## Checklist
- [ ] Tests added/updated
- [ ] Javadoc added
- [ ] No breaking changes
- [ ] Follows code standards
Fixes #[issue number]
GitHub auto-fills this for every PR!
π¨ When to Use PR Skill Most
High Priority π΄
- Before pushing if PR is large (>300 LOC)
- Before pushing if it's a refactoring that could break things
- If tests fail on GitHub β use skill to find what's missing
- If reviewer asks for changes β validate fix before re-pushing
Good to Use π‘
- After pushing as double-check
- Before merging to master
- Reviewer checking PR before approving
Optional π’
- Small fixes or docs changes
- When all GitHub checks already pass
π The Full Picture
LOCAL DEVELOPMENT GITHUB REVIEW
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Write code
β
Run tests locally β
β
USE PR SKILL β β β β β Validate readiness
(Pre-flight check)
β
git push ββββββββββββ Branch pushed
β
Create PR ββββ PR #123 created
β
GitHub Actions run β
β
All checks pass β
β
Reviewer pulls code
β
USE PR SKILL β Detailed validation
(Optional review)
β
Review code manually
β
Approve or request changes
β
Merge to master β
π Quick Comparison: With vs Without PR Skill
WITHOUT PR Skill
β Push code to GitHub
β Wait for GitHub Actions to run (5-10 min)
β Hope all checks pass
β Reviewer finds issues during manual review
β Back-and-forth feedback
β Takes 2-3 hours to merge
WITH PR Skill β
β
Validate with PR skill (2 min) BEFORE pushing
β
Push only if skill says "ready"
β
GitHub Actions run (5-10 min) - already confident
β
All checks pass
β
Reviewer has fewer issues to comment on
β
Quick approval & merge (30 min total)
Time Saved: ~1.5 hours per PR!
π Your Next Steps
-
Finish your current refactoring β (Already done!)
-
Prepare your PR locally:
git checkout -b feature/refactor-orderservice # (already have your changes) -
Before pushing, use PR skill:
#file:.github/prompts/pull-request.prompt.md Validate my PR... -
Get feedback from Copilot
-
Push to GitHub:
git push origin feature/refactor-orderservice -
Create PR on GitHub website
-
Watch GitHub Actions run β
-
Team reviews PR
-
Merge to master π
π PR Description Template (Ready to Use)
Copy this template for your PR:
## Description
Brief summary of changes (1-2 sentences)
## Why
Why is this change needed? (business reason, technical debt, bug fix, etc.)
## How to Test
Steps for reviewers to verify:
1. Checkout this branch: git checkout feature/...
2. Run tests: ./gradlew test
3. Test endpoint: POST /orders with { customerId: "123", items: [...] }
4. Verify response contains calculated total
## Type of Change
- [ ] Bug fix (non-breaking change fixing issue)
- [x] Refactoring (restructuring without behavior change)
- [ ] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature causing existing functionality change)
- [ ] Documentation update
## Checklist
- [x] My code follows the team's style guidelines
- [x] I have added tests for my changes
- [x] All new/changed tests pass
- [x] I have added Javadoc for public methods
- [x] My changes generate no new warnings
- [x] No new dependencies added
- [x] Changes are backward compatible
## Fixes
Fixes #[issue number]
β Summary
You'll use PR Skill in 3 ways:
- Before Pushing (Most Important) β Validate readiness locally
- After PR Created β Quick GitHub check
- During Review β Detailed analysis if needed
Benefits:
- β Catch issues early (before team sees them)
- β Faster reviews (clear, well-tested PRs)
- β Consistent standards (same checklist every time)
- β Confident merges (nothing missed)
Next Time You Have Code Ready:
- Use PR skill β "Is this ready?"
- Get feedback β Fix any issues
- Push to GitHub β PR created
- Watch team review β Quick approval
- Merge β Done! π