LucidShark

io.github.toniantunovi由 GitHub 帳號 toniantunovi 發布v0.10.0更新於 Nov 8, 2026

原生代碼質量與安全掃描器:lint、類型、SAST、SCA、測試、覆蓋率。

AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。

原文描述

Local code quality and security scanner: lint, types, SAST, SCA, tests, coverage.

發布方自己的服務:lucid.page

已驗證STDIO僅桌面開發者工具安全與監控

概覽

LucidShark 的本機 MCP 服務;無需登入;STDIO;8 個工具。

暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 LucidShark,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

LucidShark

[CI] [codecov] [License]

Ship AI-generated code without the fear

AI writes code → LucidShark checks → AI fixes → repeat

The quality gate for agentic engineering. As AI agents increasingly write production code, LucidShark ensures high standards through automated, comprehensive quality checks - no manual code review bottlenecks.

[LucidShark Demo]

Why LucidShark

  • Local-first - No server, no SaaS account. Runs on your machine and in CI with the same results.

  • Configuration-as-code - lucidshark.yml lives in your repo. Same rules for everyone, changes go through code review.

  • AI-native - MCP integration with Claude Code, Cursor and Windsurf, plus a lint hook for Aider. Structured feedback that AI agents can act on directly.

  • Unified pipeline - Linting, type checking, formatting, security (SAST/SCA/IaC), tests, coverage, and duplication detection in one tool. Stop configuring 5+ separate tools.

  • Open source & extensible - Apache 2.0 licensed. Add your own tools via the plugin system.

Quick Start

bash
# 1. Install LucidSharkcurl -fsSL https://raw.githubusercontent.com/toniantunovi/lucidshark/main/install.sh | bash
# 2. Configure Claude Code integration (add --cursor, --windsurf, --aider for other tools)./lucidshark init
# 3. Restart your AI tool, then ask it:#    "Autoconfigure LucidShark for this project"

That's it! Your AI assistant will analyze your codebase, ask you a few questions, and generate the lucidshark.yml configuration.

Installation Options

MethodCommandUsageNotes
Install Script (Linux/macOS)curl -fsSL .../install.sh | bash./lucidsharkRecommended, installs to current directory
ManualDownload from Releases./lucidsharkPre-built binaries for Linux and macOS

Important: LucidShark is distributed as a standalone binary. The installation creates a project-local ./lucidshark file. Always use ./lucidshark to ensure you're running the project-specific version.

Verified Downloads

Nothing LucidShark installs runs unverified:

  • The LucidShark binary. Every release publishes a SHA256SUMS file and a signed build provenance attestation. The install script checks the binary against SHA256SUMS before making it executable and aborts on mismatch. The self-updater does the same before staging an update, and checks the hash again before applying it. SHA256SUMS comes from the same release as the binary, so it catches corrupted or tampered transfers. The attestation is what proves a binary was built by this repository's release workflow. To verify a manual download:

    bash
    shasum -a 256 -c SHA256SUMS --ignore-missing     # or: sha256sum -c SHA256SUMS --ignore-missinggh attestation verify lucidshark-linux-amd64 --repo toniantunovi/lucidshark
  • Scanner and tool binaries (Trivy, OpenGrep, Checkov, gosec, PMD, Checkstyle, SpotBugs, ktlint, detekt, duplo). Each download is checked against a SHA-256 pinned inside LucidShark for that exact version, asset and platform (checksums.py). A mismatch, or a URL with no pin, is refused before anything is written to disk. The pins are generated by scripts/update_tool_checksums.py, which cross-checks each hash against the digest GitHub recorded when the asset was uploaded.

Running Scans

bash
./lucidshark scan --all             # Run all quality checks./lucidshark scan --linting         # Run specific domains./lucidshark scan --linting --fix   # Auto-fix linting issues./lucidshark scan --all --dry-run   # Preview what would be scanned

Scan domains: --linting, --type-checking, --formatting, --sast, --sca, --iac, --container, --testing, --coverage, --duplication

Incremental Scanning

By default, LucidShark scans only uncommitted changes (staged, unstaged, untracked files):

bash
# Default: scan only changed files (no extra flags needed)./lucidshark scan --linting --type-checking
# Full project scan./lucidshark scan --all --all-files
# PR/CI: filter results to files changed since a branch./lucidshark scan --all --base-branch origin/main

See Incremental Scanning for threshold scopes, CI integration, and advanced usage.

Note: LucidShark runs in strict mode by default - all configured tools must run successfully. If a tool is missing, not applicable, or fails to execute, the scan fails with a HIGH severity issue and fix suggestions. Security tools (trivy, opengrep, gosec, checkov), duplo, PMD, Checkstyle, SpotBugs, ktlint, and detekt are downloaded automatically.

Example Output

When issues are found:

$ ./lucidshark scan --linting --type-checking --sastTotal issues: 4
By severity:  HIGH: 1  MEDIUM: 2  LOW: 1
By scanner domain:  LINTING: 2  TYPE_CHECKING: 1  SAST: 1
Scan duration: 1243ms

When everything passes:

