No project description provided
Project description
SkeletonPy
SkeletonPy is a Python utility for code analysis and summarization. It parses Python source code to generate a compact overview, which is particularly useful for reducing the context size when working with Large Language Models (LLMs). By providing a summarized version of the code, it helps improve the performance of AI-assisted coding and reduces token usage.
Motivation
SkeletonPy is designed as a fast, pure code-driven alternative to complex local indexers (like those used in Continue or Cursor) for developers who want a lightweight, zero-overhead solution. It serves as an companion for Agentic Frameworks (by providing them with a highly accurate map of your Python repository.
Why use SkeletonPy over full-context stuffing or maintaining local indexes?
- Zero Overhead Code Mapping: Code changes frequently during development. Instead of maintaining complex embeddings, local vector databases, or dealing with expensive re-indexing processes, SkeletonPy runs instantly and entirely locally without LLMs.
- Focused Context: Pumping entire repositories into the prompt window often leads to the "lost in the middle" phenomenon, where models overlook pieces of the context. A concise skeleton limits irrelevant information, which helps smaller local models and large models alike focus on what actually matters.
- Cost and Speed: Passing a compact skeleton instead of full source files means significantly fewer input tokens. This directly translates to lower API costs and faster responses.
- Perfect for Agentic Workflows: The generated summary contains original file names and precise line numbers down to class-level resolution.
Quick Start
From your project's root directory, run skeletonpy with the path to your source code (src):
uvx skeletonpy src
This will scan all Python files in the src directory and create a skeleton.txt file inside it. You can then append the content of this file to your LLM prompt.
Installation
You can install skeletonpy from PyPI using your favorite package manager like pip or uv.
pip install skeletonpy
uv pip install skeletonpy
Alternatively, you can run it directly without a permanent installation:
pipx run skeletonpy -- --help
uvx skeletonpy --help
Once installed, you can invoke the script:
skeletonpy --help
Usage
Run skeletonpy with the path to your source directory/directories. You can use include and exclude patterns to filter the files. The patterns are regular expressions.
For example, to process the src directory, including all Python files but excluding test files, and save the output to skeleton.txt:
skeletonpy src --exclude "_test\.py" -o main_src.txt
This will generate a main_src.txt file. If you provide an absolute or relative path as output, it will be respected.
See the examples folder for more.
Project details
Release history Release notifications | RSS feed
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 skeletonpy-1.0.0.tar.gz.
File metadata
- Download URL: skeletonpy-1.0.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71d80d86ef7755ad99bea225998809e6adbf726cfabd9d3e3f12a6ff509a586f
|
|
| MD5 |
a3518c38456cd7a6ea682afe7c170701
|
|
| BLAKE2b-256 |
46af8d762bf6b038ff7fe80e9f33163a9b49acb5be575aa15a447fe8d344d436
|
Provenance
The following attestation bundles were made for skeletonpy-1.0.0.tar.gz:
Publisher:
publish.yml on Premik/skeletonpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skeletonpy-1.0.0.tar.gz -
Subject digest:
71d80d86ef7755ad99bea225998809e6adbf726cfabd9d3e3f12a6ff509a586f - Sigstore transparency entry: 1133794054
- Sigstore integration time:
-
Permalink:
Premik/skeletonpy@17c1edc851804d90e1673de53622fd466c7c04a9 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Premik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@17c1edc851804d90e1673de53622fd466c7c04a9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file skeletonpy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: skeletonpy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57713ce56c169bc1c02d44811b0a9e1c256361fd2e641d69678ec3c442e962e8
|
|
| MD5 |
0ba681fafc1ee9e2ecbe53bb005ac5a1
|
|
| BLAKE2b-256 |
66bb3f780dce5bd4586a9fc1ea398e3a7c936db86f1ac438c4ac54f208725480
|
Provenance
The following attestation bundles were made for skeletonpy-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on Premik/skeletonpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
skeletonpy-1.0.0-py3-none-any.whl -
Subject digest:
57713ce56c169bc1c02d44811b0a9e1c256361fd2e641d69678ec3c442e962e8 - Sigstore transparency entry: 1133794127
- Sigstore integration time:
-
Permalink:
Premik/skeletonpy@17c1edc851804d90e1673de53622fd466c7c04a9 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/Premik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@17c1edc851804d90e1673de53622fd466c7c04a9 -
Trigger Event:
release
-
Statement type: