Skip to main content

Autonomous testing agent for Claude Code — discovers, tests, diagnoses, and fixes your web app

Project description

Sharingan

The eye that sees all bugs.

Sharingan is an autonomous testing agent for Claude Code. It discovers what to test in your web application, generates and runs Playwright end-to-end tests, diagnoses whether failures are test bugs or application bugs, fixes the application code, and re-runs until everything passes.

One command: /sharingan


How It Works

Sharingan runs a 7-step autonomous loop:

DISCOVER → GENERATE → RUN → DIAGNOSE → FIX → LOOP → REPORT
    │          │        │        │         │      │       │
    │          │        │        │         │      │       └─ SHARINGAN_REPORT.md
    │          │        │        │         │      └─ Repeat steps 3-5
    │          │        │        │         └─ Edit app or test code
    │          │        │        └─ Test bug? or App bug?
    │          │        └─ Playwright with JSON reporter
    │          └─ Playwright test files
    └─ Scan routes, endpoints, forms
  1. Discover — Detects your framework (Next.js, React, FastAPI, Express, Django) and scans the codebase for routes, API endpoints, forms, and auth-protected pages.
  2. Generate — Creates Playwright e2e tests for auth flows, navigation, form validation, API endpoints, permission guards, and basic accessibility.
  3. Run — Executes all tests with JSON reporting and failure screenshots.
  4. Diagnose — For each failure, reads the test code and the application source to determine: is this a test bug (wrong selector, timing) or an application bug (missing route, broken logic)?
  5. Fix — Applies the fix to the correct file (test or app), with safety checks.
  6. Loop — Re-runs failing tests. Max 3 attempts per test before marking as "needs human review."
  7. Report — Generates SHARINGAN_REPORT.md with discovery stats, results table, bugs found, and items needing review.

Key Differentiator

Tool Finds test bugs Finds app bugs Auto-fixes app Framework-aware Ships as slash command
Playwright Agents Yes No No No No
Ralph Loop - - - No No
QA Skills - - No Partial Yes
Sharingan Yes Yes Yes Yes Yes

Sharingan doesn't just fix broken tests — it finds broken applications and fixes them too.

Quick Start

Install

pip install sharingan-autotest

Or with uv:

uv pip install sharingan-autotest-testing

Then initialize in your project:

cd your-project
sharingan init

This copies the slash commands into .claude/commands/.

Install Playwright

If you don't already have Playwright set up:

npm init playwright@latest
npx playwright install chromium

Use

In Claude Code, type:

/sharingan

That's it. Sharingan handles the rest.

Slash Commands

Command Description
/sharingan Full autonomous loop: discover, test, diagnose, fix, report
/sharingan-scan Discover routes only — outputs SHARINGAN_PLAN.md
/sharingan-test Generate and run tests only — no auto-fixing
/sharingan-fix Diagnose and fix failures from the last run
/sharingan-report Regenerate report from the last run

Supported Frameworks

Framework Detection Route Discovery
Next.js (App Router) package.jsonnext src/app/ directory structure
React (CRA/Vite) package.jsonreact (no next) <Route path="..."> in JSX
FastAPI requirements.txtfastapi @app.get/post(...) decorators
Express.js package.jsonexpress app.get/post(...) calls
Django manage.py + django in requirements path(...) in urls.py

Configuration

Sharingan works with zero configuration. To customize, create a sharingan.json in your project root:

{
  "base_url": "http://localhost:3000",
  "api_base_url": "http://localhost:8000",
  "max_fix_attempts": 3,
  "max_iterations": 5,
  "timeout_ms": 30000,
  "headless": true,
  "browser": "chromium"
}

CLI

sharingan init              # Install slash commands in current project
sharingan scan --dir .      # Scan project and print discovered routes
sharingan report --dir .    # Generate report from last test run

Sample App

The examples/sample-app/ directory contains a Next.js + FastAPI app with 3 intentional bugs for demo purposes:

  1. Signup form doesn't validate password confirmation
  2. Dashboard is accessible without authentication
  3. Create item API returns 500 on empty request body

Run Sharingan against it to see all three discovered and fixed.

Development

git clone https://github.com/ctoapplymatic/sharingan.git
cd sharingan
pip install -e ".[dev]"
pytest

Contributing

Contributions welcome! Please:

  1. Fork the repo
  2. Create a feature branch
  3. Write tests for new functionality
  4. Submit a PR

Why "Sharingan"?

Named after the Sharingan eye from Naruto. The Sharingan can see through illusions, copy techniques, and predict an opponent's next move. Like its namesake, this tool sees through the surface of your application to find hidden bugs, copies testing patterns, and anticipates where failures will occur.

License

MIT License. See LICENSE for details.


Built by Shruthi Krithika at Applymatic.

Project details


Download files

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

Source Distribution

sharingan_autotest-0.1.0.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

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

sharingan_autotest-0.1.0-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sharingan_autotest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4ad1694c0216143a4658c7f19a69cd829ac61668af5f05c3405460308113c08a
MD5 88c937d96f60c8f65b0c8cd9127fcb51
BLAKE2b-256 06642055a7e4afebbdd3a41b4b59b532e896e57ca26e6a9f8d0f6db595f4fdbb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sharingan_autotest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 79c1459261516347e1fd7042d546e405ed7997a6a3ffb91e434d3ad5330929d8
MD5 88cc76e6e883340a907f091318a98cba
BLAKE2b-256 30573fc491c13261a5156d3898eda356dba4d7567a23a6bb95041b1cd656e157

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