Token导航 LogoToken导航TokenDH.com
研究检索权限需确认unknown未标认证来源可访问许可证需确认审计通过

code-reviewer代码审查员

Agent Skill

code-reviewer 用于查找、检索和筛选相关信息,适合在 Local Agent 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,352

周安装

99

下载量

824
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:code-reviewer(代码审查员)
来源仓库:https://smithery.ai
仓库路径:code-reviewer
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

code-reviewer 用于查找、检索和筛选相关信息,适合在 Local Agent 中需要根据关键词快速定位候选结果时使用。

  • 它适用于代码审查知识库查询、常见问题匹配和审查建议生成等场景。
  • 可结合来源仓库和原始 README 继续核验具体用法,确认检索范围和输出格式。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网访问外部资源。
  • 注意该技能的安装方式尚不明确,需进一步核实兼容性。

SKILL.md

Senior Code Reviewer — Craftive

Expertise: Java 21/Spring Boot 3.3.5, Angular 19/TypeScript 5.6.3, Clean Architecture, Multi-Tenancy, Security (OWASP)

Review Process

  1. Run git diff to identify changes
  2. Examine against all checklist categories below
  3. Structure: 🚨 Critical → ⚠️ Warnings → 💡 Suggestions
  4. Provide: Clear explanation + code fix + reasoning

Codebase documentation (references)

For detailed rules and module information: docs/README.md.

Documents to consult during review by topic:


Version Compatibility

Backend: Spring Boot 3.3.5 / Java 21

  • ✅ Use jakarta.* packages (not javax.*)
  • ✅ Pattern matching for instanceof: if (obj instanceof String s)
  • ✅ Record patterns for DTOs
  • ✅ Virtual threads where appropriate
  • ✅ Sealed classes for type hierarchies
  • ❌ No deprecated APIs (check for deprecation warnings)

Frontend: Angular 19 / TypeScript 5.6.3

  • ✅ Use new control flow: @if, @for, @switch, @defer
  • ✅ Use Signals for state management
  • ✅ Standalone components (no NgModules)
  • ✅ Input signals: input(), input.required()
  • ✅ Modern inject: inject() function
  • ❌ No ngIf, ngFor, ngSwitch directives
  • ❌ No CommonModule imports in standalone

Multi-Tenancy

  • ❌ NO tenant_id columns (physical DB isolation)
  • ✅ TenantContext set/cleared in try-finally
  • ✅ TenantFilter validates active tenant first
  • ✅ Platform entities: @Qualifier("platformDataSource")
  • ✅ MDC: tenantId, tenantDb, correlationId
  • ✅ No mixed platform/tenant transactions

Clean Architecture

Layer Boundaries

Presentation → Application → Domain ← Infrastructure

Layer Violation Rules (CRITICAL)

From LayerCan ImportCANNOT Import
PresentationApplication, DomainInfrastructure
ApplicationDomainPresentation, Infrastructure
DomainNothingALL other layers
InfrastructureDomain, ApplicationPresentation

Import Patterns to Flag

// ❌ VIOLATION: Application importing Presentation
import com.backend.presentation.dto.*; // in Application layer

// ❌ VIOLATION: Domain importing Infrastructure
import com.backend.infrastructure.*; // in Domain layer

// ❌ VIOLATION: Application importing Infrastructure
import com.backend.infrastructure.persistence.*; // in Application layer

Package Structure

com.backend.presentation     → Controllers, presentation Request/Response DTOs
com.backend.application      → Services, Use Cases, application.dto (request/response/delivery)
com.backend.domain           → Entities, Repository Interfaces, Enums
com.backend.infrastructure   → Repository Implementations, Config

Application layer must not import com.backend.presentation; it may use its own application.dto.* for service contracts.

Layer Responsibilities

LayerContainsExample
PresentationControllers, Request/Response DTOsPageController, PageRequest
ApplicationServices, Business LogicPageServiceImpl
DomainEntities, Repository Interfaces, EnumsPage, PageRepository
InfrastructureJPA Repos, Config, AdaptersPageJpaRepository

Entity Patterns

  • ✅ Extend BaseEntity (auto UUID/UID generation)
  • ✅ i18n: BaseI18nEntity + @ManyToOne to base
  • ✅ Use @EntityGraph to avoid N+1
  • ✅ JPQL parameterized queries only

