workflows-review
Perform exhaustive code reviews using multi-agent analysis, ultra-thinking, and worktrees
What this skill does
## Arguments [PR number, GitHub URL, branch name, or latest] # Review Command <command_purpose> Perform exhaustive code reviews using multi-agent analysis, ultra-thinking, and Git worktrees for deep local inspection. </command_purpose> ## Introduction <role>Senior Code Review Architect with expertise in security, performance, architecture, and quality assurance</role> ## Prerequisites <requirements> - Git repository with GitHub CLI (`gh`) installed and authenticated - Clean main/master branch - Proper permissions to create worktrees and access the repository - For document reviews: Path to a markdown file or document </requirements> ## Main Tasks ### 1. Determine Review Target & Setup (ALWAYS FIRST) <review_target> #$ARGUMENTS </review_target> <thinking> First, I need to determine the review target type and set up the code for analysis. </thinking> #### Immediate Actions: <task_list> - [ ] Determine review type: PR number (numeric), GitHub URL, file path (.md), or empty (current branch) - [ ] Check current git branch - [ ] If ALREADY on the target branch (PR branch, requested branch name, or the branch already checked out for review) → proceed with analysis on current branch - [ ] If DIFFERENT branch than the review target → offer to use worktree: "Use git-worktree skill for isolated Call `skill: git-worktree` with branch name - [ ] Fetch PR metadata using `gh pr view --json` for title, body, files, linked issues - [ ] Set up language-specific analysis tools - [ ] Prepare security scanning environment - [ ] Make sure we are on the branch we are reviewing. Use gh pr checkout to switch to the branch or manually checkout the branch. Ensure that the code is ready for analysis (either in worktree or on current branch). ONLY then proceed to the next step. </task_list> #### Protected Artifacts <protected_artifacts> The following paths are compound-engineering pipeline artifacts and must never be flagged for deletion, removal, or gitignore by any review agent: - `docs/plans/*.md` — Plan files created by `/workflows:plan`. These are living documents that track implementation progress (checkboxes are checked off by `/workflows:work`). - `docs/solutions/*.md` — Solution documents created during the pipeline. If a review agent flags any file in these directories for cleanup or removal, discard that finding during synthesis. Do not create a todo for it. </protected_artifacts> #### Parallel Agents to review the PR: <parallel_tasks> Run ALL or most of these agents at the same time: 1. Task kieran-rails-reviewer(PR content) 2. Task dhh-rails-reviewer(PR title) 3. If turbo is used: Task rails-turbo-expert(PR content) 4. Task git-history-analyzer(PR content) 5. Task dependency-detective(PR content) 6. Task pattern-recognition-specialist(PR content) 7. Task architecture-strategist(PR content) 8. Task code-philosopher(PR content) 9. Task security-sentinel(PR content) 10. Task performance-oracle(PR content) 11. Task devops-harmony-analyst(PR content) 12. Task data-integrity-guardian(PR content) 13. Task agent-native-reviewer(PR content) - Verify new features are agent-accessible </parallel_tasks> #### Conditional Agents (Run if applicable): <conditional_agents> These agents are run ONLY when the PR matches specific criteria. Check the PR files list to determine if they apply: **If PR contains database migrations (db/migrate/*.rb files) or data backfills:** 14. Task data-migration-expert(PR content) - Validates ID mappings match production, checks for swapped values, verifies rollback safety 15. Task deployment-verification-agent(PR content) - Creates Go/No-Go deployment checklist with SQL verification queries **When to run migration agents:** - PR includes files matching `db/migrate/*.rb` - PR modifies columns that store IDs, enums, or mappings - PR includes data backfill scripts or rake tasks - PR changes how data is read/written (e.g., changing from FK to string column) - PR title/body mentions: migration, backfill, data transformation, ID mapping **What these agents check:** - `data-migration-expert`: Verifies hard-coded mappings match production reality (prevents swapped IDs), checks for orphaned associations, validates dual-write patterns - `deployment-verification-agent`: Produces executable pre/post-deploy checklists with SQL queries, rollback procedures, and monitoring plans </conditional_agents> ### 4. Ultra-Thinking Deep Dive Phases <ultrathink_instruction> For each phase below, spend maximum cognitive effort. Think step by step. Consider all angles. Question assumptions. And bring all reviews in a synthesis to the user.</ultrathink_instruction> <deliverable> Complete system context map with component interactions </deliverable> #### Phase 3: Stakeholder Perspective Analysis <thinking_prompt> ULTRA-THINK: Put yourself in each stakeholder's shoes. What matters to them? What are their pain points? </thinking_prompt> <stakeholder_perspectives> 1. **Developer Perspective** <questions> - How easy is this to understand and modify? - Are the APIs intuitive? - Is debugging straightforward? - Can I test this easily? </questions> 2. **Operations Perspective** <questions> - How do I deploy this safely? - What metrics and logs are available? - How do I troubleshoot issues? - What are the resource requirements? </questions> 3. **End User Perspective** <questions> - Is the feature intuitive? - Are error messages helpful? - Is performance acceptable? - Does it solve my problem? </questions> 4. **Security Team Perspective** <questions> - What's the attack surface? - Are there compliance requirements? - How is data protected? - What are the audit capabilities? </questions> 5. **Business Perspective** <questions> - What's the ROI? - Are there legal/compliance risks? - How does this affect time-to-market? - What's the total cost of ownership? </questions> </stakeholder_perspectives> #### Phase 4: Scenario Exploration <thinking_prompt> ULTRA-THINK: Explore edge cases and failure scenarios. What could go wrong? How does the system behave under stress? </thinking_prompt> <scenario_checklist> - [ ] **Happy Path**: Normal operation with valid inputs - [ ] **Invalid Inputs**: Null, empty, malformed data - [ ] **Boundary Conditions**: Min/max values, empty collections - [ ] **Concurrent Access**: Race conditions, deadlocks - [ ] **Scale Testing**: 10x, 100x, 1000x normal load - [ ] **Network Issues**: Timeouts, partial failures - [ ] **Resource Exhaustion**: Memory, disk, connections - [ ] **Security Attacks**: Injection, overflow, DoS - [ ] **Data Corruption**: Partial writes, inconsistency - [ ] **Cascading Failures**: Downstream service issues </scenario_checklist> ### 6. Multi-Angle Review Perspectives #### Technical Excellence Angle - Code craftsmanship evaluation - Engineering best practices - Technical documentation quality - Tooling and automation assessment #### Business Value Angle - Feature completeness validation - Performance impact on users - Cost-benefit analysis - Time-to-market considerations #### Risk Management Angle - Security risk assessment - Operational risk evaluation - Compliance risk verification - Technical debt accumulation #### Team Dynamics Angle - Code review etiquette - Knowledge sharing effectiveness - Collaboration patterns - Mentoring opportunities ### 4. Simplification and Minimalism Review Run the Task code-simplicity-reviewer() to see if we can simplify the code. ### 5. Findings Synthesis and Todo Creation Using file-todos Skill <critical_requirement> ALL findings MUST be stored in the todos/ directory using the file-todos skill. Create todo files immediately after synthesis - do NOT present findings for user approval first. Use the skill for structured todo management. </critical_requirement> #### Step 1: Synthesize All Findings <thinking> Consolidate all agent reports into a categorized list of findings. Remove duplicate
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.