Skip to content
duriantacoPublic

About

Open source local-first PR scanner that finds dead code, security bugs, secrets, quality regressions, and AI-code mistakes before merge. For first timers refer to https://duriantaco.github.io/skylos/repo-map/

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

960 stars

Watchers

4 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

1,596 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Skylos

Skylos

Code checks that show their work.

PyPI version PyPI - Python Version License: Apache 2.0 codecov VS Code Marketplace MCP Toplist

Command Groups · Quick Start · Skylos Cloud · Docs & Guides · Website · VS Code · Discord

English | Deutsch | 简体中文

What is Skylos?

Skylos is a free, open-source (Apache-2.0) code checker for code written by humans and coding agents (Claude Code, Codex, Cursor). It runs locally on your machine, inside your coding agent's loop, and as a pull-request gate in CI — with no account, no API key, and no LLM required.

Coding agents write code fast, and they repeat the same mistakes: deleting or skipping failing tests, installing packages that don't exist, importing functions nobody wrote, leaving injection bugs or hard-coded secrets behind, and abandoning dead code. Skylos catches all of this in one tool.

Quick start

pip install skylos
skylos . -a          # run every check locally; nothing leaves your machine

Command groups

Skylos has commands for local scanning, coding-agent guardrails, CI gates, release checks, and Skylos Cloud. Everything is split into 8 groups so you always know where to look:

# Group What it is used for Key commands Guide
1 Start Here & Daily Workflow Set up a repository once and open one local page for your codebase map, changes, and check runs every day. skylos setup, skylos open, skylos doctor, skylos commands, skylos tour Tutorial
2 Code Scanning, Cleanup & Reports Scan code locally for dead code, security flaws, secrets, vulnerable packages, quality issues, import cycles, and tech debt. skylos ., skylos . -a, skylos lint, skylos debt, skylos report, skylos explain, skylos graph, skylos secrets-history, skylos sbom, skylos clean, skylos cleanup, skylos review, skylos suite All commands
3 Coding Agent Guardrails Check Claude Code, Codex, and Cursor while they work, block fake package installs and secret reads, and verify when they say "done". skylos agent install-hooks, skylos done, skylos verify, skylos stack, skylos hook, skylos agent harden, skylos agent recap, skylos mcp, skylos contract, skylos provenance Agent hooks · Done gate
4 AI Review & AI App Safety Run optional LLM audits and dead-code reviews, or check guardrails and runtime behavior of AI/LLM apps you build. skylos discover, skylos defend, skylos agent init, skylos agent test, skylos agent scan, skylos agent verify, skylos agent audit, skylos agent remediate, skylos key AI review · AI app safety
5 CI/CD & Pull Request Gates Block failing PRs, post inline review comments, require human approval on risky edits, and check Postgres migrations in CI. skylos cicd init, skylos cicd gate, skylos cicd review, skylos cicd annotate, skylos cicd risk-review, skylos cicd postgres-check First gated PR · CI platforms
6 Release, Containers & External Scanners Check built GPU artifacts, scan pinned container images, verify signed Cloud verdicts before deploy, and compare other scanners. skylos preflight, skylos image scan, skylos verify-verdict, skylos ingest, skylos compare Release commands
7 Config, Baselines & Utilities Set up config files, freeze existing debt in a baseline, whitelist symbols, manage rules and cache, or migrate from Sonar. skylos init, skylos baseline, skylos whitelist, skylos rules, skylos cache, skylos badge, skylos sonar import, skylos feedback All commands
8 Skylos Cloud (Optional) View scans in a team web dashboard, enforce shared PR gates and policies, track decisions, and generate compliance reports. skylos cloud, skylos login, skylos whoami, skylos project, skylos sync, skylos upload --retry, skylos credits Cloud guide

Need the full command-by-command breakdown? See All Commands by Group or run skylos commands.


See it work

A 20-line Flask app scanned with every check (skylos . -a --format concise):

