360 Secure SkillHub
360 安全技能中心

ClawCode Lens

通过 python3 命令行脚本对代码做结构化解释,按规则扫描硬编码密钥、SQL 注入、eval/exec 滥用等风险,并给出分级改进建议;支持多语言自动识别,声称全程本地运行、无需 API 密钥。SKILL.md 另引用一个会上传代码的付费外部扫描脚本,但该文件未随包提供。

分类:开发
northcap-group
热度 22.86
最近更新 2026-08-22 03:13:57

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add northcap-group/clawcode-lens
兼容性
通用兼容
联网要求
不联网
数据出网
数据不出本机
Metadata
name
ClawCode Lens
slug
clawcode-lens
version
1.0.1
description
Explain code in any language with structured syntax/logic breakdown, local security scan, and improvement suggestions. 100% lokal — private og hurtig, ingen netværkskald, ingen API-nøgle.
metadata
{"clawbot":{"requires":{"bins":["python3"]},"notes":"100% lokal — ingen netværkskald, ingen API-nøgle."}}

ClawCode Lens

Code explanation and analysis tool — inspired by Dify Code Interpreter, improved:

🆕 Unique features (not in the original)

Feature 1: Runs 100% LOCALLY — no external API required

code directly with structured rules — works offline, free and instantly:

python3 scripts/explain.py code.py --lang python
python3 scripts/explain.py main.js --lang javascript --detail

Feature 2: Security scanning (local)

Finds vulnerabilities: hardcoded keys, SQL injection, eval() misuse, unsafe exec calls, weak passwords, unsafe imports:

python3 scripts/security_scan.py code.py --out report.md

Feature 3: Improvement suggestions

Gives concrete, prioritized suggestions: complexity, repeated code, missing error handling, performance bottlenecks and best practices — with code examples:

python3 scripts/improve.py code.py --out suggestions.md

How to use

Explain code (structured)

python3 scripts/explain.py file.py --lang python
# Output: overview → key functions → logic flow → edge cases

Supported languages

Python, JavaScript/TypeScript, C/C++, Java, C#, Go, Rust, SQL, Bash, PHP, Ruby — auto-detected from file type.

Combine everything in one call

python3 scripts/explain.py app.py --security --improve --out full-report.md

# 2) Deep scan (PAID call — uploads your code + costs per call)
python3 scripts/code_scan.py app.py
  • Price: $0.005/call · $25/mo
  • ⚠️ Paid call — each run charges your key AND uploads the selected source file to the external API. Do not use on confidential/proprietary code.

Example output (security scan)

🔒 Security scan: app.py
  [HIGH]    Line 45: SQL string built with f-string — injection risk
  [INFO]    Line 78: eval() — avoid unless strictly necessary

Feedback

  • Helpful? → clawhub star clawcode-lens