gitlab-code-review▌
dedalus-erp-pas/foundation-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Perform comprehensive code reviews of GitLab merge requests, providing actionable feedback on code quality, security, performance, and best practices.
GitLab Code Review
Perform comprehensive code reviews of GitLab merge requests, providing actionable feedback on code quality, security, performance, and best practices.
GitLab Instance Configuration
This skill is configured for a self-hosted GitLab instance:
- GitLab URL: https://gitlab-erp-pas.dedalus.lan
- All project identifiers, URLs, and references should use this self-hosted instance
- Ensure you have appropriate access credentials configured for this GitLab server
When to Use This Skill
Activate this skill when:
- The user types "review" or "code review" (with or without slash command)
- The user types "review MR-123" or "review !123" to review a specific merge request
- The user types "review ISSUE-ID" (e.g., "review #456") to review the MR associated with a GitLab issue
- The user asks to review a merge request
- Analyzing code changes before merging
- Performing code quality assessments
- Checking for security vulnerabilities or performance issues
- Reviewing merge request diffs
Critical Rules
IMPORTANT: Always confirm project_id before reviewing merge requests
Always provide constructive feedback framed as questions, not directives
Only review changes introduced in the merge request, not unrelated code
Workflow
1. Identify the Merge Request
Merge Request IID Provided
If a merge request IID is provided (e.g., "review !123" or "review MR 123"):
- Extract the MR IID from the user input
- Verify the project context (ask user if not clear)
- Fetch merge request details using
glab mr view <iid>
GitLab Issue ID Provided
If a GitLab issue ID is provided (e.g., "review #456"):
- Fetch issue details using
glab issue view <iid>to understand context - Find related merge requests using
glab mr list --search "<issue reference>" - If multiple MRs found, ask user to select the one to review
- Proceed with the selected MR
No Specific MR Provided
If no MR is specified (e.g., just "review"):
- List recent open merge requests using
glab mr list --state opened - Present the list to the user
- Ask user to select which MR to review
2. Gather Merge Request Context
Self-hosted GitLab Instance: https://gitlab-erp-pas.dedalus.lan
Use glab mr view <iid> to retrieve:
- Title and description
- Source and target branches
- Author information
- State (open, merged, closed)
- Labels and milestones
- Approval status
- Pipeline status
diff_refs(base_sha, head_sha, start_sha) for accurate diff comparison
Extract key information:
Project: namespace/project
MR: !123 - "Feature: Add user authentication"
Author: @username
Source: feature/auth -> Target: main
Status: Open | Pipeline: Passed | Approvals: 1/2
3. Analyze the Changes
Get File Changes
Use glab mr diff <iid> to retrieve:
- List of changed files
- Additions and deletions per file
- Diff content for each file
Pagination: If many files changed, the diff output may be large — review it in sections.
Get Detailed File Content
For complex changes, use git show <ref>:<file_path> to:
- View the complete file context
- Understand surrounding code
- Check for consistency with existing patterns
Parameters:
<ref>: Use the source branch or head_sha from diff_refs<file_path>: Path to the file
Analyze Commits
Use git log --oneline <source_branch> to list commits, then use git show <sha> to:
- Understand commit history
- Review individual commit changes
- Check commit message quality
4. Check Existing Discussions
Use glab api /projects/:id/merge_requests/:iid/discussions to:
- Review existing feedback and discussions
- Avoid duplicate comments
- Understand ongoing conversations
- Check for unresolved threads
5. Check Pipeline Status
Use glab ci list and glab ci view <pipeline_id> to:
- Verify CI/CD pipeline status
- Check for failed jobs
- Review test results
If pipeline failed, use glab ci trace <job_id> to understand failures.
6. Perform Comprehensive Code Review
Conduct a thorough review of only the changes introduced in this merge request.
Code Quality Assessment
- Code style and formatting consistency
- Variable and function naming conventions
- Code organization and structure
- Adherence to DRY (Don't Repeat Yourself) principles
- Proper abstraction levels
Technical Review
- Logic correctness and edge cases
- Error handling and validation
- Performance implications
- Security considerations (input validation, SQL injection, XSS, etc.)
- Resource management (memory leaks, connection handling)
- Concurrency issues if applicable
Best Practices Check
- Design patterns usage
- SOLID principles adherence
- Testing coverage implications
- Documentation completeness
- API consistency
- Backwards compatibility
Dependencies and Integration
- New dependencies added
- Breaking changes to existing interfaces
- Impact on other parts of the system
- Database migration requirements
7. Generate Review Report
Create a structured code review report with:
-
Executive Summary: High-level overview of changes and overall assessment
-
Statistics:
- Files changed, lines added/removed
- Commits reviewed
- Critical issues found
-
Strengths: What was done well
-
Issues by Priority:
- 🔴 Critical: Must fix before merging (bugs, security issues)
- 🟡 Important: Should address (performance, maintainability)
- 🟢 Suggestions: Nice to have improvements
-
Detailed Findings: For each issue include:
- File and line reference
- A question framing the concern
- Context explaining why you're asking
- Code example if helpful
-
Security Review: Specific security considerations
-
Performance Review: Performance implications
-
Testing Recommendations: What tests should be added
-
Documentation Needs: What documentation should be updated
8. Add Comments to Merge Request (Optional)
CRITICAL: Ask user before adding comments to the MR
If user wants to add feedback directly to the MR:
General Comment
Use glab mr note <iid> --message "<comment>" to add a general comment:
<iid>: MR internal ID<comment>: Comment content in Markdown
Line-Specific Discussion
Use glab api POST /projects/:id/merge_requests/:iid/discussions for code-specific feedback with:
body: Discussion contentposition: Object with diff position details:base_sha: From diff_refshead_sha: From diff_refsstart_sha: From diff_refsnew_path: File pathnew_line: Line number for new codeold_path: File path (for modifications)old_line: Line number for removed code
Feedback Style: Questions, Not Directives
Frame all feedback as questions, not commands. This encourages dialogue and respects the author's context.
Examples
❌ Don't write:
- "You should use early returns here"
- "This needs error handling"
- "Extract this into a separate function"
- "Add a null check"
✅ Do write:
- "Could this be simplified with an early return?"
- "What happens if this API call fails? Would error handling help here?"
- "Would it make sense to extract this into its own function for reusability?"
- "Is there a scenario where this could be null? If so, how should we handle it?"
Why Questions Work Better
- The author may have context you don't have
- Questions invite explanation rather than defensiveness
- They acknowledge uncertainty in the reviewer's understanding
- They create a conversation rather than a checklist
Review Report Template
# Code Review: !{MR_IID} - {MR_TITLE}
## Executive Summary
{Brief overview of changes and overall assessment}
## Merge Request Details
- **Project**: {project_path}
- **Author**: @{author}
- **Source Branch**: {source_branch} → **Target**: {target_branch}
- **Pipeline Status**: {status}
- **Approvals**: {current}/{required}
## Statistics
| Metric | Count |
|--------|-------|
| Files Changed | {count} |
| Lines Added | +{additions} |
| Lines Removed | -{deletions} |
| Commits | {commit_count} |
## Strengths
- {strength_1}
- {strength_2}
## Issues Found
### 🔴 Critical
{critical_issues_or_none}
### 🟡 Important
{important_issues_or_none}
### 🟢 Suggestions
{suggestions_or_none}
## Security Review
{security_findings}
## Performance Review
{performance_findings}
## Testing Recommendations
- {test_recommendation_1}
- {test_recommendation_2}
## Documentation Needs
- {doc_need_1}
## Verdict
{APPROVED | CHANGES_REQUESTED | NEEDS_DISCUSSION}
Examples
Example 1: Review a Specific Merge Request
User: Review !42 in namespace/project
Assistant actions:
1. glab mr view 42 — fetch MR details
2. glab mr diff 42 — get file changes
3. glab api /projects/:id/merge_requests/42/discussions — check existing feedback
4. glab ci list — check CI status
5. Analyze changes and generate report
6. Present review to user
7. Ask if user wants comments added to the MR
Example 2: Review MR Related to an Issue
User: Review the MR for issue #123
Assistant actions:
1. glab issue view 123 — fetch issue details
2. glab mr list --search "#123" — find related MRs
3. Present found MRs and ask user to confirm
4. Proceed with code review workflow
Example 3: List Open MRs for Review
User: Show me open merge requests to review
Assistant actions:
1. glab mr list --state opened — list open MRs
2. Present list with key details (title, author, pipeline status)
3. Ask user which MR to review
Important Notes
- Only review changes from THIS merge request - do not comment on code that wasn't changed
- Frame feedback as questions to encourage dialogue
- Be constructive and specific in feedback
- Provide code examples for suggested improvements
- Acknowledge good practices and improvements
- Prioritize issues clearly (Critical > Important > Suggestions)
- Consider the context and purpose of changes
- Check pipeline status before concluding review
- Review existing discussions to avoid duplicate feedback
- Always ask before adding comments to the MR
- Verify the review addresses acceptance criteria if linked to an issue
How to use gitlab-code-review on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add gitlab-code-review
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches gitlab-code-review from GitHub repository dedalus-erp-pas/foundation-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate gitlab-code-review. Access the skill through slash commands (e.g., /gitlab-code-review) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★26 reviews- ★★★★★Mia Harris· Dec 12, 2024
Useful defaults in gitlab-code-review — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Shikha Mishra· Dec 4, 2024
gitlab-code-review is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Yash Thakker· Nov 23, 2024
Useful defaults in gitlab-code-review — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Meera Robinson· Nov 3, 2024
gitlab-code-review is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Advait Dixit· Oct 22, 2024
gitlab-code-review reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Dhruvi Jain· Oct 14, 2024
Registry listing for gitlab-code-review matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Oshnikdeep· Sep 21, 2024
Solid pick for teams standardizing on skills: gitlab-code-review is focused, and the summary matches what you get after install.
- ★★★★★William Menon· Sep 5, 2024
gitlab-code-review has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Aanya Yang· Sep 1, 2024
Useful defaults in gitlab-code-review — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Kwame Robinson· Aug 24, 2024
gitlab-code-review fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
showing 1-10 of 26