Database Migrations (Flyway)

  • ✅ Platform: V1__baseline.sql, R__seed.sql
  • ✅ Tenant: db/tenant/{module}/V*__*.sql
  • ✅ Global sequential versioning across modules
  • hibernate.ddl-auto=none
  • utf8mb4 / utf8mb4_unicode_ci
  • ❌ NO idempotent DDL logic in migrations
  • ❌ Only CREATE DATABASE can use string concatenation
  • 🚨 Module execution order (CRITICAL): Tenant migration order is core → media → component_library → pagebuilder → product. When adding a new module, update MODULE_ORDER in TenantMigrationService and docs/global/migrations.md. Full checklist: docs/modules/platform-provisioning.md (Add a new tenant module).

Security (OWASP)

Input Validation

  • ✅ Bean Validation on all request DTOs: @NotNull, @Size, @Pattern
  • ✅ Sanitize HTML content with Jsoup
  • ✅ Use @Valid on controller method params
  • Validation consistency: Backend ValidationConstants.java and frontend storefront/src/app/shared/constants/validation.constants.ts must stay in sync; custom annotations (@Code, @Slug, @Uid, etc.) and limits should be single-source. Details: docs/global/validation.md.

SQL Injection Prevention

  • ✅ JPQL with named parameters only
  • ❌ NO string concatenation in queries (except CREATE DATABASE)

Sensitive Data Protection

  • ❌ Never log passwords, tokens, PII
  • ✅ Truncate API errors (500 chars)
  • ✅ Log full stacktrace with correlationId

Rate Limiting

  • ✅ Provisioning: 5 req/min per tenant
  • ✅ CMS Delivery: 100 req/min per tenant

Authorization

  • @PreAuthorize on sensitive endpoints
  • ✅ Validate tenant active before ANY operation

Code Quality

Principles: SOLID, DRY, KISS, YAGNI

Backend Standards

  • ✅ Constructor injection (no @Autowired)
  • @Transactional for multi-step operations
  • ❌ No System.out.println, e.printStackTrace()
  • ❌ No code comments except essential single-line
  • ❌ No defensive programming (let exceptions propagate)

API & Response

  • API response filtering: Use ResponseValueFilter in DTO factory methods to exclude empty strings/collections/maps from responses; see docs/global/backend-patterns.md. Jackson NON_NULL is global.

Frontend Standards

  • protected or #private access modifiers
  • ✅ Explicit type declarations everywhere
  • spa- component prefix
  • ❌ No public unless required for template
  • ❌ No console.log statements
  • ❌ No code comments
  • ❌ No getter/setter methods (use properties)

Naming Conventions

Backend (Java)

ElementConventionExample
ClassPascalCasePageService, MediaController
InterfacePascalCasePageRepository, TenantContextPort
MethodcamelCasefindByUid(), createPage()
VariablecamelCasepageStatus, tenantId
ConstantSCREAMING_SNAKEMAX_FILE_SIZE, DEFAULT_LANGUAGE
Packagelowercasecom.backend.application.service
EntitySingular nounPage, User, Media
DTO RequestPascalCase + RequestPageCreateRequest, MediaUpdateRequest
DTO ResponsePascalCase + ResponsePageResponse, MediaDetailResponse
EnumPascalCasePageStatus, Language
Enum ValueSCREAMING_SNAKEPUBLISHED, IN_PROGRESS

Frontend (TypeScript/Angular)

ElementConventionExample
ComponentPascalCase + ComponentSpaPageListComponent
ServicePascalCase + ServicePageService, MediaService
Interface/TypePascalCasePage, MediaFormat
Signal variablecamelCase + Sig suffixitemsSig, isLoadingSig
Observable variablecamelCase + $ suffixitems$, user$
Private field#camelCase#mediaService, #destroy$
Protected fieldcamelCasestore, dialogRef
ConstantSCREAMING_SNAKEAPI_ENDPOINTS, MAX_UPLOAD_SIZE
Selectorspa-kebab-casespa-page-list, spa-media-upload
File namekebab-casepage-list.component.ts

Database (SQL/Flyway)

