Replay and visualise the living architecture of a Python application.
Project description
skeleton-replay
Skeleton is a developer-understanding tool, not a profiler. It runs a Python script under a lightweight runtime tracer and turns the observed execution into an interactive, replayable architecture map.
Core promise:
Replay and visualise the living architecture of a Python application.
Package naming:
Product name: Skeleton
PyPI package: skeleton-replay
Import name: skeleton_replay
CLI command: skeleton
Module entry: python -m skeleton_replay
What Skeleton Generates
Skeleton produces runtime evidence in four complementary forms:
| Artifact | Purpose |
|---|---|
trace.jsonl |
Ordered public call and return events. |
snapshot.json |
Graph-shaped modules, classes, functions, instances, and edges. |
workflow.md |
LLM-readable workflow evidence with stable event and node references. |
report.html |
Interactive visual replay for humans. |
By default, artifacts are written to:
~/.skeleton/<application-name>/
trace.jsonl
snapshot.json
workflow.md
report.html
Install
pip install skeleton-replay
CLI Quickstart
skeleton run path/to/script.py
The module entrypoint is also available:
python -m skeleton_replay run path/to/script.py
Options:
--project-root PATH Root used to decide which files are project-local.
--out-dir PATH Output directory. Defaults to ~/.skeleton/<application-name>.
--include PATTERN Only trace matching relative paths or module names.
--exclude PATTERN Exclude matching relative paths or module names.
--max-events N Stop writing trace events after N events.
--no-html Skip report.html generation and opening.
--no-open Do not open report.html after generation.
Python API
Use TraceSession when you want to generate Skeleton artifacts from Python
without shelling out to the CLI:
from pathlib import Path
from skeleton_replay import TraceSession
result = TraceSession(
project_root=Path("path/to/project"),
out_dir=Path("path/to/project/.skeleton"),
).run_script("path/to/project/app.py")
print(result.report_path)
print(result.workflow_path)
The Python API writes the same trace.jsonl, snapshot.json, workflow.md,
and optional report.html artifacts as the CLI. Unlike the CLI, it does not
open the HTML report by default; pass open_report=True when that is wanted.
What Gets Traced
Skeleton uses sys.setprofile and records Python call and return events
when all of these are true:
- The frame's file is under the project root.
- The file is not in ignored local infrastructure such as
.venv,.git, or.skeleton. - The callable name is public. Names beginning with
_are ignored.
The trace identifies the module, class where practical, function or method, caller, callee, instance identity where practical, call depth, event order, timestamp, safe argument summaries, and safe return summaries.
Safety Model
Skeleton records summaries, not full object contents.
- Primitive values are summarized and long strings are truncated.
- Containers show type, length, and a small preview.
- Objects show class name and run-local object identity only.
- Likely secret fields are redacted by name, including
password,token,secret,key,auth, andcredential.
Scope
The first version is intentionally non-invasive. You do not add decorators or modify application code. The runner wraps an existing script, traces only project-local public functions and methods by default, and records safe summaries of arguments and return values.
Skeleton currently runs a script path. That script can drive CLI workflows, service objects, batch jobs, web-app internals, or library calls. The application being traced does not need to be a CLI application, but v0 needs a script entrypoint that exercises the behavior.
Links
- Repository: https://github.com/ml-affairs/skeleton
- Issues: https://github.com/ml-affairs/skeleton/issues
- Python API docs: https://github.com/ml-affairs/skeleton/blob/main/docs/api/python-api.md
- Design principles: https://github.com/ml-affairs/skeleton/blob/main/docs/design/software-design-principles.md
- Runtime introspection model: https://github.com/ml-affairs/skeleton/blob/main/docs/design/runtime-introspection.md
- Changelog: https://github.com/ml-affairs/skeleton/blob/main/CHANGELOG.md
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skeleton_replay-0.1.2.tar.gz.
File metadata
- Download URL: skeleton_replay-0.1.2.tar.gz
- Upload date:
- Size: 31.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
760d0da286c8f5397811acf8e53911afc986a0a8f3c0f43e91fd2fb69e444aef
|
|
| MD5 |
0633e000a63194ceeaf87f073af9c6aa
|
|
| BLAKE2b-256 |
57b86d6715085c3b28235ecfc642510bdac28a68ab18418c23ac8b9429e371dd
|
Provenance
The following attestation bundles were made for skeleton_replay-0.1.2.tar.gz:
Publisher:
publish.yml on ml-affairs/skeleton
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skeleton_replay-0.1.2.tar.gz -
Subject digest:
760d0da286c8f5397811acf8e53911afc986a0a8f3c0f43e91fd2fb69e444aef - Sigstore transparency entry: 2026547248
- Sigstore integration time:
-
Permalink:
ml-affairs/skeleton@4c8bc2e0e74292a0768de6e62b3f390b2d5542c3 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ml-affairs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4c8bc2e0e74292a0768de6e62b3f390b2d5542c3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file skeleton_replay-0.1.2-py3-none-any.whl.
File metadata
- Download URL: skeleton_replay-0.1.2-py3-none-any.whl
- Upload date:
- Size: 39.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65fec90666386ed4ff2f249a1fa0bea1b3ee00a84d44a115496807b82a0bb6b8
|
|
| MD5 |
9a049f7bd62d85143b1df9c3851d5d51
|
|
| BLAKE2b-256 |
e12ad4e9ef86c7d4906545d1689f7f792c15587d1b5557974ba8b2c5b10d9d24
|
Provenance
The following attestation bundles were made for skeleton_replay-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on ml-affairs/skeleton
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skeleton_replay-0.1.2-py3-none-any.whl -
Subject digest:
65fec90666386ed4ff2f249a1fa0bea1b3ee00a84d44a115496807b82a0bb6b8 - Sigstore transparency entry: 2026547438
- Sigstore integration time:
-
Permalink:
ml-affairs/skeleton@4c8bc2e0e74292a0768de6e62b3f390b2d5542c3 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ml-affairs
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4c8bc2e0e74292a0768de6e62b3f390b2d5542c3 -
Trigger Event:
release
-
Statement type: