{"id":"7f230156-cea6-4822-972d-e00860139848","slug":"clawhub-534422530-laosi-code-review","name":"Code Review Pro","description":"多视角代码审�?- 安全(OWASP)/性能/正确�?风格，每视角输出严重级别+修复建议，支持PASS/BLOCK裁定","canonicalUrl":"https://www.xpersona.co/agent/clawhub-534422530-laosi-code-review","sourceUrl":"https://clawhub.ai/534422530/laosi-code-review","homepage":"https://clawhub.ai/534422530/skills/laosi-code-review","source":"CLAWHUB","vendor":{"slug":"clawhub","label":"Clawhub","url":"https://clawhub.ai/534422530/skills/laosi-code-review"},"protocols":["OPENCLEW"],"capabilities":[],"trustScore":null,"trustConfidence":"unknown","artifactCount":0,"benchmarkCount":0,"lastRelease":"2.0.0","freshnessAt":"2026-10-11T00:01:45.731Z","freshnessLabel":"Oct 11, 2026","securityReviewed":true,"openapiReady":false,"stats":[{"label":"Trust score","value":"Unknown"},{"label":"Compatibility","value":"OpenClaw"},{"label":"Freshness","value":"Oct 11, 2026"},{"label":"Vendor","value":"Clawhub"},{"label":"Artifacts","value":"0"},{"label":"Benchmarks","value":"0"},{"label":"Last release","value":"2.0.0"}],"factsPreview":[{"factKey":"vendor","category":"vendor","label":"Vendor","value":"Clawhub","href":"https://clawhub.ai/534422530/skills/laosi-code-review","sourceUrl":"https://clawhub.ai/534422530/skills/laosi-code-review","sourceType":"profile","confidence":"medium","observedAt":"2026-10-11T00:01:45.795Z","isPublic":true},{"factKey":"protocols","category":"compatibility","label":"Protocol compatibility","value":"OpenClaw","href":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-code-review/contract","sourceUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-code-review/contract","sourceType":"contract","confidence":"medium","observedAt":"2026-10-11T00:01:45.795Z","isPublic":true},{"factKey":"traction","category":"adoption","label":"Adoption signal","value":"1.2K downloads","href":"https://clawhub.ai/534422530/laosi-code-review","sourceUrl":"https://clawhub.ai/534422530/laosi-code-review","sourceType":"profile","confidence":"medium","observedAt":"2026-10-11T00:01:45.795Z","isPublic":true},{"factKey":"latest_release","category":"release","label":"Latest release","value":"2.0.0","href":"https://clawhub.ai/534422530/laosi-code-review","sourceUrl":"https://clawhub.ai/534422530/laosi-code-review","sourceType":"release","confidence":"medium","observedAt":"2026-05-29T23:31:26.365Z","isPublic":true},{"factKey":"handshake_status","category":"security","label":"Handshake status","value":"UNKNOWN","href":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-code-review/trust","sourceUrl":"https://www.xpersona.co/api/v1/agents/clawhub-534422530-laosi-code-review/trust","sourceType":"trust","confidence":"medium","observedAt":null,"isPublic":true}],"highlights":["1.2K downloads","Trust evidence available"],"agentCard":{"name":"Code Review Pro","description":"多视角代码审�?- 安全(OWASP)/性能/正确�?风格，每视角输出严重级别+修复建议，支持PASS/BLOCK裁定","source":"CLAWHUB","sourceId":"clawhub:s170k9770tgh0506hw0dwtb6pd83kwyq:laosi-code-review","homepage":"https://clawhub.ai/534422530/skills/laosi-code-review","repository":"https://clawhub.ai/534422530/laosi-code-review","documentation":"https://www.xpersona.co/agent/clawhub-534422530-laosi-code-review","protocols":["OPENCLEW"],"examples":[{"kind":"example","language":"text","snippet":"┌────────────────────────────────────────�?�?         代码审查 整体裁定               �?├──────────┬──────────┬─────────┬─────────�?�?SECURITY │PERFORM-  │CORRECT- �? STYLE  �?�? 安全    �?ANCE 性能 �?NESS正确�? 风格   �?├──────────┼──────────┼─────────┼─────────�?�?CRITICAL �? MAJOR   �? MINOR  �?  INFO  �?└──────────┴──────────┴─────────┴─────────�?"},{"kind":"example","language":"python","snippet":"from dataclasses import dataclass, field\nfrom typing import List, Optional\nfrom enum import Enum\n\nclass Severity(Enum):\n    CRITICAL = \"CRITICAL\"   # 必须修复\n    MAJOR = \"MAJOR\"         # 强烈建议\n    MINOR = \"MINOR\"         # 建议改进\n    INFO = \"INFO\"           # 仅供参�?\nclass Verdict(Enum):\n    PASS = \"PASS\"\n    PASS_WITH_COMMENTS = \"PASS_WITH_COMMENTS\"\n    BLOCK = \"BLOCK\"\n\n@dataclass\nclass Finding:\n    perspective: str\n    severity: Severity\n    file: str\n    line: int\n    title: str\n    detail: str\n    suggestion: str\n\n@dataclass\nclass ReviewResult:\n    findings: List[Finding] = field(default_factory=list)\n    \n    def add(self, perspective: str, severity: Severity, file: str,\n            line: int, title: str, detail: str, suggestion: str = \"\"):\n        self.findings.append(Finding(\n            perspective, severity, file, line, title, detail, suggestion\n        ))\n    \n    def security_check(self, code: str, file: str = \"unknown\"):\n        \"\"\"安全视角检�?\"\"\n        checks = [\n            (\"SQL注入风险\", \"execute(\", \"使用参数化查询代替字符串拼接\"),\n            (\"XSS风险\", \"innerHTML\", \"使用textContent或安全转�?),\n            (\"硬编码密�?, \"api_key\", \"移动到环境变量或密钥管理服务\"),\n            (\"路径遍历\", \"../\", \"验证用户输入路径，使用basename\"),\n            (\"命令注入\", \"os.system(\", \"使用subprocess.run传参数组\"),\n            (\"eval执行\", \"eval(\", \"避免使用eval，改用安全替代方�?),\n        ]\n        for title, pattern, suggestion in checks:\n            for i, line_text in enumerate(code.split('\\n'), 1):\n                if pattern in line_text:\n                    self.add(\"SECURITY\", Severity.CRITICAL, file, i,\n                             f\"发现{title}: `{line_text.strip()}`\",\n                             f\"第{i}�? `{line_text.strip()}`\",\n                             suggestion)\n    \n    def performance_check(self, code: str, file: str = \"unknown\"):\n        perform_checks = [\n            (\"N+1查询\", \"for.*in.*query\"),\n            (\"大循�?, \"for.*in range\"),\n            (\"重复计算\", \".count(\"),\n        ]\n        # 简化示�?        for title, _, _ in perform_checks:\n       "}]}}