返回顶部
s

scar-code-review

>

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
86
下载量
0
收藏
概述
安装方式
版本历史

scar-code-review

# scar-code-review ## What this does A code review system that **learns from its own misses**. Two layers work together: 1. **Checklist review** — Regex/heuristic checks across 4 dimensions: - **Security**: SQL injection, hardcoded secrets, XSS, eval/exec - **Performance**: N+1 queries, missing pagination, unbounded SELECTs - **Correctness**: Unchecked nulls, off-by-one patterns, unhandled promises - **Maintainability**: Long functions, deep nesting, magic numbers 2. **Scar reflex arc** — Pattern-matching against past review misses. When a review fails to catch a bug that later causes an incident, record a scar. Next time, the reflex fires before the LLM even looks at the diff. No external dependencies. stdlib only. Python 3.9+. ## Quick start Review a file: ``` python3 scar_code_review.py review path/to/file.py ``` Check a diff against past scars: ``` python3 scar_code_review.py check-diff path/to/changes.diff ``` Record a missed review finding: ``` python3 scar_code_review.py record-miss \ --what-missed "Missed SQL injection in user input handler" \ --pattern "execute.*format.*user" \ --severity critical ``` ## File format JSONL, compatible with tetra-scar: ```json {"id":"rscar_1234","what_missed":"...","pattern":"...","severity":"critical","created_at":"..."} ``` ## Integration ```python from scar_code_review import review, reflex_check, record_miss, load_review_scars # Review a file findings = review("app/views.py") for f in findings: print(f"{f['severity']} [{f['dimension']}] {f['message']} (line {f['line']})") # Check diff against past scars scars = load_review_scars() blocks = reflex_check(diff_text, scars) for b in blocks: print(f"BLOCKED: {b}") # Record a miss after an incident record_miss( what_missed="Missed unvalidated redirect", pattern="redirect.*request\\.GET", severity="high", ) ```

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 tetra-scar-code-review-1776115850 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 tetra-scar-code-review-1776115850 技能

通过命令行安装

skillhub install tetra-scar-code-review-1776115850

下载 Zip 包

⬇ 下载 scar-code-review v0.1.0

文件大小: 13.08 KB | 发布时间: 2026-4-14 10:38

v0.1.0 最新 2026-4-14 10:38
- Initial release of scar-code-review (version 0.1.0)
- Provides checklist code reviews across security, performance, correctness, and maintainability
- Introduces a scar reflex arc: when a bug slips through review, a "scar" is recorded to block similar mistakes in the future
- No external dependencies; Python 3.9+ only
- Includes CLI for reviewing files, checking diffs against scars, and recording missed findings
- Offers importable Python API for integration with existing workflows

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部