Skip to main content

Token-saving Java file reader for Claude Code. Summarizes Java files compactly using tree-sitter, saving 70-80% of input tokens.

Project description

jskim

Token-saving Java file reader for Claude Code, optimized for Spring Boot. Summarizes Java files compactly using tree-sitter, saving 70-80% of input tokens compared to reading files directly.

A human counted the tokens. An AI counted the getters. Both decided life's too short.

Installation

pip install jskim

Requires Python 3.10+.

Usage

jskim auto-detects the mode based on whether you pass a file or directory.

Summarize a Java file

jskim <file.java>
jskim <file.java> --grep <pattern>        # filter methods by name/signature
jskim <file.java> --annotation <@Ann>     # filter methods by annotation
jskim A.java B.java C.java                # multiple files

Project map

Generates a compact map of all Java files in a directory: packages, classes, annotations, field/method counts, Lombok usage, enum constants.

jskim <src_dir>
jskim <src_dir> --deps                 # import-based dependencies
jskim <src_dir> --endpoints             # REST endpoint map
jskim <src_dir> --beans                 # Spring bean DI graph + @Bean producers + config properties
jskim <src_dir> --package <prefix>      # filter by package
jskim <src_dir> --annotation <@Ann>     # filter by class annotation
jskim <src_dir> --extends <ClassName>   # filter by superclass
jskim <src_dir> --implements <Name>     # filter by implemented interface

Spring Boot flags:

  • --endpoints — lists all REST endpoints: HTTP method, full path (base + method), handler, line number
  • --beans — shows bean DI wiring (via @Autowired and @RequiredArgsConstructor + final fields), @Bean factory method producers, and @ConfigurationProperties with prefix + field details
  • --implements — filter classes by implemented interface name

Extract methods

jskim <file.java> --list                          # list all methods
jskim <file.java> <method_name>                    # extract one method
jskim <file.java> <method1> <method2> <method3>    # extract multiple

Usage as a Claude Code Skill

This project is designed to be used as a Claude Code skill. The SKILL.md file configures the skill behavior, auto-triggering when working with Java files.

Install by adding the skill directory to your Claude Code configuration. Once installed, invoke with /jskim:

/jskim <file.java>              # summarize a file
/jskim <src_dir>                # project map
/jskim <file.java> <method>     # extract a method

Workflow

  1. Explorejskim src/ to understand project structure
  2. Narrowjskim src/ --package com.example.billing to focus on a package
  3. Spring contextjskim src/ --endpoints --beans to see REST API + DI wiring
  4. Understandjskim File.java to see class structure
  5. Filterjskim File.java --grep billing for large classes
  6. Focusjskim File.java methodA methodB to read specific methods
  7. Edit — Use Read with offset/limit on only the lines that matter

Dependencies

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

jskim-0.1.0.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

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

jskim-0.1.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jskim-0.1.0.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jskim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f3f62a034bcc34effce7fa6bc1a59eb874637c7e5a6ea00560cad5be5c821393
MD5 a01d01ceaed938e37514c85cb1d113c9
BLAKE2b-256 fa8a2c1fdc41a7b6ae8a2787b1dce69f8545e4510748f8ef8852b729329d5172

See more details on using hashes here.

Provenance

The following attestation bundles were made for jskim-0.1.0.tar.gz:

Publisher: publish.yml on garvit-joshi/jskim

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

File details

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

File metadata

  • Download URL: jskim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jskim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bbc0896c17ecb095bda6151bccf99e8588c403d6ea5f6aedaf85905cbd431f01
MD5 54517e4d666544deb8a5525cf3c4ba86
BLAKE2b-256 f522f0f283b5213d19fd65ae11a0c89d6c1a7848ecaea6ff0a4f61908a3795f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for jskim-0.1.0-py3-none-any.whl:

Publisher: publish.yml on garvit-joshi/jskim

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