io.github.duriantaco/skylos

编码与调试

by duriantaco

面向 Python、TypeScript 与 Go 的 dead code、security、secrets 检测及代码质量分析工具。

Skylos 能同时扫出死代码、密钥泄露和安全问题,还兼顾代码质量,覆盖 Python、TypeScript、Go,多语言团队排查更省事。

什么是 io.github.duriantaco/skylos

面向 Python、TypeScript 与 Go 的 dead code、security、secrets 检测及代码质量分析工具。

README

<div align="center"> <img src="assets/DOG_1.png" alt="Skylos" width="260"> <h1>Skylos</h1> <h3>Local-first code scanning for dead code, security, secrets, quality, and AI-generated-code mistakes.</h3> </div>

License: Apache 2.0 CI/CD Ready codecov PyPI - Python Version PyPI version Downloads/month VS Code Marketplace GitHub stars Astronomer Trust Discord

Website | Docs | Quick Start | GitHub Action | VS Code Extension | Real-World Results | Benchmarks | Roadmap | Contributing

English | Chinese README

Real-world validation: Skylos-assisted dead-code cleanup PRs have been merged in Black, NetworkX, Optuna, mitmproxy, pypdf, beets, and Flagsmith. These are accepted cleanup PRs, not project endorsements. See Real-World Results.

<a id="star-authenticity-audit"></a>

Star authenticity audit: A local Astronomer scan on April 26, 2026 computed 420 stargazers and returned overall trust: A. StarGuard also reported low fake-star risk.

What Is Skylos?

Skylos is an open-source static analysis tool and CI/CD PR gate for Python, TypeScript, JavaScript, Java, Go, PHP, and Rust repositories. It combines dead code detection, security scanning, secrets detection, code quality checks, and AI-generated code guardrails in one local-first workflow.

If you use tools like Vulture, Bandit, Semgrep, CodeQL, or GitHub Advanced Security, Skylos is designed to complement that workflow with framework-aware dead code detection, diff-aware regression checks, and PR-native feedback.

Start In 60 Seconds

bash
pip install skylos
skylos .

If Skylos catches something useful in your repo, star it so more maintainers can find it.

Add security, secrets, quality, and dependency checks:

bash
skylos . -a

Create a project config with thresholds, ignores, template hooks, and vibe dictionary extensions:

bash
skylos init

Create a starter local rule pack:

bash
skylos rules init
skylos rules validate .skylos/rules/local.yml

Generate a GitHub Actions PR gate:

bash
skylos cicd init
git add .github/workflows/skylos.yml
git commit -m "Add Skylos CI gate"
git push

Need more commands? Read the CLI Reference.

Choose Your Workflow

GoalCommandWhat You GetMore Detail
First dead-code scanskylos .Finds unused functions, classes, imports, files, and framework entrypoint mistakesDead code docs
Security and quality auditskylos . -aAdds dangerous flow, secrets, dependency, and quality checksSecurity docs
PR gateskylos cicd initGenerates a GitHub Actions workflow with annotations and failure thresholdsCI/CD guide
IDE/test-script outputskylos --format concise src/test.pyPrints only file:line findings and exits non-zero when findings existCLI Reference
Changed-lines reviewskylos . -a --diff origin/mainKeeps findings focused on active work instead of legacy debtQuality gate docs
Runtime-assisted dead-code checkskylos . --traceUses runtime traces to reduce dynamic-code false positivesSmart tracing
Local rule packskylos rules initScaffolds YAML rules for project-specific security and quality checksCustom rules
AI-assisted reviewskylos agent scan .Static analysis plus optional LLM review and fix suggestionsAI features
LLM app defenseskylos defend .Finds missing AI app guardrails mapped to OWASP LLM risksAI defense
Technical debt triageskylos debt .Ranks hotspots and debt trendsTechnical debt

What Skylos Catches

