Skip to main content

skeptic

The independent check on AI-generated Python. Don't trust AI code — verify it.

Your AI wrote a function in two minutes. It looks right. It passes the happy-path test. skeptic finds the input where it quietly does the wrong thing — and hands you the exact line to reproduce it.

We don't ask an LLM "does this look right?" (that's the same blind spot that wrote the bug). We take a function's own stated contract — its name, type hints, and docstring — and use property-based testing to execute it against hundreds of adversarial inputs, surfacing where its real behavior breaks its own promises. Proof, not vibes.


Install

pipx install skepticode     # or:  pip install skepticode

Installs as skepticode, runs as the skeptic command. (The bare name skeptic on PyPI belongs to an unrelated, abandoned 2020 package.)

From source (this repo):

cd product
pip install -e .            # add [dev] for the test suite, [llm] for semantic checks

Use

skeptic check path/to/file.py
skeptic check path/to/file.py --function my_function

Example:

$ skeptic check examples/demo.py

=== median() ===
  intent: Return the median value of a list of numbers.
  !!  likely bug [no_unexpected_crash] confidence=0.80
      raises IndexError: list index out of range
      reproduce with: median(nums=[])

=== discount_price() ===
  intent: Apply a percentage discount to a price.
  OK  no silent bugs found (checks passed with high confidence)

Exit code is 1 when findings exist, so it drops straight into pre-commit or CI.

How it works

  1. Read the contract — infer intent from the function's name, type hints, docstring.
  2. Cross-examine — Hypothesis fires hundreds of adversarial inputs (empty, zero, negative, huge, unicode) and runs the code.
  3. Produce the exhibit — when the code breaks its contract, shrink the failure to the smallest input that triggers it and report a one-line repro.

What it catches today

  • Crash-family bugsZeroDivisionError, IndexError, KeyError, … on valid typed inputs (the empty list, the zero, the missing key).
  • Contract violations — returning None when the signature promises a real value.

Precision is the priority: on a 20-function benchmark it caught 8/10 silent bugs with 0/10 false positives.

Roadmap

  • Semantic ("almost right") bugs — wrong formulas, off-by-one logic — via an independent LLM oracle (pip install skeptic[llm], needs ANTHROPIC_API_KEY).
  • Editor (VS Code) and GitHub pull-request integrations.
  • Beyond pure functions: stateful and I/O code.

Develop

pip install -e .[dev]
pytest                 # unit tests
python eval/run_eval.py    # detection + false-positive rates on the benchmark

Design notes

  • The LLM never executes model-written code. It only selects/parameterizes checks from a fixed, safe catalog — immune to prompt-injected code execution.
  • Scope is pure functions for now (clear inputs → outputs), where precision is highest.

Working title & early pricing. Python first; more languages to follow.

Download files

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

Source Distribution

skepticode-0.1.0.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

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

skepticode-0.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file skepticode-0.1.0.tar.gz.

File metadata

  • Download URL: skepticode-0.1.0.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for skepticode-0.1.0.tar.gz
Algorithm Hash digest
SHA256 283a49d65c357fc5d091d172323a68ce2c0fb4dfa0e1636bdeb685fc0c7fc3d4
MD5 723e960a8557ce645859bd850e8130a2
BLAKE2b-256 a8174e423f86ccc12b498c3a3cf82dcba48bd5bf6b588a840b289d84e6615a59

See more details on using hashes here.

File details

Details for the file skepticode-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: skepticode-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for skepticode-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f65b99acf9660e82bd81f7cb2bbf5d8c908c269b72309b8485d10f70d29c8883
MD5 ee5c33d1fbcdab3e6d3fa5cadba5ff88
BLAKE2b-256 a229f234cde27d0b9cda45d9168f6ef1c182475a27f8e3b7b2d4b0573df83a91

See more details on using hashes here.

Supported by

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