author-review
Run an author self-review before creating a PR at PCI. Gathers context, assesses complexity, runs specialized agents, and produces a structured review summary for the PR description.
What this skill does
# Author Self-Review Act as the **AUTHOR** reviewing your own change at Preferred Credit Inc. (PCI). You are an assistant, not the decision-maker. Optimize for risk reduction and team flow, not perfection. ## Modes This skill runs in two modes. The output format is identical in both — only the data-gathering and delegation steps differ. - **Interactive mode** (default) — invoked from Claude Code with full tool access (Read, Grep, Glob, Bash, Task). Run all steps as written, ask the user for context, delegate to specialized agents. - **Pipeline mode** — invoked from automation (CI/CD) with no user to ask, no Bash, no Task tool. Context (the diff at minimum) is pre-supplied in the invocation. Detect by the presence of `MODE: pipeline` in the invocation message. Each step below has a **Skip-if pipeline mode** note where the behavior differs. Follow it in pipeline mode; ignore it in interactive mode. **Output discipline in pipeline mode**: produce only the final synthesized report from Step 8 onward. Do not emit step headers (`Step 1:`, `Step 4 & 5:`, etc.) or process narration (`I'll work through this systematically…`). The receiver wants the result, not the journey through the steps. ## Step 1: Gather Context > **Skip-if pipeline mode**: Use whatever context is provided in the invocation (typically the diff). For any field not provided (Jira key, AC, systems touched), proceed without it and note the absence in the final output (e.g., `Jira context: not provided`). Do not ask follow-up questions. Ask the user for the following information. Wait for answers before proceeding. 1. **PR link, branch name, or paste the diff** — How should I access the changes? 2. **Jira story key and title** — e.g., "ORIG-1234: Add credit bureau retry logic" 3. **Story description / acceptance criteria** — What does "done" look like? 4. **Systems touched** — e.g., .NET service, NServiceBus endpoint, MLPS, vendor API, database 5. **Anything you're worried about or unsure of** — Areas where you'd like extra scrutiny ## Step 2: Gather the Diff > **Skip-if pipeline mode**: The diff is already supplied in the invocation. The git sub-steps and the "Read all changed files" sub-step do not apply — analyze the diff content as-is. Once context is provided: 1. If a branch was given, run: - `git diff main...HEAD --stat` to see changed files - `git diff main...HEAD` to get the full diff - `git log main..HEAD --oneline` to understand the commits 2. If only a PR link was given, ask the user to paste the diff or check out the branch locally — `gh` is not available at PCI (Azure DevOps on-prem). See workflow doctrine "No GitHub CLI". 3. If the user pasted a diff, work from that directly Read all changed files in full to understand context around the changes. ## Step 3: Build and Test > **Skip-if pipeline mode**: Bash is unavailable. Set `Build: Not run (pipeline mode)` and `Tests: Not run (pipeline mode)` in the AI Review Summary and proceed to Step 4. Before analyzing the code, verify the solution builds and tests pass: 1. Identify the solution file (`.sln` or `.slnx`) in the repository root or nearest parent directory 2. Run `dotnet build <solution>` and report the result 3. Run `dotnet test <solution>` and report the result 4. Record both outcomes — they feed into the risk score and key findings If the build fails, report it as a **Critical** finding. If tests fail, report each distinct failure as a **Critical** finding with the test name and failure reason. If no solution file is found, ask the user how to build and test the project. ## Step 4: Walk Through Changes Provide a structured overview before diving into findings: - **Purpose**: What is this change trying to accomplish? - **Scope**: Which areas of the codebase are affected? - **Key Changes**: Summary of the main modifications (bullet points) ## Step 5: Assess Complexity Determine if this is a **Simple** or **Complex** change: **Simple** (code-reviewer only): - Bug fixes, small features, configuration changes - Follows existing patterns closely - Limited scope (few files, single project) - No architectural decisions required - No new external integrations **Complex** (code-reviewer + architect-review): - New features with design decisions - Architectural changes or new patterns introduced - Cross-project or cross-system impact - New external integrations (APIs, vendors, databases) - Database schema changes - NServiceBus message contract changes State your assessment and reasoning. ## Step 6: Code Quality Review > **Skip-if pipeline mode**: The Task tool is unavailable. Perform the equivalent code review yourself, inline. Cover: logic errors, security vulnerabilities, performance issues, maintainability, and pattern compliance. Apply the **Review Priorities** and **What NOT to Flag** sections at the bottom of this file. Reference specific file:line for every finding. Use the Task tool to delegate to the `code-reviewer` agent with the following prompt: > Review the following code changes at PCI. The changes are for: [story context]. > Focus on: logic errors, security vulnerabilities, performance issues, maintainability, and pattern compliance. > Changed files: [list files] > Read each changed file and analyze the modifications. ## Step 7: Architecture Review (Complex Changes Only) **Skip this step for simple changes.** > **Skip-if pipeline mode**: The Task tool is unavailable. For Complex changes, perform a brief inline architecture pass yourself — assess design decisions, cost of change, backward compatibility, over-engineering, and system boundaries. If anything material warrants deeper scrutiny, recommend a human architect-review pass before merge in the final output. For complex changes, use the Task tool to delegate to the `architect-review` agent with the following prompt: > Review the architecture of these changes at PCI. The changes are for: [story context]. > Assess: design decisions, cost of change, backward compatibility, over-engineering, and system boundaries. > Changed files: [list files] > Read each changed file and analyze the design decisions. ## Step 8: Synthesize and Report Combine findings from all agents into the following structured output. This output is designed to be copied into a PR description. --- ### AI Review Summary - **What changed**: [concise summary of modifications] - **Why**: [tie to Jira story / acceptance criteria] - **Complexity**: Simple / Complex - **Files changed**: [count] files across [count] projects - **Build**: Pass / Fail - **Tests**: [passed] passed, [failed] failed, [skipped] skipped ### Risk Score (1-10) - **Score**: [number] - **Rationale**: [brief explanation referencing the scale below] | Score | Level | Examples | |------:|-------|---------| | 1-3 | Simple / low risk | Bug fix, UI tweak, log message change, documentation | | 4-6 | Moderate complexity | New feature in existing pattern, internal API change, NuGet update | | 7-8 | Complex or multi-system | Cross-project changes, new integrations, saga modifications | | 9-10 | High financial / customer risk | Payment processing, credit bureau integration, data migration, schema change affecting live data | ### Cost of Change - **Assessment**: Reversible / Moderate / Irreversible - **Details**: [what would be expensive or risky to undo later, if anything] Cost of change definitions: - **Reversible** — Easy to change or roll back (UI tweaks, log messages, internal method refactors) - **Moderate** — Requires coordination to undo (internal API changes, configuration changes, new NuGet package versions) - **Irreversible** — Costly, risky, or disruptive to undo (public APIs, database schemas, message contracts, core domain rules, data migrations) ### Key Findings Group by severity. Reference specific **File:Line** for every finding. 🔴 **Critical** (must fix before merge): - 🔴 [finding with file:line reference] 🟡 **Warning** (should address): - 🟡 [finding with file:line
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.