CategoryExamplesWhy It Matters
Dead codeunused functions, classes, imports, package entrypoints, route handlersreduces maintenance cost without breaking dynamic frameworks
Security flawsSQL injection, XSS, SSRF, path traversal, command injection, unsafe deserializationcatches exploitable flows before code reaches main
SecretsAPI keys, tokens, private credentials, high-entropy stringsprevents credentials from leaking through commits and PRs
CI/CD workflowsGitHub Actions and GitLab CI dangerous triggers, unpinned actions/includes, broad tokens, OIDC misuse, cache poisoning, mutable imagesreduces CI/CD supply-chain risk before release jobs run
Quality regressionscomplexity, deep nesting, duplicate branches, long functions, inconsistent returnskeeps AI-assisted refactors from adding brittle code
AI code mistakesphantom security calls, missing decorators, unfinished stubs, disabled controls, network calls without timeoutscatches common hallucinated or incomplete code paths
LLM app risksunsafe tool use, prompt injection exposure, missing output validation, missing rate limitshelps teams ship AI features with guardrails

See the full Rules Reference.

Why Teams Use Skylos

  • Framework-aware dead code detection: understands FastAPI, Django, Flask, pytest, SQLAlchemy, Next.js, React, package entrypoints, and common plugin patterns.
  • CI/CD-first workflow: run locally, gate PRs, annotate GitHub diffs, and keep legacy findings under control with baselines.
  • Local-first by default: core static analysis does not require cloud upload or LLM calls.
  • AI-era regression checks: catches removed validation, auth, logging, CSRF, rate limiting, missing timeouts, and other controls during AI-assisted edits.
  • Configurable guardrails: extend prompt templates and vibe-code dictionaries from project config without editing Skylos source.
  • One command surface: dead code, security, secrets, quality, technical debt, agent review, and AI defense live behind one CLI.

Install Options

bash
# Core static analysis
pip install skylos

# LLM-powered agent workflows
pip install "skylos[llm]"

# All published optional extras
pip install "skylos[all]"

Container image:

bash
docker pull ghcr.io/duriantaco/skylos:latest
docker run --rm -v "$PWD":/work -w /work ghcr.io/duriantaco/skylos:latest . --json --no-provenance

See Installation for source installs, container usage, and optional dependencies.

Configure Templates And Vibe Checks

Run skylos init to add these sections to pyproject.toml:

toml
[tool.skylos.templates]
# security = ".skylos/templates/security.md"
# quality = ".skylos/templates/quality.md"
# security_audit = ".skylos/templates/security_audit.md"
# review = ".skylos/templates/review.md"

[tool.skylos.vibe]
extra_phantom_names = ["verify_enterprise_auth"]
extra_phantom_decorators = ["tenant_admin_required"]
extra_credential_names = ["tenant_signing_secret"]
extra_network_timeout_calls = ["vendor_sdk.fetch"]

Template files extend Skylos' built-in prompts; they do not replace the JSON-only output contract or untrusted-code safety rules. Vibe dictionary extensions let teams teach Skylos about local fake-auth helpers, project credential names, sensitive files, and network calls that must set timeouts.

Language Support

LanguageDead CodeSecurityQualityNotes
PythonYesYesYesstrongest coverage; framework-aware static analysis and optional tracing
TypeScript / JavaScriptYesYesYesTree-sitter parsing, package graph reachability, framework conventions
JavaYesYesYesTree-sitter parsing and structured security-flow analysis
GoYesPartialPartialdead-code and selected security benchmark coverage
PHPYesYesPartialPHP parser coverage plus taint-style security sinks and sources
RustYesYesPartialRust parser coverage plus security sink/source checks

See Rules Reference for rule families and scanner scope.

Benchmark Snapshot

Skylos has checked-in regression benchmarks for dead code, security, quality, and agent review. These are strict regression gates, not broad proof that any tool is universally state of the art.

SuiteCurrent Skylos ResultBaseline
Dead code regression16 cases, TP=36 FP=0 FN=0 TN=59, score 100.0Ruff score 62.67; Vulture not installed in latest local rerun
Security regression20 cases, TP=11 FP=0 FN=0 TN=10, score 100.0Bandit score 47.14 on Python-applicable cases
Quality regression6 cases, score 100.0regression gate only
Agent review25 cases, score 100.0regression gate only

Frozen golden-v0.2 highlights:

Frozen SuiteSkylos ResultCaveat
Dead code seeded devoverall score 96.28; TS/JS/Go/Java score 100.0; Python score 93.33Python residuals are label-review items
Security seeded devoverall score 96.52; full recall with one Python urljoin false positivelabel should be reviewed
OWASP Java security devTP=105 FP=0 FN=15 TN=120, score 94.37request-wrapper, LDAP, XPath, and property weak-hash gaps remain
Quality seeded devTP=1 FP=0 FN=0 TN=1, score 100.0one seeded case only

For methodology, commands, competitor rows, and caveats, see BENCHMARK.md.

Integrations

IntegrationLinkPurpose
GitHub ActionGitHub ActionPR gates, annotations, and CI enforcement
VS Code extensionVS Code extensionin-editor findings and AI-assisted fixes
MCP serverMCP setupexpose Skylos scans to AI agents and coding assistants
Docker imageInstallationrun Skylos without a local Python install
Skylos CloudCloud workflowoptional upload and dashboard workflows

Generate a GitHub Actions workflow from the CLI:

bash
skylos cicd init --upload
skylos cicd init --upload --scan-path apps/api

The generated upload workflow uses GitHub OIDC, sends PR head commit/branch metadata, and supports monorepo subprojects through --scan-path.

Documentation Map

NeedRead This
Install options, source install, and DockerInstallation
First scan and core workflowsQuick Start
CLI commands, flags, and examplesCLI Reference
CI setup, PR gates, annotations, and branch protectionCI/CD
Dead-code behavior and framework awarenessDead Code Detection
Security scanning and taint analysisSecurity Analysis
Agent scan, verification, remediation, and model setupAI Features
AI defense checks and LLM guardrailsAI Defense
MCP server setupMCP Server
Real-world merged cleanup PRsReal-World Results
Baselines, filtering, suppressions, and whitelistsConfiguration
Smart tracingSmart Tracing
Rule families and language supportRules Reference
Cloud uploads and dashboard flowCLI to Dashboard
VS Code extensionVS Code Extension
Benchmarks and methodologyBENCHMARK.md
Security policySECURITY.md
Release processRELEASE_WORKFLOW.md
Contribution prioritiesROADMAP.md
ContributingCONTRIBUTING.md

Common Questions

Does Skylos replace Bandit, Semgrep, CodeQL, or Vulture?

No. Skylos can run alongside them. It focuses on framework-aware dead-code signal, PR gating, AI-era regression checks, and a combined workflow across dead code, security, secrets, and quality.

Does Skylos require an LLM?

No. Core static analysis runs locally without API keys. LLM features are optional through skylos[llm] and agent commands.

Can I use it only on changed code?

Yes. Use skylos . -a --diff origin/main locally or configure CI gates to focus on new findings.

How should I handle intentional dynamic code?

Use baselines, whitelists, inline suppressions, or runtime tracing. See the configuration docs and smart tracing docs.

Contributing And Support

  • Report security issues through SECURITY.md.
  • Open bugs and false-positive reports with minimal repros.
  • Check ROADMAP.md for useful contribution areas.
  • Read CONTRIBUTING.md before sending a pull request.
  • See QUALITY.md for project quality and gate expectations.
  • Join the Discord for community support.

License

Skylos is licensed under the Apache License 2.0.

<!-- mcp-name: io.github.duriantaco/skylos -->

常见问题

io.github.duriantaco/skylos 是什么?

面向 Python、TypeScript 与 Go 的 dead code、security、secrets 检测及代码质量分析工具。

相关 Skills

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描137.2k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描137.2k

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描137.2k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
85.9k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
55.6k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
47.1k

评论