Skip to main content

StableStack

Catch the subtle bugs AI assistants introduce.

A lightweight linter that catches issues traditional linters miss — non-determinism that breaks LLM caching, silent exception swallowing, async mistakes, SSR pitfalls, and more. 146 rules across 23 categories, with first-class support for Python, JavaScript/TypeScript, and C# (including Unity).

Marketing site: stablestack.ai

Install

# Python (recommended)
pip install stablestack

# Node.js — thin wrapper around the pip package
npx stablestack

After upgrading, pin the version — pip caches aggressively:

pip install stablestack==0.3.26

Quick Start

# Check your source directory
stablestack src/

# Check specific files
stablestack app.py utils.py

# CI mode (exit 1 on errors)
stablestack src/ --ci

# JSON output
stablestack src/ --format json > results.json

# Only run critical rules
stablestack src/ --tier critical

# List every available rule
stablestack --list-rules

# Explain a specific rule
stablestack explain DET001

Claude Code Integration

StableStack ships opt-in Claude Code slash commands. Run once per repo:

stablestack init                 # pyproject.toml + .stablestackignore + /check, /fix-production slash commands
stablestack init --minimal       # just pyproject.toml
stablestack init --no-commands   # skip the slash commands

After init, inside Claude Code you can use:

  • /check — run StableStack and fix findings
  • /fix-production — detect your CI/CD platform, monitor builds, and keep fixing until production is green

StableStack never writes files to your repo unless you run init explicitly.

Language Support

Language Extensions Notes
Python .py Primary language, most checkers
TypeScript / JavaScript .ts, .tsx, .js, .jsx, .vue Frontend + backend (Next.js, tRPC, Prisma, React)
C# .cs .NET and Unity — includes 3 Unity-specific checkers (async void, Debug.Log in production, expensive lookups in Update loops)
Go, Rust, Ruby .go, .rs, .rb Partial coverage (hardcoded secrets, exception swallowing)

What It Catches

Full reference: stablestack --list-rules

Category Prefix Rules Example concerns
Quality QUAL 19 Exception swallowing, mutable defaults, magic numbers, complexity, print statements
Security SEC 16 Hardcoded secrets, SQL injection, eval(), XSS, CSRF, email header injection
Type Safety TYPE 15 Weak typing, any, env non-null assertions, unsafe JSON parsing
Frontend FRONT 13 SSR-unsafe window, inline JSX handlers, stale time, unbounded AI output
Structure STRUCT 10 Multiple classes per file, sys.path hacks, mixed frontend/backend code
Testing TEST 10 Skipped tests, Playwright timing issues, duplicate test helpers
Determinism DET 9 Unsorted iteration, datetime.now(), random without seed, uncached LLM calls
Project PROJ 8 Missing CLAUDE.md, missing pyright config, beta dependencies, low test coverage
API API 7 Unhandled errors, inconsistent naming, missing Content-Type, untyped responses
Performance PERF 7 N+1 queries, render-blocking fonts, uninstrumented LLM calls
Memory MEM 4 Unbounded queries, in-process accumulators, global singletons
Async ASYNC 4 Missing await, blocking calls in async, fire-and-forget, silent .catch()
tRPC TRPC 4 Procedures without input validation, inline Zod schemas
Datetime DATE 3 Naive datetimes, DB timezone mismatches
C# CS 3 async void, Debug.Log in production, expensive lookups in Unity Update
Concurrency CONC 2 Check-then-act races, non-atomic read/write
Kubernetes KUBE 2 Local filesystem storage, missing SSL redirect
Migrations MIG 2 Alembic revision ids over VARCHAR(32), deploy scripts that mask migration failures
Rate Limiting RATE 2 Missing rate limits, in-memory rate limiter
Schema SCHEMA 2 Pydantic nullability, Pydantic/SQLAlchemy field mismatches
Session SESS 2 DB session passed to background tasks, thread safety
Accessibility A11Y 1 Button contrast
Imports IMPORT 1 Imports shadowing builtins

Free vs. Paid Tiers

  • Free (24 rules) — always available, no license required. Covers critical security, schema, project setup, quality, structure, async, API, and C# checkers.
  • Paid (122 rules) — unlocked with stablestack activate <license-key>. Buy a license at stablestack.ai.

Pricing and features: stablestack.ai/pricing.

Example Output

src/cache.py

  ⚠ Line 42: Looping through 'config.items()' without sorting. This may produce different results on different runs.

    Problem:
      for key, value in config.items():

    Fix:
      for key, value in sorted(config.items()):

    Why? Dictionary order isn't guaranteed to be the same every time your program runs.
    This can cause tests to pass sometimes and fail other times, and can break caching
    systems that depend on consistent output.

────────────────────────────────────────────────────────────
Found 1 warning in 1 file

Configuration

Configure StableStack in your pyproject.toml:

[tool.stablestack]
# Enable only specific rules (empty = all enabled)
enable = []

