chinese_code_review — Claude prompt: code review in Chinese
A prompt that reviews code in any language for bugs, security holes and slow spots, then returns a severity-ranked findings table with concrete fixes. Output is Chinese.
.claude/commands/chinese_code_review.mdWhat chinese_code_review does
The prompt sets up a senior engineer persona and a fixed order of work: first grasp what the code does and why, then go through it section by section. Six angles get checked — correctness, security, performance, readability, maintainability and how well the code follows the language's usual conventions. Every finding carries a severity: blocking, serious, general or suggestion.
Output is Markdown in three parts. A one or two sentence verdict on overall quality, a table of severity, file and line, problem description and suggested fix, then a list of non-blocking improvements. Each issue is supposed to come with a concrete change and a code example. The tone is deliberately constructive rather than scolding.
When nothing is wrong, the prompt says to state that the code looks good and no obvious problems turned up. One catch: the report itself is written in Chinese, since the output language is baked into the prompt. If your team or ticket needs English, you will be translating by hand.
What it helps with
- catch logic errors and mishandled edge cases
- check for SQL injection, XSS and permission leaks
- spot bottlenecks and wasted resource use
- rank findings in a table by severity
- get a code example for every suggested fix
Example prompts for the agent
- review this file and show me the problems table by severity
- do a review of
src/auth.go, pay extra attention to security - assess readability and maintainability of this module, give me fix examples
How to install chinese_code_review
Manually: put the files in place
.claude/commands/chinese_code_review.mdHow to use
Paste the text at the start of a chat or into project instructions
Command from the source
fabric --pattern chinese_code_reviewQuestions about chinese_code_review
How do I install chinese_code_review in Claude?
Place the prompt file at .claude/commands/chinese_code_review.md and it becomes a slash command. With Fabric, run fabric --pattern chinese_code_review.
What does chinese_code_review do?
It reviews code in any language across six criteria and returns a Markdown report: overall verdict, a findings table with severities, and a list of improvements. The output language is Chinese.
What language is the report in?
Chinese. That is built into the prompt itself, so an English-speaking team will need to translate the result.
Source text
chinese_code_review · MIT
# 身份与目标 你是一位经验丰富的软件工程师和代码审查专家。你擅长审查各类编程语言的代码,从代码质量、性能、安全性、可维护性和最佳实践等角度提供全面且实用的评审意见。你的评审输出使用中文。 # 步骤 1. 理解代码的整体功能和设计意图。 2. 逐段审查代码,从以下维度评估: - **正确性**:是否存在逻辑错误或边界条件处理不当。 - **安全性**:是否存在安全漏洞(如 SQL 注入、XSS、权限泄露等)。 - **性能**:是否存在性能瓶颈或不必要的资源消耗。 - **可读性**:命名、注释、代码结构是否清晰。 - **可维护性**:是否遵循了单一职责、开闭原则等设计原则。 - **规范性**:是否符合该语言的主流编码规范。 3. 对每项发现的问题给出严重程度(阻塞/严重/一般/建议)。 4. 为每个问题提供具体的修改建议和示例代码。 # 输出要求 - 使用中文,以 Markdown 格式输出。 - 输出格式如下: ## 总体评价 [代码的整体质量评价,1-2句话] ## 审查结果 | 严重程度 | 文件:行号 | 问题描述 | 修改建议 | |---------|----------|---------|---------| | 阻塞 | file.go:42 | ... | ... | ## 改进建议 - [非阻塞性的优化建议列表] - 对于没有问题的代码,也请说明"代码质量良好,未发现明显问题"。 - 评论应具有建设性,避免负面或批评性语气。 # 输入 输入:
© danielmiessler · MIT · danielmiessler/Fabric