app.py:15  SKY-D211  Possible SQL injection: tainted or string-built query.
app.py:5  SKY-L012  Import from local module 'billing' requests 'issue_refund', but that name is not defined or re-exported there.
app.py:8  SKY-S101  Potential stripe secret detected
requirements.txt:1  SKY-SCA-GHSA-68rp-wp8r-4726  flask@3.1.2: Flask session does not add `Vary: Cookie` header when accessed in some ways
billing.py:1  SKY-U001  unused function: charge_card

Every finding names the file, line, and rule ID. Security findings include source-to-sink trace paths; --format json outputs the full evidence.


1. Start Here & Daily Workflow

Use two commands for day-to-day work with or without coding agents:

skylos setup    # once per repo: connects agent hooks/MCP, tests, PR check, and code map
skylos open     # every day: opens one local page with your code diagram, change map, and check runs

Check your installation and active config anytime with skylos doctor, or run skylos tour for a quick walkthrough. See the Setup-to-PR Tutorial.


2. Code Scanning, Cleanup & Reports

No account or LLM required. Everything runs locally:

skylos .                         # dead code (fast, default)
skylos . -a                      # every check: security, secrets, dependencies, quality, AI-code mistakes
skylos . -a --diff origin/main   # only findings on changed lines
skylos . --coverage-report coverage.xml --min-new-coverage 80 --diff origin/main --gate
skylos . --duplication --max-new-duplication 3 --diff origin/main --gate
skylos . --gate                  # fail the build when local gate limits are exceeded
skylos . --format pretty         # grouped report with code snippets (also: concise, json, sarif)
skylos . --tui                   # keyboard-driven terminal triage
skylos lint                      # local import cycles and configured architecture layers
skylos debt .                    # technical-debt score and hotspot ranking
skylos report .                  # write a shareable one-page HTML or Markdown report
skylos secrets-history .         # scan local Git commit history for leaked credentials
skylos sbom .                    # export CycloneDX 1.6 or SPDX 2.3 SBOM offline
skylos clean . --dry-run         # preview Python dead-code removal (--apply writes edits)
skylos cleanup . --top 5         # prioritized fix queue for you or a coding agent

Step through saved security traces with skylos explain REPORT.json --interactive, explore call graphs with skylos graph, or record local triage decisions with skylos review. See CLI Output Modes and All Commands — Group 2.

What Skylos catches

Category Examples
AI-code mistakes Imports of missing functions, invented package APIs, fake/typosquatted packages, impossible versions, unfinished stubs, removed controls
Security flaws SQL injection, XSS, SSRF, path traversal, command injection, unsafe deserialization, ReDoS
Secrets API keys, tokens, private credentials, high-entropy strings, leaked secrets in git history
Dependencies Known CVEs, static reachability (Python, JS/TS, Go, Rust), malicious packages, license policy, offline SBOM
Quality Complexity, deep nesting, duplicate branches, long functions, inconsistent returns, import cycles
Test coverage Overall and refactor-aware new-code line coverage from LCOV, Cobertura, JaCoCo, Go coverprofile, and OpenCover (guide)
Code duplication Multi-language copy-paste detection with overall and refactor-aware new-code limits (guide)
Dead code Unused functions, classes, imports, files, and dependencies (framework-aware: FastAPI, Django, Flask, Next.js, React, Laravel, ...)
CI/CD & deployment Risky GitHub Actions and GitLab CI, Dockerfiles, Docker Compose, systemd, Kubernetes
LLM apps Unsafe tool use, prompt-injection exposure, missing output validation

Every rule: Rules Reference and Rule Dictionary.


3. Coding Agent Guardrails

Stop coding agents from breaking things while they work and before they claim "done":

Real-time agent hooks

skylos agent install-hooks            # Claude Code
skylos agent install-hooks --codex    # Codex
skylos agent install-hooks --cursor   # Cursor
  • After each edit: checks changed lines for security bugs, secrets, and AI-code mistakes.
  • Before a file read: blocks reading files containing hard-coded secrets.
  • Before a package install (pip, uv, npm, pnpm, bun, go, ...): blocks fake or typosquatted packages.
  • Before a git command: blocks --no-verify and git-hook bypasses.
  • At stop: blocks "done" while issues introduced by the agent are still open.

Review what hooks caught with skylos agent recap, harden agent permissions with skylos agent harden, or expose Skylos tools via skylos mcp. See Agent Hooks.

Verify the agent is really done

skylos done --base main

skylos done compares your branch against main, runs your test suite itself, writes a receipt to .skylos/receipts/, and blocks:

  • deleted, skipped, or weakened tests
  • loosened test configs or CI steps
  • silenced lint or type checks
  • code that special-cases tests to fake a pass
  • code left without callers (advisory)

Settings are read from main so a branch cannot weaken its own check. pytest runs automatically; other runners need one line in pyproject.toml or skylos.toml:

[tool.skylos.done]
test_command = "npm test"

Also in this group: skylos verify (static AI-code checks, no LLM), skylos done replay (prove a test catches a regression), skylos stack (verify stacked PRs), and skylos contract (project hallucination contracts). See Done Gate and All Commands — Group 3.


4. AI Review & AI App Safety

Check the AI/LLM apps you build (no LLM needed)

skylos discover .                            # list LLM calls, agent tools, and prompt sites
skylos defend .                              # score guardrails (OWASP LLM & Agentic Top 10)
skylos defend . --fail-on critical           # CI gate
skylos defend . --format md -o evidence.md   # shareable evidence report
skylos agent init && skylos agent test       # runtime behavior contract testing for your agent

Optional LLM-assisted code review (pip install "skylos[llm]")

skylos key add                 # store your model provider key locally
skylos . -a --ai-review        # AI double-check of unused code and Python security findings
skylos agent scan .            # hybrid static + LLM scan
skylos agent verify .          # LLM (or --dead-code-review jev) review of dead-code candidates
skylos agent security-deep .   # staged deep security audit
skylos agent remediate .       # scan and propose/apply fixes

See Agent Verification, Agent Behavior Testing, AI Review, and Dead-Code Review.


5. CI/CD & Pull Request Gates

Block failing pull requests with no account or token needed:

git checkout -b add-skylos-gate
skylos cicd init --no-upload
git add .github/workflows/skylos.yml
git commit -m "Add Skylos pull request gate"
git push -u origin add-skylos-gate

skylos cicd init supports GitHub Actions, GitLab CI, Jenkins, Bitbucket Pipelines, Azure Pipelines, and CircleCI (all CI platforms).

  • Default gate: Always fails on critical security issues, hard-coded secrets, and critical AI-code mistakes; other findings fail above your [tool.skylos.gate] limits (read from the base branch so PRs cannot loosen their own gate).
  • Human sign-off on risky PRs: Add --risk-review (skylos cicd risk-review) to require a human approval whenever a PR deletes tests, removes auth checks, changes dependencies, touches migrations, or weakens CI (Risk Review).
  • Other CI commands: skylos cicd gate, skylos cicd review (inline PR comments), skylos cicd annotate, and skylos cicd postgres-check.

Walkthrough: Your First Gated PR.


6. Release, Containers & External Scanners

Run final checks before shipping artifacts or compare Skylos against existing tools:

skylos preflight                                           # check a built GPU artifact against .skylos/gpu-targets.yml
skylos image scan IMAGE@sha256:<digest> --platform linux/amd64   # scan a pinned container image with Trivy
skylos verify-verdict bundle.json --require-passed         # verify a signed Skylos Cloud deploy verdict
skylos ingest trivy --input trivy.json                     # import external Trivy or Claude Security reports
skylos compare . --against existing.sarif                  # compare Skylos side-by-side with another scanner

See Verify a Signed Verdict, Container Image Reports, and Scanner Comparison.