# Disable specific rules
disable = ["QUAL005", "QUAL006"]

# Path patterns
include = ["src/**/*.py"]
exclude = ["**/migrations/**", "**/test_*.py", "node_modules/**"]

# Override severity per rule
[tool.stablestack.rules.DET001]
severity = "info"

You can also add a .stablestackignore file (glob patterns, one per line) for paths the checker should skip.

CLI Options (essentials)

Usage: stablestack [OPTIONS] [PATHS]...

Options:
  -f, --format [text|json|claude]  Output format (default: text)
  -c, --config PATH                Path to pyproject.toml config
  --enable TEXT                    Comma-separated rule IDs to enable
  --disable TEXT                   Comma-separated rule IDs to disable
  --ci                             Exit 1 if any errors found
  -t, --tier [critical|recommended|optional|preference]
                                   Run ONLY rules from this tier
  -u, --up-to [critical|recommended|optional|preference]
                                   Run rules up to and including this tier
  --list-rules                     List all available rules and exit
  --stats                          Show codebase statistics
  --baseline PATH                  Only report issues not in baseline
  --generate-baseline              Generate a baseline file
  --fix                            Automatically fix issues where possible
  --dry-run                        Show what --fix would do
  -w, --watch                      Watch for changes and re-run
  --top INTEGER                    Show only the top N findings
  --help                           Show full help

Subcommands:
  stablestack init       Install Claude Code commands and config files
  stablestack explain    Explain a specific rule (e.g. `stablestack explain DET001`)
  stablestack activate   Activate a paid license key

Why StableStack?

AI coding assistants are fast, but they ship patterns traditional linters don't catch:

  • Non-determinism that breaks LLM caching and causes flaky tests
  • Hardcoded secrets that slip into git history before review
  • Silent exception swallowing that hides production bugs
  • Missing await on async calls that return without doing any work
  • SSR-unsafe code that crashes in Next.js production builds
  • Unity anti-patterns like GameObject.Find in Update() loops that kill frame rates
  • Weak types (any, Dict[str, Any]) that bypass IDE checking

StableStack focuses specifically on the shape of bugs AI assistants generate.

Repository Structure

Directory Description
/stablestack Core product — the Python CLI and analysis engine (published to PyPI)
/npm-package Thin Node.js wrapper that shells out to the Python CLI (npx stablestack)
/nuget-package Prototype dotnet tool wrapper for .NET / Unity developers (not yet published)
/site Marketing site at stablestack.ai (Next.js)
/infrastructure/license-api AWS Lambda API for license validation + anonymous telemetry (Terraform)

Development Setup

Running tests

cd stablestack
PYTHONPATH=src python -m pytest tests/ -v

Running the site locally

cd site
npm install
npm run dev

Secrets management

This project uses Doppler for secrets. Never commit .env files.

brew install dopplerhq/cli/doppler
doppler login --scope /path/to/vibecheck
doppler setup

# Run commands with secrets injected
doppler run -- stablestack src/

Ask a team member to add you to the CTS workspace in Doppler.

Contributing

See CONTRIBUTING.md.

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stablestack-0.3.27.tar.gz (314.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stablestack-0.3.27-py3-none-any.whl (237.1 kB view details)

Uploaded Python 3

File details

Details for the file stablestack-0.3.27.tar.gz.

File metadata

  • Download URL: stablestack-0.3.27.tar.gz
  • Upload date:
  • Size: 314.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for stablestack-0.3.27.tar.gz
Algorithm Hash digest
SHA256 b6d09d08b377fb8b64e5b9fb033eabd168aaf4bc129a413391f3fb1761006699
MD5 6df048aeba107ce1d7686311998cae2a
BLAKE2b-256 ae2072c746ae45cdf97d4b09ebd6b806fe89ae1e72539d2eff41b090ab44e8f3

See more details on using hashes here.

File details

Details for the file stablestack-0.3.27-py3-none-any.whl.

File metadata

  • Download URL: stablestack-0.3.27-py3-none-any.whl
  • Upload date:
  • Size: 237.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for stablestack-0.3.27-py3-none-any.whl
Algorithm Hash digest
SHA256 ddac7ec0a4558a4c299460ed45f038cccc8d76aa00beec9dbc11b959f01c55b5
MD5 f925973f28c33816cc54793bad3d104e
BLAKE2b-256 860b94ed82637088774ffa0efdc1f11cd371c4926c4ef63385aa37cb37c9aee4

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.30

2 files

0.3.29

2 files

0.3.28

2 files

This release

0.3.27 This release

2 files

0.3.26

2 files

0.3.25

2 files

0.3.24

2 files

0.3.23

2 files

0.3.22

2 files

0.3.21

2 files

0.3.20

2 files

0.3.19

2 files

0.3.18

2 files

0.3.17

2 files

0.3.16

2 files

0.3.15

2 files

0.3.14

2 files

0.3.13

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.8

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page