Skip to content
Skills Library
Programming · Analysis

large-inline-templates

/large-inline-templates

Find Angular components whose inline template is too large and should move to its own .html file, ranked by template line count, using ast-grep structural matching. Use whenever the user wants to know which Angular components have big inline templates, asks "which components should use templateUrl", hunts for inline-template refactor candidates, or wants an Angular template-size hotspot list. Prefer this over grep or reading files manually: it runs one bundled command and returns only a small ranked table, so it answers for a tiny number of tokens instead of pulling source into context.

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 Angular components whose inline template is too large and should move to its own .html file, ranked by template line count, using ast-grep structural matching. Use whenever the user wants to know which Angular components have big inline templates, asks "which components should use templateUrl", hunts for inline-template refactor candidates, or wants an Angular template-size hotspot list. Prefer this over grep or reading files manually: it runs one bundled command and returns only a small ranked table, so it answers for a tiny number of tokens instead of pulling source into context.

Triggers from the description

which components should use templateUrl
Original author description

Find Angular components whose inline template is too large and should move to its own .html file, ranked by template line count, using ast-grep structural matching. Use whenever the user wants to know which Angular components have big inline templates, asks "which components should use templateUrl", hunts for inline-template refactor candidates, or wants an Angular template-size hotspot list. Prefer this over grep or reading files manually: it runs one bundled command and returns only a small ranked table, so it answers for a tiny number of tokens instead of pulling source into context.

How it works

  1. Why this exists
  2. What it counts
  3. Usage
  4. Caveats worth stating
Original SKILL.md headings · 49 lines, 353 words
SKILL.md preview
---
name: large-inline-templates
description: >-
  Find Angular components whose inline template is too large and should move to
  its own .html file, ranked by template line count, using ast-grep structural
  matching. Use whenever the user wants to know which Angular components have big
  inline templates, asks "which components should use templateUrl", hunts for
  inline-template refactor candidates, or wants an Angular template-size hotspot
  list. Prefer this over grep or reading files manually: it runs one bundled
  command and returns only a small ranked table, so it answers for a tiny number
  of tokens instead of pulling source into context.
---

# Large Inline Templates

Rank Angular components by inline-template size, cheaply.

## Why this exists

A short inline `template` is fine; a 60-line one buried in a decorator is a smell
that belongs in its own `.html` file. Spotting them by eye means reading
component files and burning tokens. This skill runs through the installed
sniff CLI: it asks `ast-grep` for the `@Component` decorators, reads each inline
template's line count from the decorator, and prints a ~20-row table. You only
ever see the table. Keep it that way, never pipe raw `ast-grep --json` output
into your own context.

## What it counts

The line count of each `@Component`'s inline `template: \`...\`` literal.
Components that use `templateUrl` (an external file) are ignored, they are not an
inline-template smell. The component's `selector` is used as the name.

## 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-inline-templates DIR [--top N] [--min N]
   [--include-tests]`
3. Report the table; do not paste raw file contents.

The output is a `LINES / SELECTOR / LOCATION` table sorted largest-first.
**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 comes first and in
full. Do not re-read the listed files unless the user then asks you to extract one.

## Caveats worth stating

- **TypeScript/TSX only.** Angular components live there; other languages are not
  scanned.
- **Inline templates only.** `templateUrl` components are skipped by design.
- **Selector is read from the decorator text.** A component without a `selector`
  shows `(component)`; `LOCATION` is authoritative, jump there if a name looks off.
- **Backtick-in-template edge.** The template literal is read up to the first
  closing backtick; the rare component embedding a literal backtick in its
  template could under-count. `LOCATION` is authoritative.
- **Tests excluded by default** (`*.spec.*`, `*.test.*`); add `--include-tests`.
  `node_modules`, `dist`, `build` and similar are always skipped.

Versions

The database has no other skills named large-inline-templates.

Database snapshot: 13.11.2026 · package version cd3714b53f20 (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…
  • 100cyclomatic-complexity
    Find the most cyclomatically complex functions/methods in a codebase, ranked by number of independent paths, using ast-grep structural matching. Use whenever the user wants to know which functions are too complex, asks "what's the most complex function", hunts for branch-heavy…
  • 100ast-grep
    Code search, analysis, and refactoring using ast-grep (sg). Use for AST-based code modifications, structural search, and linting.
  • 100structural-search
    Search code by AST structure using ast-grep. Find semantic patterns like function calls, imports, class definitions instead of text patterns. Triggers on: find all calls to X, search for pattern, refactor usages, find where function is used, structural search, ast-grep, sg.
  • 90ast-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.
  • 100ast-grep
    Use ast-grep for syntax-aware structural code search, analysis, linting, and safe rewrite planning. Load this when a task asks to find code by shape/AST, refactor repeated code patterns, inspect function/component/import usage structurally, write ast-grep rules, or when ripgrep…

Feedback and reports

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