xiaohongshu
xiaohongshu
goodvibes-codebase-review
Comprehensive codebase review and parallel agent-based remediation skill. Use PROACTIVELY when agent needs to perform full codebase audit, generate master findings report with quantified metrics, and execute remediation using parallel goodvibes background agents (max 6 concurrent, one task per agent with fresh context). Triggers on: codebase review, code audit, full project analysis, quality assessment, technical debt analysis, parallel remediation, bulk fixes.
Full skill instructions
Systematic codebase analysis with parallelized remediation using goodvibes agents.
CRITICAL: Be objective & completely honest. No sugar coating, EVER.
CRITICAL: Write-local, read-global.
The working directory when you were spawned IS the project root. Stay within it for all modifications.
STOP. Before doing ANYTHING, complete this checklist.
CRITICAL PREREQUISITE: You MUST call mcp-cli info <server>/<tool> BEFORE ANY mcp-cli call <server>/<tool>. This is a BLOCKING REQUIREMENT.
# ALWAYS check schema first
mcp-cli info plugin_goodvibes_analysis-engine/detect_stack
mcp-cli info plugin_goodvibes_registry-engine/recommend_skills
mcp-cli info plugin_goodvibes_project-engine/project_issues
# Then make the calls
mcp-cli call plugin_goodvibes_analysis-engine/detect_stack '{}'
mcp-cli call plugin_goodvibes_registry-engine/recommend_skills '{"task":"codebase review quality audit"}'
mcp-cli call plugin_goodvibes_project-engine/project_issues '{}'
# Check schemas first
mcp-cli info plugin_goodvibes_analysis-engine/find_circular_deps
mcp-cli info plugin_goodvibes_analysis-engine/scan_for_secrets
mcp-cli info plugin_goodvibes_project-engine/analyze_dependencies
mcp-cli info plugin_goodvibes_analysis-engine/find_dead_code
mcp-cli info plugin_goodvibes_project-engine/get_test_coverage
# Then execute
mcp-cli call plugin_goodvibes_analysis-engine/find_circular_deps '{}'
mcp-cli call plugin_goodvibes_analysis-engine/scan_for_secrets '{}'
mcp-cli call plugin_goodvibes_project-engine/analyze_dependencies '{}'
mcp-cli call plugin_goodvibes_analysis-engine/find_dead_code '{}'
mcp-cli call plugin_goodvibes_project-engine/get_test_coverage '{}'
# Check schemas
mcp-cli info plugin_goodvibes_analysis-engine/scan_patterns
mcp-cli info plugin_goodvibes_project-engine/find_tests_for_file
mcp-cli info plugin_goodvibes_analysis-engine/validate_edits_preview
# Execute
mcp-cli call plugin_goodvibes_analysis-engine/scan_patterns '{}'
mcp-cli call plugin_goodvibes_project-engine/find_tests_for_file '{"file":"path/to/file.ts"}'
mcp-cli call plugin_goodvibes_analysis-engine/validate_edits_preview '{}'
# Check schema
mcp-cli info plugin_goodvibes_project-engine/project_issues
# Execute
mcp-cli call plugin_goodvibes_project-engine/project_issues '{}'
THE LAW: If a goodvibes MCP tool can do it, USE THE TOOL. No exceptions.
CRITICAL: Use precision tools, NOT system tools.
| Instead Of | Use | Why |
|---|---|---|
Read | precision_read | Extract modes, line ranges, outline/symbols |
Grep | precision_grep | Output modes, batch queries, context control |
Glob | precision_glob | Output modes, filters, preview |
Edit | precision_edit | Atomic transactions, validation, hints |
Write | precision_write | Atomic, templates, validation |
Bash | precision_exec | Batch commands, expectations, output control |
# Find files with pattern (minimal output)
precision_grep:
queries:
- pattern: "TODO|FIXME|HACK"
glob: "src/**/*.ts"
output:
mode: files_only
# Read file structure without content
precision_read:
files: ["src/index.ts", "src/app.ts"]
extract: outline
output:
mode: minimal
# Batch edit multiple files atomically
precision_edit:
edits:
- file: "src/api.ts"
find: "const API_URL = 'http://localhost'"
replace: "const API_URL = process.env.API_URL"
- file: "src/config.ts"
find: "debug: true"
replace: "debug: process.env.NODE_ENV !== 'production'"
transaction:
mode: atomic
rollback_on_fail: true
output:
mode: minimal
# Execute commands with expectations
precision_exec:
commands:
- cmd: "npm run typecheck"
expect:
exit_code: 0
- cmd: "npm run lint"
expect:
exit_code: 0
output:
mode: minimal
CRITICAL: Always discover before batching.
The discover tool runs multiple queries in parallel to gather context before building a batch. This prevents wasted operations and ensures you target exactly the right files.
# Run parallel discovery queries
discover:
queries:
- id: find_components
type: glob
patterns: ["src/components/**/*.tsx"]
- id: find_api_routes
type: glob
patterns: ["src/api/**/*.ts", "src/app/api/**/*.ts"]
- id: find_issues
type: grep
pattern: "TODO|FIXME|HACK"
glob: "src/**/*.{ts,tsx}"
- id: find_hooks
type: symbols
query: "use"
kinds: ["function"]
output_mode: files_only # count_only | files_only | locations
Discover - Run queries to understand scope
count_only first to gauge magnitudefiles_only to get target listPlan - Build batch operations using discovery results
Execute - Run batch with full context
# Step 1: Discover current state
discover:
queries:
- id: existing_files
type: glob
patterns: ["src/features/auth/**/*.ts"]
- id: existing_patterns
type: grep
pattern: "export (function|const|class)"
glob: "src/features/**/*.ts"
output_mode: files_only
# Step 2: Use results to build targeted batch
batch:
id: implement-feature
operations:
read:
- id: analyze
type: files
targets: "{{existing_files.files}}" # From discovery
extract: outline
Benefits:
Your behavior adapts based on the current mode:
.goodvibes/logs/activity.md┌─────────────────────────────────────────────────────────────┐
│ CODEBASE REVIEW │
├─────────────────────────────────────────────────────────────┤
│ Phase 1: Review │ Run MCP tools, analyze all code │
│ Phase 2: Report │ Generate codebase-review-report.md │
│ Phase 3: Plan │ Create remediation-plan.md │
│ Phase 4: Execute │ WORK-REVIEW-FIX-CHECK (max 6) │
└─────────────────────────────────────────────────────────────┘
| Category | Primary Tools | Fallback |
|---|---|---|
| Quality | find_dead_code, scan_patterns | grep for patterns |
| Architecture | find_circular_deps, get_api_surface | manual analysis |
| Security | scan_for_secrets, check_permissions | grep for patterns |
| Performance | get_prisma_operations, analyze_bundle | none |
| Documentation | explain_codebase | file scan |
| Testing | get_test_coverage, find_tests_for_file, suggest_test_cases | jest --coverage |
| Config | read_config, env_audit | env file scan |
| Dependencies | analyze_dependencies | npm audit |
| Errors | parse_error_stack, explain_type_error | tsc output |
| Style | scan_patterns, get_conventions | eslint output |
Minimum per category:
Generate codebase-review-report.md:
# Codebase Review Report
**Project**: {name from detect_stack}
**Stack**: {technologies detected}
**Generated**: {ISO 8601 timestamp}
**Overall Score**: {X.X}/10
## Executive Summary
| Severity | Count | Description |
|----------|-------|-------------|
| 🔴 Critical | N | Issues requiring immediate attention |
| 🟠 High | N | Issues blocking production readiness |
| 🟡 Medium | N | Issues impacting maintainability |
| 🔵 Low | N | Minor improvements |
## Score Breakdown
| Category | Weight | Raw | Deductions | Score | Grade |
|----------|--------|-----|------------|-------|-------|
| Quality | 15% | 10 | -X.X | X.X | A-F |
| Architecture | 15% | 10 | -X.X | X.X | A-F |
| Security | 20% | 10 | -X.X | X.X | A-F |
| Performance | 10% | 10 | -X.X | X.X | A-F |
| Documentation | 5% | 10 | -X.X | X.X | A-F |
| Testing | 15% | 10 | -X.X | X.X | A-F |
| Config | 5% | 10 | -X.X | X.X | A-F |
| Dependencies | 5% | 10 | -X.X | X.X | A-F |
| Errors | 5% | 10 | -X.X | X.X | A-F |
| Style | 5% | 10 | -X.X | X.X | A-F |
| **TOTAL** | 100% | - | - | **X.X** | **X** |
## Score Calculation
{Show the math for each category deduction}
## Detailed Findings
### {Category Name}
#### Finding: {Title}
| Field | Value |
|-------|-------|
| **Severity** | critical\|high\|medium\|low |
| **Location** | `file:line` or `file:startLine-endLine` |
| **Measurement** | {exact number or percentage} |
| **Threshold** | {acceptable value} |
| **Impact** | {business/technical consequence} |
| **Points Deducted** | {-X.X from Category} |
**Evidence:**
{code snippet or tool output}
**Required Fix:**
{specific remediation code or steps}
---
{repeat for all findings}
## What's Working Well
{List genuinely good patterns found, with file references}
## Improvement Roadmap
| Phase | Focus | Expected Impact | New Score |
|-------|-------|-----------------|-----------|
| 1 | Critical fixes | +X.X points | X.X |
| 2 | High priority | +X.X points | X.X |
| 3 | Medium priority | +X.X points | X.X |
| 4 | Polish | +X.X points | X.X |
Generate remediation-plan.md:
# Remediation Plan
**Generated**: {timestamp}
**Total Tasks**: {N}
**Execution Strategy**: WORK-REVIEW-FIX-CHECK with parallel goodvibes agents (max 6 concurrent)
## Execution Rules
| Rule | Value |
|------|-------|
| Max concurrent agents | 6 |
| Agent type | goodvibes background |
| Context model | Fresh per task (no accumulation) |
| Tool priority | MCP tools > bash |
| Monitoring | Self-report via SubagentStop hook |
| Workflow | WORK → REVIEW → PASS/FAIL → (FIX → CHECK) |
## Task Definitions
### Wave 1: Critical [P0] - Execute Immediately
#### TASK-001: {Description}
| Field | Value |
|-------|-------|
| **Severity** | critical |
| **Target Files** | `file1.ts`, `file2.ts` |
| **Related Finding** | {reference to report finding} |
| **MCP Tools** | `tool1`, `tool2` |
| **Estimated Duration** | Xm |
**Context from Report:**
{relevant finding details}
---
{repeat for all tasks, grouped by wave}
### Wave 2: High [P1]
### Wave 3: Medium [P2]
### Wave 4: Low [P3]
## Dependency Graph
{Show task dependencies if any exist}
For each remediation task:
WORK Agent ─────────────────────> REVIEW Agent
(goodvibes:engineer) (goodvibes:reviewer)
│ │
│ ├─> PASS ─> Commit ─> Update Log ─> Next Task
│ │
│ └─> FAIL ─> FIX Agent ─> CHECK Agent
│ │
│ ├─> PASS ─> Commit
│ │
└──────────────┴─> FAIL (loop)
| Phase | Agent | Purpose |
|---|---|---|
| WORK | goodvibes:engineer | Implements remediation task |
| REVIEW | goodvibes:reviewer | Verifies work quality (100% required) |
| FIX | goodvibes:engineer | Addresses ALL review issues |
| CHECK | goodvibes:reviewer | Re-verifies fixes |
NEVER use these to check agent status:
tail command on transcript filesTaskOutput toolINSTEAD, the orchestrator:
run_in_background: true| Rule | Value |
|---|---|
| Max concurrent agents | 6 |
| Agents per task | 1 (one agent works on a task at a time) |
| Completion requirement | 100% (not 99.9%) |
# Remediation Task: {TASK_ID}
## MCP Tool Checklist (MANDATORY)
**CRITICAL PREREQUISITE:** You MUST call `mcp-cli info <server>/<tool>` BEFORE ANY `mcp-cli call <server>/<tool>`.
Before ANY edit:
```bash
# Check schemas first
mcp-cli info plugin_goodvibes_analysis-engine/scan_patterns
mcp-cli info plugin_goodvibes_project-engine/find_tests_for_file
# Then execute
mcp-cli call plugin_goodvibes_analysis-engine/scan_patterns '{}'
mcp-cli call plugin_goodvibes_project-engine/find_tests_for_file '{"file":"{TARGET_FILE}"}'
After EVERY edit:
# Check schema first
mcp-cli info plugin_goodvibes_project-engine/project_issues
# Then execute
mcp-cli call plugin_goodvibes_project-engine/project_issues '{}'
| Field | Value |
|---|---|
| Task ID | {TASK_ID} |
| Severity | {SEVERITY} |
| Description | {DESCRIPTION} |
| Files | {FILE_LIST} |
{FINDING_DETAILS}
mcp-cli info then mcp-cli call plugin_goodvibes_*When done, output:
{
"task_id": "{TASK_ID}",
"status": "success|failed",
"files_modified": ["file1.ts", "file2.ts"],
"tests_passed": true|false,
"type_check_passed": true|false,
"notes": "Any relevant context"
}
---
### REVIEW Agent Prompt Template
```markdown
# Review Task: {TASK_ID}
## MCP Tool Checklist (MANDATORY)
**CRITICAL PREREQUISITE:** You MUST call `mcp-cli info <server>/<tool>` BEFORE ANY `mcp-cli call <server>/<tool>`.
```bash
# Check schemas first
mcp-cli info plugin_goodvibes_project-engine/project_issues
mcp-cli info plugin_goodvibes_analysis-engine/scan_patterns
mcp-cli info plugin_goodvibes_project-engine/get_test_coverage
# Then execute
mcp-cli call plugin_goodvibes_project-engine/project_issues '{}'
mcp-cli call plugin_goodvibes_analysis-engine/scan_patterns '{}'
mcp-cli call plugin_goodvibes_project-engine/get_test_coverage '{}'
| Field | Value |
|---|---|
| Task ID | {TASK_ID} |
| Work Agent | {WORK_AGENT_ID} |
| Files Modified | {FILE_LIST} |
{WORK_COMPLETION_REPORT}
| Criterion | Weight | Description |
|---|---|---|
| Correctness | 30% | Does it solve the problem correctly? |
| Completeness | 25% | Are all aspects addressed? |
| Quality | 20% | Is the code clean, maintainable? |
| Safety | 15% | No new errors, security issues? |
| Tests | 10% | Tests pass, coverage maintained? |
{
"task_id": "{TASK_ID}",
"verdict": "PASS|FAIL",
"score": 8.5,
"issues": [
{
"severity": "critical|major|minor",
"file": "path/to/file.ts",
"line": 47,
"issue": "Description of the issue",
"fix_guidance": "Specific guidance on how to fix"
}
],
"recommendation": "Details for FIX agent if FAIL"
}
CRITICAL: Be honest. Better to catch issues now than in production.
---
### FIX Agent Prompt Template
```markdown
# Fix Task: {TASK_ID} (Iteration {N})
## MCP Tool Checklist (MANDATORY)
**CRITICAL PREREQUISITE:** You MUST call `mcp-cli info <server>/<tool>` BEFORE ANY `mcp-cli call <server>/<tool>`.
Before ANY edit:
```bash
# Check schemas first
mcp-cli info plugin_goodvibes_analysis-engine/scan_patterns
mcp-cli info plugin_goodvibes_project-engine/find_tests_for_file
# Then execute
mcp-cli call plugin_goodvibes_analysis-engine/scan_patterns '{}'
mcp-cli call plugin_goodvibes_project-engine/find_tests_for_file '{"file":"{TARGET_FILE}"}'
After EVERY edit:
# Check schema first
mcp-cli info plugin_goodvibes_project-engine/project_issues
# Then execute
mcp-cli call plugin_goodvibes_project-engine/project_issues '{}'
{ISSUES_FROM_REVIEW}
fix_guidance provided for each issue{
"task_id": "{TASK_ID}",
"iteration": {N},
"status": "success|blocked",
"issues_addressed": N,
"issues_remaining": N,
"blocked_issues": [
{
"issue": "Description",
"reason": "Why it cannot be fixed"
}
],
"notes": "Any relevant context"
}
---
### CHECK Agent Prompt Template
```markdown
# Check Task: {TASK_ID} (Verification Round {N})
## MCP Tool Checklist (MANDATORY)
**CRITICAL PREREQUISITE:** You MUST call `mcp-cli info <server>/<tool>` BEFORE ANY `mcp-cli call <server>/<tool>`.
```bash
# Check schemas first
mcp-cli info plugin_goodvibes_project-engine/project_issues
mcp-cli info plugin_goodvibes_analysis-engine/scan_patterns
# Then execute
mcp-cli call plugin_goodvibes_project-engine/project_issues '{}'
mcp-cli call plugin_goodvibes_analysis-engine/scan_patterns '{}'
| Field | Value |
|---|---|
| Task ID | {TASK_ID} |
| FIX Agent | {FIX_AGENT_ID} |
| Iteration | {N} |
{ISSUES_TO_VERIFY}
{FIX_COMPLETION_REPORT}
{
"task_id": "{TASK_ID}",
"iteration": {N},
"verdict": "PASS|FAIL",
"resolved_issues": N,
"unresolved_issues": [
{
"issue": "Description",
"status": "still_present|new_issue"
}
],
"recommendation": "Next action if FAIL"
}
If FAIL after 3 iterations, escalate to human review.
---
### Commit Protocol
After REVIEW or CHECK verdict is PASS, create commit:
fix({CATEGORY}): {TASK_ID} - {SHORT_DESCRIPTION}
{DETAILED_DESCRIPTION}
Task-ID: {TASK_ID} Severity: {SEVERITY} Co-Authored-By: Claude Opus 4.5 [email protected]
### Completion Cleanup
After ALL remediation tasks have passed review and been committed, archive the output files:
**Archive Location:** `.goodvibes/completed/`
**Archive Commands:**
```bash
# Run all commands together in a single shell session:
# Create archive directory if it doesn't exist
mkdir -p .goodvibes/completed
# Generate timestamp
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
# Move and rename files
mv codebase-review-report.md .goodvibes/completed/code-review-${TIMESTAMP}.md
mv remediation-plan.md .goodvibes/completed/remediation-plan-${TIMESTAMP}.md
mv remediation-log.md .goodvibes/completed/remediation-log-${TIMESTAMP}.md
Archive Checklist:
File Naming Convention:
| Original | Archived |
|---|---|
codebase-review-report.md | code-review-{YYYYMMDD-HHMMSS}.md |
remediation-plan.md | remediation-plan-{YYYYMMDD-HHMMSS}.md |
remediation-log.md | remediation-log-{YYYYMMDD-HHMMSS}.md |
Why Archive:
Maintain remediation-log.md:
# Remediation Log
## Active Agents
| Task ID | Description | Agent | Phase | Started | Elapsed |
|---------|-------------|-------|-------|---------|---------|
| TASK-002 | Remove secrets | agent-abc | WORK | 10:05:00 | 5m |
| TASK-003 | Fix auth flow | agent-def | REVIEW | 10:08:00 | 2m |
## Completed Tasks
| Task ID | Description | Status | Duration | Iterations | Changes |
|---------|-------------|--------|----------|------------|---------|
| TASK-001 | Fix SQL injection | ✅ PASS | 15m32s | 1 | `api/users.ts` |
## Failed Tasks
| Task ID | Description | Status | Iterations | Reason | Retry? |
|---------|-------------|--------|------------|--------|--------|
| TASK-005 | Fix type errors | ❌ FAIL | 3 | Blocked by external dependency | No |
## Summary
- **Total Tasks**: N
- **Completed**: N (X%)
- **In Progress**: N
- **Failed**: N
- **Remaining**: N
- **Active Agents**: N/6
| File | Purpose |
|---|---|
codebase-review-report.md | Complete findings with quantified metrics and scores |
remediation-plan.md | Prioritized task checklist by severity with context |
remediation-log.md | Real-time execution tracking with WORK-REVIEW-FIX-CHECK status |
Note: After all remediation tasks are completed, these files are archived to .goodvibes/completed/ with timestamp suffixes. See "Completion Cleanup" section for details.
After review/remediation, update .goodvibes/memory/:
| File | Update With |
|---|---|
decisions.md | Architectural decisions made during remediation |
patterns.md | Patterns discovered or enforced |
failures.md | Failed remediations with root cause analysis |
preferences.md | Tool preferences that worked well |
| Constraint | Value | Rationale |
|---|---|---|
| Max concurrent agents | 6 | Resource management |
| Agent type | goodvibes background | Telemetry via hooks |
| Tasks per agent | 1 | Fresh context per task |
| Context inheritance | None | Prevent cross-contamination |
| Monitoring method | Self-report | SubagentStop hook handles |
| Tool priority | MCP > precision > bash | Consistency and telemetry |
| Review requirement | 100% | Ensure quality before commit |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience