Code Review with RT Stack Conventions

VerifiedCaution

Review code changes following RT Stack conventions and best practices. Includes checklist for critical, warning, and info issues.

Sby Skills Guide Bot
DevelopmentIntermediate
7/24/2026
Claude CodeCursorCodex
#code-review#typescript#pull-request#monorepo#checklist

Recommended for

Automated summary

Reviews a code diff against RT Stack conventions using a tiered checklist (security, typing, architecture, style) plus the repo's lint, typecheck, format and doc-lint scripts.

Strengths

  • Critical / Warning / Info tiering backed by side-by-side ❌/✅ snippets that map directly onto the code under review
  • Tools deliberately restricted to Read, Grep, Glob and Bash, so the review stays read-only and cannot alter the code
  • File-location-to-checks table tuned for a pnpm monorepo (contracts, server/router, schemas, routes)
  • Standardized markdown feedback format that can be pasted straight into a pull request

Limitations

  • Tightly bound to one specific stack (Valibot, protectedProcedure, TanStack Router/Query, [IN]/[OUT]/[POS] headers, .folder.md files), so it rarely transfers as-is to another project
  • No GitHub or PR integration is described; the diff is fetched locally through git, assuming work inside the repository
  • The automated checks rely on pnpm scripts (typecheck, lint, format, doc-lint) that must already be defined
When to use it

Use it to review a diff or branch before committing or merging in a project that follows RT Stack conventions.

When not to use it

Skip it on a codebase unrelated to RT Stack (different framework or validation library), where most of the rules will not apply.

Security analysis

Caution
Quality score80/100

There is nothing destructive or exfiltrating here: no curl|sh, no rm -rf, no secret handling, no obfuscation, and the skill explicitly aims to be read-only. The only real risk surface is the Bash grant, which is used for standard git/pnpm commands against an arbitrary repository; that is a legitimate but powerful capability, so the appropriate rating is caution rather than safe.

Findings
  • •Declares Bash access, which allows arbitrary command execution (git diff, pnpm lint/typecheck/doc-lint), including `&&`-chained scripts from the reviewed repository — package.json scripts run with full user privileges even though the stated intent is read-only review.
  • •Automated check commands (pnpm lint/format/doc-lint) may execute third-party plugins or auto-fix/rewrite files, contradicting the skill's claim that the review process never modifies code.
  • •Reviews untrusted diffs (git diff output) that are fed into the agent's context — a malicious repo commit could attempt prompt injection; the skill gives no guidance to treat diff content as data rather than instructions.
How this analysis is made

Examples

Review a branch diff
Review the changes on my current branch against main — run the diff, check it against the RT Stack checklist, and give me the feedback in your standard Critical/Warning/Info format.
Pre-commit check
Before I commit, check the code I just changed: type safety, protectedProcedure usage, input validation, and whether any new file is missing its header comment.
Full automated gate
Run pnpm lint, typecheck, format and doc-lint on this repo, then review the failing or affected files and tell me what needs fixing before approval.

name: code-review description: | Review code changes following RT Stack conventions and best practices. 按照 RT Stack 规范和最佳实践审查代码变更。

Use when:

  • Reviewing pull requests
  • Checking code quality before commit
  • User mentions "review", "check code", "审查代码", "代码检查" allowed-tools: Read, Grep, Glob, Bash

Code Review Skill / 代码审查技能

设计思路 / Design Notes:

  1. allowed-tools 限制为只读工具,确保审查过程不会修改代码
  2. 提供项目特定的检查清单
  3. 按重要性分级(Critical > Warning > Info)
  4. 包含自动化检查命令

Overview / 概述

Review code changes following RT Stack patterns and conventions. 按照 RT Stack 模式和规范审查代码变更。

Review Checklist / 审查清单

🔴 Critical Issues / 严重问题

  1. Type Safety / 类型安全

    • No any types without justification / 无理由不使用 any
    • Proper Valibot schemas for API inputs/outputs / API 输入输出使用正确的 Valibot 模式
    • Database queries use proper types / 数据库查询使用正确类型
  2. Security / 安全

    • Protected routes use protectedProcedure / 受保护路由使用 protectedProcedure
    • No secrets in code / 代码中无密钥
    • Input validation on all user inputs / 所有用户输入都有验证
  3. Error Handling / 错误处理

    • API errors use defined error codes / API 错误使用定义的错误码
    • No unhandled promise rejections / 无未处理的 Promise 拒绝

🟡 Warning Issues / 警告问题

  1. Architecture / 架构

    • New code follows existing patterns / 新代码遵循现有模式
    • Packages don't import from apps / 包不从 apps 导入
    • Environment variables use correct prefix / 环境变量使用正确前缀
  2. Documentation / 文档

    • New files have [IN]/[OUT]/[POS] headers / 新文件有头注释
    • Affected .folder.md updated / 受影响的 .folder.md 已更新
    • Bilingual comments / 双语注释
  3. Performance / 性能

    • No N+1 queries / 无 N+1 查询
    • Proper use of TanStack Query caching / 正确使用 TanStack Query 缓存

🔵 Info / Style / 信息/风格

  1. Naming / 命名

    • Database columns use snake_case / 数据库列使用 snake_case
    • TypeScript uses camelCase / TypeScript 使用 camelCase
    • Components use PascalCase / 组件使用 PascalCase
  2. Imports / 导入

    • Use @/ alias for web app / Web 应用使用 @/ 别名
    • Use #/ alias for UI package / UI 包使用 #/ 别名
    • Use @repo/* for cross-package / 跨包使用 @repo/*

Automated Checks / 自动化检查

Run these commands before approving:

# Type check / 类型检查
pnpm typecheck

# Lint / 代码检查
pnpm lint

# Format check / 格式检查
pnpm format

# Documentation check / 文档检查
pnpm doc-lint

Review Process / 审查流程

Step 1: Understand Changes / 理解变更

# View changed files / 查看变更文件
git diff --name-only HEAD~1

# View full diff / 查看完整差异
git diff HEAD~1

Step 2: Check Patterns / 检查模式

For each file type, verify:

| File Location | Check | |--------------|-------| | packages/api/src/contracts/ | Valibot schemas, OpenAPI annotations | | packages/api/src/server/router/ | Uses protectedProcedure, proper error handling | | packages/db/src/schemas/ | Foreign keys, timestamps, snake_case | | apps/web/src/routes/ | TanStack Router patterns, proper loaders | | apps/web/src/routes/-components/ | Reusable, no direct API calls |

Step 3: Run Checks / 运行检查

pnpm lint && pnpm typecheck && pnpm doc-lint

Step 4: Provide Feedback / 提供反馈

Use this format / 使用此格式:

## Code Review / 代码审查

### 🔴 Critical / 严重
- [ ] Issue description / 问题描述

### 🟡 Warnings / 警告
- [ ] Issue description / 问题描述

### 🔵 Suggestions / 建议
- [ ] Suggestion / 建议

### ✅ Approved / 批准
- Code follows RT Stack conventions / 代码遵循 RT Stack 规范
- All checks pass / 所有检查通过

Common Issues / 常见问题

Missing Protected Procedure / 缺少受保护过程

// ❌ Wrong
const router = {
  create: publicProcedure.create.handler(...)
};

// ✅ Correct
const router = {
  create: protectedProcedure.create.handler(...)
};

Direct Database Import in Web / Web 中直接导入数据库

// ❌ Wrong (in apps/web)
import { db } from '@repo/db';

// ✅ Correct (use API client)
import { apiClient } from '@/clients/apiClient';

Missing Error Handling / 缺少错误处理

// ❌ Wrong
const [result] = await db.select().from(table).where(...);
return result; // Could be undefined!

// ✅ Correct
if (!result) {
  throw errors.NOT_FOUND({ message: 'Not found' });
}
return result;

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/code-review-with-rt-stack-conventions-mryiqgrg/download' --output '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md.part' && mv '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md.part' '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Grep, Glob, Bash

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md' && test -s '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/code-review' && cp -R '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg' '.claude/skills/code-review'

Cursor
test -f '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md' && test -s '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/code-review' && cp -R '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg' '.cursor/skills/code-review'

Codex
test -f '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md' && test -s '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/code-review' && cp -R '.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg' '.agents/skills/code-review'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg'

openskills read 'code-review-with-rt-stack-conventions-mryiqgrg'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/code-review-with-rt-stack-conventions-mryiqgrg/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills