lkshrk/useful-skills · Archived

loc-change-table

Count line changes in one folder and all subdirectories since a given date, grouped by git repository and file category. Use when the user asks for LOC changes, line changes, churn, diff stats, changed lines, or repo-by-category tables since a date.

First seen Jul 10, 2026

Installation

$ npx skills add lkshrk/useful-skills --skill loc-change-table

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from lkshrk/useful-skills.

npx skills add lkshrk/useful-skills

Browse all from lkshrk/useful-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

License LICENSE
Default branch main
Open issues 0
Status Archived

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,571 B
  • docs SUMMARY.md 273 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 27 installs

SKILL.md

LOC Change Table

Use this skill when the user wants a repo-by-category table of line changes under a folder since a date.

How to run

The bundled script is the single source of truth. Run it and present its output verbatim. Do not hand-compute counts, and do not substitute ad-hoc git log/git diff one-liners — they count differently and produce inconsistent results.

  1. Resolve the inputs:

- Folder: use the user's path, or the current working directory if none is given. - Date: required. If the user did not give one, ask. Accept any git-compatible form, such as 2026-06-01, last Friday, or 2 weeks ago.

  1. Run:

``bash python3 scripts/locchangetable.py <folder> --since <date> ``

  1. Present the Markdown table the script prints, then relay its trailing notes (hidden repos, empty-tree warnings, skipped repos). Do not drop the notes — the empty-tree warning is how a wrong date is caught.

Flags

  • --include-uncommitted — also count working-tree changes (only when the user asks for uncommitted work).
  • --include-binary — count each changed binary file as 1 line.
  • --show-empty — also list repos with zero changes (hidden by default).

Behavior

  • Counts added + deleted per file from git diff --numstat, diffing HEAD against the last commit before --since.
  • If no commit predates the date, the repo is diffed against the empty tree (full history) and flagged in a note — surface that note so inflated totals are visible.
  • Each nested git repository is its own row; repos with no changes are hidden; rows are sorted by total descending.
  • Repos with no commits or git errors are reported under "Skipped".

Categories

Script defaults (precedence: generated, tests, docs, config, frontend, backend, other):

  • frontend: .js/.jsx/.ts/.tsx/.svelte/.vue/.css/.scss/.sass/.less/.html
  • backend: .py/.go/.rs/.java/.kt/.cs/.rb/.php
  • tests: paths with test/tests/spec/specs/tests, or .test. / .spec. files
  • config: .json/.yaml/.yml/.toml/.ini/.env, Dockerfiles, Makefiles, lockfiles, CI folders
  • docs: .md/.mdx/.rst/.txt, docs/, README, CHANGELOG
  • generated: generated/gen/dist/build, coverage, snapshots, lockfiles
  • other: anything else