Skip to main content

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.

side_by_side_example

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


Download files

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

Source Distribution

skeletonpy-1.0.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

skeletonpy-1.0.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

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

Hashes for skeletonpy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 71d80d86ef7755ad99bea225998809e6adbf726cfabd9d3e3f12a6ff509a586f
MD5 a3518c38456cd7a6ea682afe7c170701
BLAKE2b-256 46af8d762bf6b038ff7fe80e9f33163a9b49acb5be575aa15a447fe8d344d436

See more details on using hashes here.

Provenance

The following attestation bundles were made for skeletonpy-1.0.0.tar.gz:

Publisher: publish.yml on Premik/skeletonpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for skeletonpy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57713ce56c169bc1c02d44811b0a9e1c256361fd2e641d69678ec3c442e962e8
MD5 0ba681fafc1ee9e2ecbe53bb005ac5a1
BLAKE2b-256 66bb3f780dce5bd4586a9fc1ea398e3a7c936db86f1ac438c4ac54f208725480

See more details on using hashes here.

Provenance

The following attestation bundles were made for skeletonpy-1.0.0-py3-none-any.whl:

Publisher: publish.yml on Premik/skeletonpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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