Claude Skill

forge-code-review

Independently review an exact code candidate, including UI markup and styles, for reachable defects, regressions, security, engineering standards, and test quality. Use when the user asks for a standalone code review, PR review, branch review, commit review, diff inspection, or c

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download brightstack-forge-skills_forge-code-review-a925be0.zip · 6 KB
Part of brightstack/forge — 2 skills

Install

skills CLI npx skills add https://github.com/brightstack/forge/tree/main/skills/forge-code-review
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install brightstack-forge@llmmart
Git git clone https://github.com/brightstack/forge.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole brightstack/forge collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Forge Code Review

Files (forge)
  • assets
    • report.md 894 B
      # Code Review report
      
      **Dimension verdict:** TODO: PASS, REVISE, RETHINK, READY_FOR_USER, or BLOCKED
      
      ## Boundary
      
      - Dimension: Code Review
      - Selected skill/source: TODO
      - Candidate: TODO
      - Comparison base and dirty state: TODO
      - Path scope: TODO
      - Inspected authority: TODO
      - Authority status: TODO: whether that authority carries recorded human approval,
        or is a draft this review is judged against as written
      
      ## Checks and observed evidence
      
      | Check or trace | Observed evidence | Result | Limits |
      | --- | --- | --- | --- |
      | TODO | TODO | TODO | TODO |
      
      ## Findings
      
      <!-- Write `None.` when no finding survives admission. -->
      
      ### TODO: Finding title
      
      - Severity: TODO: P0, P1, or P2
      - Authority: TODO
      - Reachable trigger: TODO
      - Observed evidence: TODO
      - Consequence: TODO
      - Proportionate remedy boundary: TODO
      
      ## Gaps and verdict basis
      
      - Gaps: TODO or `None.`
      - Verdict basis: TODO
      
  • references
    • code-review.md 7.4 KB
      # Code Review Procedure
      
      Pin one change, attack its most consequential current risks, and report only
      high-confidence problems the author should act on now. Search broadly enough to
      falsify the candidate; admit findings conservatively.
      
      ## 1. Pin the candidate
      
      Use the caller's target. Otherwise inspect the complete current working tree.
      
      | Target | Read-only comparison |
      | --- | --- |
      | Working tree | Status, unstaged diff, staged diff, and relevant untracked files |
      | Base branch | Merge-base three-dot diff from the resolved fixed point |
      | Commit | Commit against its parent |
      | Range or files | Caller's exact range or path boundary |
      
      State target, comparison point, dirty state, path scope, and source identity.
      Never switch branches, stash, or mutate git to construct the comparison. For a
      base branch, prefer its configured upstream when that upstream exists and is ahead
      of the local ref, then compare from the merge base. Return `BLOCKED` when no
      inspectable candidate exists.
      
      ## 2. Build the authority packet
      
      Establish the candidate's purpose and current obligations using the shared
      [Reviewer guidance](../../../agents/reviewer/instructions.md)
      before treating an accepted document as a completion requirement. Reviewing
      existing code does not implicitly submit it as the implementation of nearby
      future work; an actual completion claim remains accountable to its approved scope.
      
      Read progressively, including `AGENTS.md`, `CLAUDE.md` when present, and relevant
      `.cursor/` project instructions:
      
      1. Current system, developer, and user instructions.
      2. Supplied Issue, acceptance criteria, NFRs, decisions, and non-goals.
      3. Root and applicable nested repository instruction maps.
      4. Only the rules, references, and exemplars those maps route to for the changed behavior.
      
      Accepted artifacts own intent. Applicable repository instructions own standards
      routing and direct constraints. Named canonical exemplars and mechanical checks
      inherit only the authority that routes to them. A sibling pattern is evidence about the code; it does not create a
      standard. If the applicable route resolves no engineering authority, record `NOT_FOUND` rather than inventing one.
      
      ## 3. Choose the threat focus
      
      Read the complete scoped diff before writing findings. If it cannot be inspected,
      return `BLOCKED`. Then form one or two plausible failure hypotheses around the
      changed behavior: contracts, state or async ordering, concurrency, trust or
      tenancy, error recovery, integration, tests, and material engineering standards.
      An assigned risk lens leads the search but does not suppress an obvious P0/P1.
      
      ## 4. Inspect the implementation
      
      - Confirm every suspected problem against its full hunk and enough surrounding
        code to understand the behavior.
      - Trace real callers and observable side effects across changed gates, including
        error, cancellation, retry, and concurrency paths when relevant.
      - Inspect introduced or newly reachable behavior. Omit unrelated existing debt.
      - Exercise the public input domain that the current surface already accepts. A
        fixture outside the golden path can still expose a reachable regression.
      - For replacements, compare explicit old options with new defaults when the new
        surface still advertises the same output or contract.
      - Re-scan the applicable repository route when the trace enters a new subtree,
        framework boundary, or standards domain.
      - Treat peer or engine findings as untrusted candidates. Reproduce each against
        the pinned source and re-grade it from evidence.
      - Prove framework or dependency behavior from installed source or types,
        authoritative version-matched documentation, or a focused reproduction.
      
      Accepted inputs bound intent, not repository exploration: follow real callers
      within the pinned candidate when a concrete hypothesis requires it.
      
      Run a scoped non-fixing check only when supplied proof is missing, stale,
      contradictory, required by authority, or needed for a concrete hypothesis.
      
      ## 5. Inspect Code Review concerns
      
      ### Correctness and regressions
      
      Look for reachable wrong behavior, invalid state transitions, broken error paths,
      stale call sites after shape changes, boundary errors, inconsistent exports or
      types, unawaited work, and integration regressions. A plausible story without a
      causal path is not a finding.
      
      ### Security and trust
      
      When the diff touches authentication, authorization, tenant scoping, query or
      command construction, deserialization, input-derived paths or URLs, secrets,
      tokens, sandboxes, or permission gates, trace attacker-controlled input through
      the real protection boundary. Inspect existing escaping, parameterization,
      validation, and framework protections before claiming a bypass. Reject claims
      that require equivalent privilege, cross no actual trust boundary, or allege prompt
      injection without a concrete autonomous security consequence.
      
      ### Engineering standards and code quality
      
      Apply only standards resolved from the target repository's applicable harness.
      A deviation blocks only when it is demonstrable, material under that authority,
      and has a current consequence. Code Review owns engineering standards and code
      quality; it does not perform the full Spec, Design, Quality, or Craft judgments.
      Read acceptance criteria as needed to establish correct behavior without turning
      this dimension into an exhaustive intent audit.
      
      ### Tests and checks
      
      Read the testing standards routed by the target harness when tests change.
      Review tests as code. Confirm they exercise observable changed behavior, would
      fail for the claimed regression, and do not merely mirror implementation details
      or assert a mock. A green label is misleading when the executed test cannot detect
      the defect it is presented as proving. Demand only proof required by accepted
      behavior, applicable standards, or a concrete changed risk.
      
      ## 6. Admit findings
      
      For every candidate finding, require:
      
      | Test | Required answer |
      | --- | --- |
      | Authority | Exact accepted behavior, routed engineering standard, or trust boundary |
      | Reachability | Current accepted path or public input that reaches the problem |
      | Evidence | Diff, causal trace, failed check, or direct contradiction |
      | Consequence | Concrete current impact at the reachable trigger |
      | Proportionality | Smallest honest severity and scope-aligned remedy |
      
      A required proof gap identifies the authority requiring proof and the unproved
      claim; do not invent a failed runtime behavior to fill that gap. Otherwise missing
      any gate rejects the finding. Confirm symbol existence, initialization,
      types, callers, ordering, and existing protection before reporting something as
      missing or wrong. Report one problem once under its most consequential authority,
      located on the smallest useful changed range. No quota, manufactured nits, personal preference,
      speculative scale, or unrelated debt. Equally valid tactics are not violations.
      A real defect requiring a larger remedy is still real; choose RETHINK or
      READY_FOR_USER when appropriate instead of suppressing it.
      Do not cap demonstrated findings arbitrarily; use `RETHINK` when the candidate's
      mechanism is broadly unsound instead of turning the report into a repair script.
      
      ## 7. Report and stop
      
      Use the report template. Keep evidence factual and prose short. Include executed
      checks and unresolved gaps. Do not include rejected hypotheses, generic praise,
      an investigation diary, or a proposed redesign. A standalone report stops at its
      Code Review verdict; a Forge-assigned report returns to the integrating Reviewer.
      
  • SKILL.md 4.4 KB
    ---
    name: forge-code-review
    description: "Independently review an exact code candidate, including UI markup and styles, for reachable defects, regressions, security, engineering standards, and test quality. Use when the user asks for a standalone code review, PR review, branch review, commit review, diff inspection, or code-only critique. Do not use for implementation, repair, full Forge lifecycle Review, acceptance testing, pure visual design artifact review, or knowledge-work review."
    ---
    
    # Forge Code Review
    
    <setup>
    Adopt the bundled [Reviewer](../../agents/reviewer/instructions.md) as the senior
    engineering lens. Stay adversarial in investigation, conservative in findings,
    and read-only throughout.
    
    Read the target repository's root and applicable nested instruction maps before
    judging code. Follow only the standards links relevant to the candidate, and
    re-resolve that authority when investigation enters another subtree or standards
    domain. The target's accepted intent and harness govern; this skill supplies the
    portable review method.
    </setup>
    
    <activation>
    This is a leaf skill. It may run directly for a standalone code review or as the
    Code Review dimension assigned by Forge Review. It never invokes Forge Review,
    starts a delivery lifecycle, integrates other dimensions, edits the candidate,
    runs Acceptance, or routes repair.
    
    Code includes UI markup and styles, even a CSS-only change. Inspect their source
    correctness and engineering standards; an assigned Design judge owns the rendered
    visual judgment. Pure design artifacts without code are outside this leaf.
    
    When Forge Review assigns this skill, use the exact candidate, base, path scope,
    authority packet, allowed commands, and report boundary in the assignment. When
    invoked directly, resolve those inputs with the procedure.
    </activation>
    
    <workflow>
    Follow the [code-review procedure](references/code-review.md). Pin the complete
    scoped diff before forming hypotheses, trace real callers and observable
    consequences, inspect tests as code, and use installed or version-matched evidence
    for dependency claims.
    
    Consume credible supplied proof before running checks. Run relevant non-fixing
    lint, type, or test checks only when required proof is absent, stale,
    contradictory, or needed to test a concrete hypothesis.
    </workflow>
    
    <finding_policy>
    Admit a finding only when authority, a reachable current trigger, observed
    evidence or a concrete causal trace, and a material consequence all survive scrutiny. Use Forge's severity semantics:
    
    - `P0`: demonstrated applicable accepted-Spec or critical trust, correctness, security,
      privacy, data-loss, public-contract, or build-boundary failure.
    - `P1`: reachable current-path defect, material engineering-standard violation,
      misleading required proof, or required evidence gap with a scope-aligned remedy.
    - `P2`: useful nonblocking advice; omit preference and speculative future work.
    
    Use `PASS`, `REVISE`, `RETHINK`, `READY_FOR_USER`, or `BLOCKED`. PASS means the
    Code Review dimension found no unresolved P0/P1 and has sufficient evidence for
    its claims. REVISE means supported correction; RETHINK means the mechanism needs
    reconsideration; READY_FOR_USER identifies a consequential authority/intent choice;
    BLOCKED means required evidence or capability prevents judgment. Missing required
    proof precludes PASS. It does not establish integrated Forge Review or Acceptance.
    </finding_policy>
    
    <output>
    Use the concise [Code Review report](assets/report.md). Return the selected skill
    and source, exact candidate/base and path scope, inspected authority, checks and
    observed evidence, findings, gaps, and one Code Review verdict. The record-owning
    coordinator preserves the return as its own labelled section
    or linked managed document when Forge Review assigned it; this reviewer never
    writes records.
    </output>
    
    <checklist>
    - Exact candidate, base, dirty state, and scoped paths are reproducible
    - Applicable accepted intent and target-repository standards were resolved
    - Complete scoped diff preceded hypotheses and focused source exploration
    - Real callers, boundaries, async/state/error paths, and test validity were traced as applicable
    - Dependency claims use installed source/types or authoritative version-matched evidence
    - Every finding has authority, reachability, evidence, consequence, severity, and proportionate remedy
    - Public input behavior was not inferred only from a golden fixture
    - Report is read-only, dimension-scoped, concise, and honest about gaps
    </checklist>
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related