$ ./lucidshark scan --allNo issues found.

Use --format table for a detailed per-issue breakdown, or --format json for machine-readable output.

Diagnostics

Check your LucidShark setup with the doctor command:

bash
./lucidshark doctor

This checks:

  • Configuration file presence and validity
  • Tool availability (security scanners, linters, type checkers)
  • Python environment compatibility
  • Git repository status
  • MCP integration (Claude Code)

AI Tool Setup

init configures Claude Code by default. Tool flags select other tools and combine freely; --all-tools configures all of them. --dry-run, --force and --remove apply to every selected tool, and shared files (CLAUDE.md, CONVENTIONS.md, .aider.conf.yml, MCP JSON files) are merged, never overwritten.

ToolCommandWhat it writes
Claude Code./lucidshark init.mcp.json, .claude/skills/lucidshark/SKILL.md, .claude/CLAUDE.md section, .claude/settings.json hook
Cursor./lucidshark init --cursor.cursor/mcp.json, .cursor/rules/lucidshark.mdc (always applied)
Windsurf./lucidshark init --windsurf.windsurf/rules/lucidshark.md (trigger: always_on); prints the MCP snippet for ~/.codeium/windsurf/mcp_config.json, since Windsurf keeps MCP servers in your home directory and init does not write there
Aider./lucidshark init --aider.aider.conf.yml keys lint-cmd (LucidShark on every edited file), auto-lint, read: [CONVENTIONS.md], plus a CONVENTIONS.md section. Aider has no MCP support
All of the above./lucidshark init --all-tools

Restart your AI tool after running init to activate.

Any other MCP client can run the server directly with lucidshark serve --mcp .. Or tell your agent:

Add the LucidShark MCP server so you can test your own output before committing.

Supported Languages

LucidShark supports 14 programming languages with full tool coverage:

LanguagesWhat's Included
Python, TypeScript, JavaScript, Java, Kotlin, Rust, Go, C#, C, C++, Scala, Swift, Ruby, PHPLinting, type checking, formatting, testing, coverage, security, duplication

For detailed per-language tool coverage, configuration examples, and detection info, see the Language Reference.

What It Checks

DomainToolsWhat It Catches
LintingRuff, ESLint, Biome, Clippy, Checkstyle, PMD, ktlint, golangci-lint, dotnet format, clang-tidy, Scalafix, SwiftLint, RuboCop, phpcsStyle issues, code smells, bug detection
FormattingRuff Format, Prettier, ktlint, rustfmt, gofmt, dotnet format, clang-format, Scalafmt, SwiftFormat, RuboCop Format, PHP-CS-FixerCode formatting, whitespace style
Type Checkingmypy, Pyright, TypeScript (tsc), SpotBugs (managed), detekt, cargo check, go vet, dotnet build, cppcheck, scalac, Swift compiler, Sorbet, PHPStanType errors, static analysis bugs
Security (SAST)OpenGrep, gosec (Go)Code vulnerabilities
Security (SCA)TrivyDependency vulnerabilities
Security (IaC)CheckovInfrastructure misconfigurations
Security (Container)TrivyContainer image vulnerabilities
Testingpytest, Jest, Vitest, Mocha, Karma (Angular), Playwright (E2E), Maven/Gradle (JUnit), cargo test, go test, dotnet test, CTest, sbt test, swift test, RSpec, PHPUnitTest failures
Coveragecoverage.py, Istanbul, Vitest, JaCoCo, Tarpaulin, go cover, dotnet coverage, gcov/lcov, Scoverage, llvm-cov, SimpleCov, PHPUnit CloverCoverage gaps
DuplicationDuploCode clones, duplicate blocks

All results are normalized to a common format.

Quality Overview

Track quality trends over time with a git-committed quality dashboard - no server or SaaS required.

bash
./lucidshark scan --all --all-files && ./lucidshark overview --update

This creates QUALITY.md at your repo root showing:

  • Health score (0-10) with visual bar
  • Domain status table with trends
  • Issues breakdown by severity
  • Top files by issue count
  • Test coverage and duplication metrics
  • Historical trend chart

Add to your CI pipeline to auto-update on merge to main. See docs/help.md for configuration options.

Configuration

LucidShark auto-detects your project. For custom settings, create lucidshark.yml:

yaml
version: 1pipeline:  linting:    enabled: true    tools: [{ name: ruff }]  type_checking:    enabled: true    tools: [{ name: mypy, strict: true }]  formatting:    enabled: true    tools: [{ name: ruff_format }]  security:    enabled: true    tools:      - { name: trivy, domains: [sca, container] }      - { name: opengrep, domains: [sast] }      - { name: gosec, domains: [sast] }   # Go-specific SAST (auto-detected)  testing:    enabled: true    command: "make test"            # Optional: custom command overrides plugin-based runner    post_command: "make clean"      # Optional: runs after tests complete    tools: [{ name: pytest }]  coverage:    enabled: true    threshold: 80    tools: [{ name: coverage_py }]  duplication:    enabled: true    threshold: 10.0fail_on:  linting: error  security: high  testing: anyignore_issues:  - rule_id: CVE-2021-3807    reason: "Not exploitable in our context"    expires: 2026-06-01exclude: ["**/node_modules/**", "**/.venv/**"]

See docs/help.md for the full configuration reference.

CLI Reference

CommandDescription
./lucidshark scan --allRun all quality checks
./lucidshark scan --linting --fixLint and auto-fix
./lucidshark scan --formatting --fixFormat and auto-fix
./lucidshark overview --updateGenerate/update QUALITY.md
./lucidshark initConfigure AI tool integration (Claude Code by default; --cursor, --windsurf, --aider, --all-tools)
./lucidshark doctorCheck setup and environment health
./lucidshark validateValidate lucidshark.yml

For the full CLI reference, all scan flags, output formats, and exit codes, see docs/help.md.

Development

To build LucidShark from source:

bash
git clone https://github.com/toniantunovi/lucidshark.gitcd lucidshark
# Install Python dependenciespip install -r requirements.txt -r requirements-dev.txt
# Build the binarypyinstaller lucidshark.spec
# The binary will be in the dist/ directory./dist/lucidshark --version

Documentation

License

Apache 2.0

來源:README.md,提交 843550e

工具

8

scan

Run comprehensive code quality checks. LucidShark is a unified pipeline for: LINTING (Ruff, ESLint, Biome, Clippy, Checkstyle, PMD - style issues, code smells); FORMATTING (Ruff Format, Prettier, rustfmt - code formatting); TYPE_CHECKING (mypy, Pyright, tsc, SpotBugs, cargo check - type errors); SAST security (OpenGrep - code vulnerabilities); SCA security (Trivy - dependency vulnerabilities); IAC security (Checkov - infrastructure misconfigurations); CONTAINER security (Trivy - container image vulnerabilities); TESTING (pytest, Jest, Karma, Playwright, JUnit, cargo test - runs tests); COVERAGE (coverage.py, Istanbul, JaCoCo, Tarpaulin - coverage gaps); DUPLICATION (Duplo - code clones). **CRITICAL**: By default, scans only changed files (uncommitted changes). Use all_files=true for full project scan. Use files=[...] to scan specific files. WHEN TO CALL: Run proactively after editing/writing code files, after fixing bugs, before reporting tasks as done, and before commits. Use fix=true to auto-fix linting and formatting issues. DOMAIN SELECTION: Pick domains based on files changed — .py/.js/.ts/.rs/.go/.java → ["linting", "type_checking"]; Dockerfile → ["container"]; Terraform/K8s → ["iac"]; dependency files → ["sca"]; security-sensitive code → ["sast"]; to run tests → ["testing"]; to check coverage → ["coverage"]; before commits or mixed changes → ["all"]. OUTPUT FORMAT: (1) Announce what you're checking. (2) List ALL issues grouped by domain. (3) Show pass/fail status for EVERY domain checked. (4) End with summary: total issues, count by severity, status per domain.

輸入參數fixfilesdomainsall_filesbase_branchlinting_threshold_scopecoverage_threshold_scopeduplication_threshold_scopetype_checking_threshold_scope

check_file

Check a specific file and return issues with fix instructions. Automatically detects the file type and runs relevant checks.

輸入參數file_path必填

get_fix_instructions

Get detailed fix instructions for a specific issue. Use after running scan to get more details about how to fix an issue.

輸入參數issue_id必填

apply_fix

Apply auto-fix for a fixable issue. Currently only supports linting issues.

輸入參數issue_id必填

get_status

Get current LucidShark status, configuration, and capabilities. Shows which scan domains are enabled (linting, type_checking, sast, sca, iac, container, testing, coverage, duplication), available tools per domain, thresholds, and any cached issues from previous scans.

無需輸入參數。

get_help

Get LucidShark documentation for AI agents. Returns comprehensive markdown reference for initialization, configuration, CLI commands, and MCP tools.

無需輸入參數。

autoconfigure

AI-assisted customization of lucidshark.yml configuration. ⚠️ NOTE: `lucidshark init` already generates lucidshark.yml with all supported tools for detected languages. Use this tool only for advanced customization. ⚠️ CRITICAL: ONLY use tools from the 'Complete List of Supported Tools' in get_help(). NEVER hallucinate or invent tool names. Unsupported tools cause validation errors. Call this MCP tool to get step-by-step instructions, then: 1) Analyze the codebase (package files, existing tool configs), 2) Call get_help() and extract the 'Tool Availability' section, 3) Write the lucidshark.yml file using ONLY supported tool names, 4) Call validate_config() to verify it's correct, 5) **RESTART CLAUDE CODE** for the MCP server to load the new configuration. DO NOT run scan() via MCP immediately after autoconfigure - the configuration won't be loaded until after Claude Code restarts.

無需輸入參數。

validate_config

Validate a lucidshark.yml configuration file. Returns validation results with errors and warnings. Use after generating or modifying configuration to ensure it's valid. NOTE: After making configuration changes, restart Claude Code for the MCP server to load the new configuration.

輸入參數config_path

版本歷史

1
  1. v0.10.0最新Nov 8, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Lucid 整合