7. Config, Baselines & Utilities

skylos init creates a starter config in pyproject.toml. Projects without one can use skylos.toml:

# skylos.toml
exclude = ["generated", "dist"]

[gate]
max_high = 5
max_quality = 10
max_ai_defects = 10

[done]
test_command = "npm test"
  • Silence one line with a reason: query = build_query(user_id) # skylos: ignore[SKY-D211] user_id is an int from the router
  • Freeze existing findings: skylos baseline . then scan with --baseline so only new issues fail.
  • Other utilities: skylos whitelist, skylos rules, skylos cache stats|clear, skylos badge, skylos sonar import (exclusions, coverage paths, --quality-gate, --issues), and skylos feedback.

8. Skylos Cloud (Optional)

Skylos Cloud is the optional paid web platform for teams (includes a 14-day Workspace trial with no card and a Free tier). It keeps scan history across branches, enforces shared PR gates and policies, tracks team decisions, and generates compliance evidence.

Set up in 5 steps (no token to copy)

Step Run or do What happens
1 skylos cloud Opens skylos.dev in your browser to sign in and link a project, then scans locally and uploads findings (not your full repo).
2 Click the printed Open: link Opens your scan, gate verdict, and issue details at skylos.dev/dashboard.
3 skylos cicd init Writes .github/workflows/skylos.yml and prints the git commands and GitHub App link.
4 Install the GitHub App & merge the PR Enables verified CI uploads on every PR and push with no secret token to copy.
5 skylos setup Marks the Skylos check as required on your default branch so failing PRs cannot merge.

Laptop uploads (skylos cloud) are saved as report only and never block merges; only verified CI scans block PRs and update the official project verdict.

Skylos Cloud components and how to use them

Component What it is for How to use it
Home & Projects One overview of every repository's gate status, branches, and scan history. Sign in at skylos.dev, add repos or run skylos cloud, then open any project tab (Overview, Issues, Pull requests, Scans).
Pull Requests & Quality Gate Block failing PRs automatically and see exactly what caused a failure, including uncovered lines and duplicate blocks. Connect CI with skylos cicd init. On paid plans, Admins/Owners can approve a logged Merge anyway override when needed.
Issues & "Not Fixing" Track open issues across branches, assign owners, and manage approved exceptions with expiry dates. Open any issue to inspect its trace and copy a Fix brief, or click Not fixing this to record a reason and expiry date.
Supply Chain Monitor vulnerable dependencies, reachability, license rules, and install risks across repos. Upload scans via CI or skylos cloud and review flagged packages under Supply chain.
AI Oversight (Coding agents, AI app safety, Deep scans) Review coding-agent check runs, track LLM app guardrails, and run on-demand AI deep security scans. Upload skylos done / skylos defend runs from CI or launch a Deep scan from the dashboard (uses credits).
Policy & Governance Set workspace-wide or per-project blocking rules, new-issue limits, coverage and duplication limits, custom rules, and fix-by deadlines. Configure under Policy (Admins/Owners), import existing Sonar quality gates, and pull rules into your repo with skylos sync pull.
Fixes & Cleanup Turn findings into ready-to-paste agent fix briefs, automatic fix PRs, or weekly cleanup PRs. Copy a Fix brief from an issue, or enable automatic fix / weekly cleanup PRs in project settings.
Audit Evidence & Compliance Reports Keep an audit log of gate runs, overrides, and policy changes, and export compliance packets (e.g. SOC 2). View logs in Audit evidence, generate packets in Compliance reports (uses credits), or verify signed verdicts with skylos verify-verdict.
Settings, Integrations & Billing Manage team roles (Viewer/Member/Admin/Owner), SSO/2FA, tokens, alerts, plans, and credits. Connect GitHub, Slack, Discord, Jira, or webhooks under Settings; manage plans and credits under Billing (or check balance with skylos credits).