ElementConventionExample
Tablesnake_case, pluralpages, media_formats
Columnsnake_casecreated_at, file_name
Indexidx_table_columnidx_page_status
Foreign Keyfk_table_reffk_page_i18n_page
MigrationV{n}__description.sqlV1__baseline.sql

Performance

Backend (performance)

  • @EntityGraph for eager loading relationships
  • ✅ Batch loading: findByIdIn()
  • ✅ Pagination for list endpoints
  • ✅ HikariCP: max 5 connections per tenant
  • ✅ LRU eviction: max 10 pools, 30m idle
  • ❌ No N+1 query patterns

Frontend (performance)

  • trackBy function for @for loops (or track item.id)
  • ✅ OnPush change detection
  • ✅ Lazy load feature modules
  • ✅ Use async pipe or signals
  • ❌ No heavy computation in templates

Async & Subscriptions

Backend (async)

  • @Async on provisioning methods
  • ✅ Job lifecycle: pending → running → succeeded/failed
  • ✅ Progress tracking (10% → 100%)
  • ✅ Error messages truncated (500 chars)

Frontend (subscriptions)

  • ✅ One-time ops: .pipe(take(1))
  • ✅ Long-lived: .pipe(takeUntil(this.#destroy$))
  • ✅ Cleanup in ngOnDestroy(): #destroy$.next(); #destroy$.complete()
  • ✅ Polling: interval with switchMap + takeWhile
  • ✅ Prefer async pipe over manual subscribe
  • ❌ No orphan subscriptions

Component Patterns

Frontend Structure

@Component({
  selector: "spa-feature-name",
  standalone: true,
  changeDetection: ChangeDetectionStrategy.OnPush,
  imports: [
    /* ... */
  ],
})
export class SpaFeatureNameComponent extends BaseCrudListComponent<Feature> implements OnDestroy {
  protected featureStore = inject(FeatureStore);
  #featureService = inject(FeatureService);
  #destroy$ = new Subject<void>();

  protected itemsSig = signal<Feature[]>([]);
  protected isLoadingSig = signal(false);

  protected override fetchItems() {
    return this.#featureService.list();
  }

  ngOnDestroy() {
    this.#destroy$.next();
    this.#destroy$.complete();
  }
}

Service Pattern

@Injectable({ providedIn: "root" })
export class FeatureService extends CrudHttpService<Feature, CreateDto, UpdateDto> {
  protected endpoints: CrudEndpoints = {
    list: "features",
    getById: "featureById",
    create: "features",
    update: "featureById",
    delete: "featureById",
  };
}

List views

  • ✅ Use BasePaginatedListComponent (not BaseCrudListComponent) for server-side pagination/sort/search, with CrudStore, CrudHttpService, and shared UI (SpaAdminGrid, SpaAdminPaginator, SpaAdminSortDropdown). Avoid heavy client-side filtering. Use BaseCrudListComponent for simple non-paginated lists. Examples: docs/global/list-pagination-search.md.

Dialogs

  • ✅ Prefer SpaDialogBase / SpaFormDialog / SpaLocalizedFormDialog and the spa-dialog wrapper for new dialogs; use ItemDialog for schema-driven CRUD. Source: docs/global/dialogs-and-ui.md.

Testing

Backend (testing)

  • ✅ Testcontainers for integration tests
  • ✅ Test tenant isolation
  • ✅ Test migration idempotency
  • ✅ Awaitility for async assertions

Duplicate Code Detection

Check for:

  • Repeated utility methods across services
  • Similar DTOs that could be consolidated
  • Copy-pasted validation logic
  • Redundant error handling patterns
  • Similar API endpoint patterns

Quick Summary

CategoryKey Rule
InjectionConstructor only, no @Autowired
LoggingNo console.log/println
AccessProtected/#private by default
Subscriptionstake(1) or takeUntil
Change DetectionAlways OnPush
Control Flow@if/@for (Angular 19)
StateSignals preferred
TypesExplicit everywhere
DTOsRequest/Response suffixes
Multi-tenancyNo tenant_id columns

Output Format

Begin review immediately. Be concise. Focus on high-impact improvements. Educate on best practices.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

91.19%
按下载量换算751

安全审计

Socket

通过

权限和风险

权限需确认

当前来源未能明确判断权限范围,默认进入异常复核队列。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills