Skip to content
Skills Library
Programming · Analysis

large-classes

/large-classes

Find the largest / longest classes in a codebase, ranked by line count, using ast-grep. Use when hunting for god classes or refactor candidates. Returns a small ranked table, not source.

Repository
sniff ↗
Licence
MIT
Last repository change
06.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 06.08.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Find the largest / longest classes in a codebase, ranked by line count, using ast-grep. Use when hunting for god classes or refactor candidates. Returns a small ranked table, not source.

Original author description

Find the largest / longest classes in a codebase, ranked by line count, using ast-grep. Use when hunting for god classes or refactor candidates. Returns a small ranked table, not source.

How it works

  1. Why this exists
  2. Usage
  3. Caveats
Original SKILL.md headings · 39 lines, 281 words
SKILL.md preview
---
name: large-classes
description: >-
  Find the largest / longest classes in a codebase, ranked by line count, using ast-grep. Use when hunting for god classes or refactor candidates. Returns a small ranked table, not source.
---

# Largest classes by line count

Largest classes by line count

## Why this exists

The naive way to answer this is to read files or dump AST JSON into the
conversation, both of which burn thousands of tokens. This skill runs all of
that through the installed sniff CLI: it runs `ast-grep`, parses the JSON internally, folds
nested matches into their parent, and prints a small ranked table. You only ever
see the table. Never pipe raw `ast-grep --json` output into your own context to
re-rank it by hand.

## Usage

Run the detector through the installed sniff CLI:

1. If `sniff version` fails: `uv tool install sniff-smells` (and `uv tool install ast-grep-cli` if `ast-grep` is missing).
2. Run: `sniff --only large-classes DIR [--top N] [--lang LANG]
   [--include-tests]`
3. Report the table; do not paste raw file contents.

**Print the entire table verbatim.** It IS the answer. Do NOT replace it with a
summary or describe it in prose; the user wants every row. You may add ONE
optional takeaway line after the table, but the full table must appear first and
in full. Do not re-read listed files unless the user then asks you to actually
act on one.

## Caveats

- Ranked by physical **line span**, not a complexity metric. A long match is a
  *candidate* worth looking at, not a verdict.
- Nested matches are folded into their parent so the same code is not counted twice.
- Languages covered: typescript, tsx, javascript, python. Another language is reported
  as out of scope rather than as zero classes; `sniff --list` shows every detector's coverage.
- Names are best-effort from the definition's first line; the `LOCATION` column is
  authoritative.

Versions

The database has no other skills named large-classes.

Database snapshot: 13.11.2026 · package version 052381e6d9eb (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100largest-methods
    Find the largest / longest methods or functions in a codebase, ranked by line count, using ast-grep structural matching. Use whenever the user wants to know which functions are too long, asks "what's the biggest method", hunts for refactor candidates, wants a complexity/length…
  • 100largest-files
    Find the largest / longest source files in a codebase, ranked by non-blank line count. Use when the user wants to know which files are too big, hunts for files to split up, asks "what's the biggest file", wants a size hotspot list, or looks for god files / split candidates.…
  • 100ast-grep
    Code search, analysis, and refactoring using ast-grep (sg). Use for AST-based code modifications, structural search, and linting.
  • 100ast-grep
    Write and debug ast-grep rules for structural code search and rewrite. Use when tasks require AST-aware matching (not plain text), such as finding specific syntax shapes, relational patterns (inside/has), composite logic (all/any/not), or precise code refactors across a codebase.
  • 95ast-grep-search
    Find and replace code patterns structurally with ast-grep. Use when matching code by AST structure, finding functions with specific signatures, or detecting anti-patterns regex cannot match.
  • 95ast-grep
    Use when asked to run AST-based structural search, lint, or rewrite of code when regex is too fragile. Not for remote, credential, publish, deploy, or irreversible changes.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.