Cloud CLI commands: skylos cloud, skylos login, skylos whoami, skylos project, skylos sync, skylos upload --retry, skylos credits.

Full walkthrough: Skylos Cloud User Guide.


Language Support

Language Dead code Security Quality
Python Yes Yes Yes
TypeScript / JavaScript Yes Yes Yes
Java Yes Yes Yes
Go Yes Partial Partial
PHP Yes Yes No
Rust Experimental Partial Partial
Ruby Partial Partial No
Dart Yes Partial No
C# Partial Partial Partial
C++ Partial Partial No
Kotlin Partial Partial No
Swift Partial Partial No
Shell No Partial No
PostgreSQL Unused CTE chains and unreachable CASE arms Routine search paths, grants, login roles Query filters, counts, index migrations, foreign keys
  • Python has the deepest coverage.
  • Go uses the bundled skylos-go engine (included in Linux, macOS 12+, and Windows wheels; elsewhere skylos doctor prints the build command).
  • PostgreSQL .sql checks need pip install "skylos[postgres]" and --quality --danger (see PostgreSQL guide and benchmark).
  • Dart needs pip install "skylos[dart]".
  • Rust dead-code checks are experimental (skylos . --confidence 40); Rust security checks (--danger) trace SQL, shell, path, HTML, SSRF, TLS, secrets, and crypto flows (see Rust coverage benchmark).

Full matrix and per-language limits: Language Support.


Integrations

Integration What it does
GitHub Action Pull-request gate and optional container-image gate
GitLab, Bitbucket, Azure, Jenkins, CircleCI Pull-request gate for other CI platforms
Agent hooks Real-time checks for Claude Code, Codex, and Cursor
MCP server Exposes Skylos scans as tools for AI assistants
VS Code extension Inline findings in your editor
Skylos Cloud Optional team dashboard, shared gates, policies, and compliance reports

Install options

pip install skylos              # core checks
pip install "skylos[llm]"       # optional LLM review commands
pip install "skylos[all]"       # every optional extra

Or run via Docker:

docker run --rm -v "$PWD":/work -w /work ghcr.io/duriantaco/skylos:latest . -a

More extras (verdict, dart, postgres) and source installs: Installation.


What leaves your machine

  • Nothing goes to Skylos Cloud unless you run skylos cloud or pass --upload. A saved login never uploads automatically, and there are no analytics.
  • Dependency checks query OSV.dev and public package registries with package names and versions only — never source code.
  • Optional LLM commands send code only to the model provider you configure.

Full list of network calls and how to turn them off: Privacy and network.


Results

21 Skylos-assisted dead-code cleanup PRs have been merged into 19 open-source repositories, including Black, NetworkX, Optuna, mitmproxy, and pypdf. See Real-World Results and BENCHMARK.md.


FAQ

Does Skylos replace Semgrep, CodeQL, Bandit, or Vulture? No — it runs alongside them, adding coding-agent guardrails, framework-aware dead code, and one unified gate across security, secrets, dependencies, and quality.

Does it need an LLM or account? No. All core checks run locally with no model and no account. LLM review (skylos[llm]) and Skylos Cloud are optional.

Is it free? The CLI is free and open source (Apache-2.0). Skylos Cloud has a free tier and paid plans; see pricing.

Can I scan only what my branch changed? Yes: skylos . -a --diff origin/main. Removed security controls (like a deleted auth decorator) are still caught.

What about dynamically called code? Use inline ignores, a baseline, or --trace to record what runs. See smart tracing and the full FAQ.


Documentation

Browse every guide grouped by topic in Docs & Guides, or jump straight to:


Contributing

License

Apache License 2.0. See LICENSE.

About

Open source local-first PR scanner that finds dead code, security bugs, secrets, quality regressions, and AI-code mistakes before merge. For first timers refer to https://duriantaco.github.io/skylos/repo-map/

Topics

Resources

Code of conduct

Contributing

Security policy

Accessibility

Stars

960 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages