Security

ClawCode Lens

Try it

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.

What it does

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.

The skill document

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

Related skills

项目编程语言代码量分析专家。扫描项目目录,统计各编程语言的文件数、代码行数及占比,生成可视化的语言分布报告。当用户需要分析项目使用了哪些语言、各语言代码量占比、技术栈构成、代码行数统计时触发此技能。典型场景包括:分析项目语言占比、统计代码行数、看看这个项目用了哪些语言、分析技术栈、code language analysis 等。

Explain what a piece of code does in plain English, at the depth the reader needs. Use when asked to explain code, walk through a function, understand an unf...

1 installs

Scan AI-generated code for bugs before deploying — 8 static analysis checks from critical (hardcoded secrets, unsafe eval) to low (unused imports). Productio...

4 installs

代码智能分析工具箱。受 Claude Code LSPTool 设计模式启发,但使用 100% 开源工具:ripgrep (搜索)、pyright (Python 类型检查)、tree-sitter (AST 解析)。不需要 LSP 服务器,开箱即用。

2 installs

Code quality audit guidance, security review, vulnerability identification patterns, and dependency risk assessment. AI-delivered service via clawtip verification.

Review code for bugs, security, architecture, smells, patterns, performance, tests, and refactor plans

2 installs