Getting Started
This guide covers the fastest path from installation to a useful local scan. Skylos works as a local CLI first; cloud upload, LLM review, and CI gates are optional layers you can add later.
Key Commands
pip install skylos
No account needed. Your code and findings stay on your machine.
| To | Run |
|---|---|
| Find dead code | skylos . |
| Run every check: security, secrets, dependencies, quality, AI-code mistakes | skylos . -a |
| Check only what your branch changed | skylos . -a --diff origin/main |
| Fail the build when the gate fails | skylos . --gate |
| Check the agent really finished (runs your tests) | skylos done --base main |
| Check every pull request in CI | skylos cicd init |
| Set up Claude Code and Codex in this repo | skylos setup |
skylos . -a stays local, except that it looks up package names online:
OSV.dev for known CVEs, and PyPI or npm for packages that don't exist.
Skylos Cloud, Step by Step
Optional. See every scan online and block pull requests that fail. Five steps, in this order, from your repository folder. No token to copy.
| Step | Run or do | What happens |
|---|---|---|
| 1. Upload your first scan | skylos cloud | Your browser opens skylos.dev. Sign in, then pick or create the project for this repo. Back in the terminal, Skylos scans with every check and uploads the findings (not your code). |
| 2. Open your results | Click the Open: link it prints | The scan in your dashboard: its gate result and every issue. Find it again later at skylos.dev/dashboard. |
| 3. Add the pull request check | skylos cicd init | Writes .github/workflows/skylos.yml and prints the next steps: the git commands that open a pull request with it, and the GitHub App link. |
| 4. Install the GitHub App, then merge | Open the GitHub App link it printed | Install the Skylos GitHub App on the repo before you merge that pull request. CI then uploads with its GitHub identity (OIDC), so there is no token or secret to add. |
| 5. Make the check required | skylos setup | Run it after the merge (it uses the GitHub CLI, gh). A pull request that fails the Skylos check can no longer merge. |
The end of step 1 looks like this:
✓ Scan saved · gate (not blocking): fail
Open: https://skylos.dev/dashboard/projects/<project>/scans/<scan>
Saved for review. Only verified CI scans block merges and update the project verdict.
Next: to block pull requests, run skylos cicd init and merge the workflow it writes.
A scan from your machine is saved for review but never blocks a merge; only CI
scans do. Upload again any time with skylos cloud. See Cloud Platform for what it sends.
The steps below go through each one in more detail.
The Skylos tutorial walks through eight checks we didn't find in other tools as of October 2026 (for example, risky pull requests that need a person's approval even when an AI reviewer approved, and agents that hard-code test answers), each with a one-minute demo you can paste.
Prerequisites
Before installing Skylos, ensure your environment meets the following requirements:
- Operating System: macOS, Linux, or Windows (WSL2 recommended).
- Python: Version 3.10 or newer.
- Package Manager:
piporuv.
Browser Support: Skylos is a CLI tool and does not require a web browser, although it can generate HTML reports that support Chrome, Edge, Firefox, and Safari.
Step 1: Installation
Skylos is distributed via PyPI. Install it globally or within your project's virtual environment.
- pip
- uv
pip install skylos
uv pip install skylos
To verify the installation, run:
skylos --version
Step 2: Run Your First Scan
Go to the repository root and scan it:
skylos .
This starts with dead code detection. To run the main local audit, including dead code, dangerous flows, secrets, quality, and dependency checks:
skylos . -a
Optional: Initialize Project Config
You do not need config for a first scan. Initialize Skylos when you want repository-owned thresholds, excludes, or gate policy.
- Navigate to your project folder.
- Run the initialization command:
skylos init
This will create (or append to) a pyproject.toml file with default settings:
[tool.skylos]
complexity = 10
nesting = 3
max_args = 5
Optional: Configure AI Access
Skylos does not require an LLM for core static analysis. Configure a provider only if you want agent review or remediation workflows.
Skylos checks for keys in the following priority:
- Environment Variables:
OPENAI_API_KEYorANTHROPIC_API_KEY. - System Keyring: Keys saved via previous interactive sessions.
- Interactive Prompt: You will be prompted to paste a key if none is found.
- Bash
- PowerShell
export OPENAI_API_KEY="sk-..."
$env:OPENAI_API_KEY="sk-..."
Step 3: Review Results
The CLI outputs findings as tables, grouped by category. Each table includes a legend explaining what the columns mean.
- Dead Code (default): Unused functions, imports, classes, and variables. Each finding has a Conf (confidence) score — higher means safer to remove.
- Security (
--danger): Vulnerabilities like SQL injection and command injection. Shows Issue, Severity, and the Symbol (function) where it occurs. Also reports committed agent hooks, unpinned MCP servers and risky package publish jobs (SKY-D365toSKY-D377); see Agent Configs And Publish Jobs. - Secrets (
--secrets): Hardcoded credentials. Shows the Provider (e.g. AWS, Stripe) and a masked Preview. - Quality (
--quality): Complexity, nesting, duplicate literals, and structural issues. Shows the measured value vs. the configured threshold (e.g.Complexity: 18 (max 10)). - AI Defects (
--ai-defects): Evidence-backed AI-code failure modes such as phantom references, hallucinated APIs, impossible dependency versions, and weakened assertions. JSON uses theai_defectsbucket and finding categoryai_defect; some rules keep historicalSKY-LorSKY-DIDs for compatibility, while new AI-defect-only rules useSKY-A. - SCA (
--sca): Known vulnerabilities in your dependencies. Shows the Package, Reachability, and the Fix version. Versions reported as malware areCRITICAL, and supply-chain checks flag dependency confusion, unpinned Git or URL sources and lockfile entries without integrity hashes. In a pull request (--diffor--diff-base), it also flags weakened install hardening, and--review-upgradescompares each upgraded npm or PyPI package with its previous release. See Supply Chain.
Reducing False Positives
If Skylos flags code you know is used (common with visitor patterns or dynamic dispatch), enable tracing:
skylos . --trace
This runs your test suite and records which functions were actually called, eliminating false positives from dynamic code.
See Smart Tracing for details.
Step 4: Add CI Or Cloud Later
Set up a pull request gate for your CI (GitHub Actions, GitLab CI, Jenkins, Bitbucket Pipelines, Azure Pipelines or CircleCI):
skylos cicd init
See CI/CD Integration for local gates, cloud uploads, GitHub OIDC, tokens, annotations, and branch protection.
Optional: Connect to Cloud
Track your results per branch on the Skylos Cloud dashboard for history tracking, team collaboration, and trend visualization.
skylos cloud
skylos cloud runs every check (-a), shows the findings, uploads them to
Skylos Cloud, then prints this branch's quality gate and one link to it. It sends findings,
not your repository.
On first run, the browser opens automatically — sign in with GitHub, pick a project, and you're done. No API keys to copy or config files to edit.
To run only some checks, name them, for example
skylos cloud --danger --secrets. See Cloud Platform for what
skylos cloud sends and prints.
Your first workspace gets a 14-day Workspace trial with 50 credits: no card, and nothing renews or charges you. Uploads never cost credits. See Billing & Credits.
See Authentication for CI/CD setup, OIDC, and advanced options.