file-line-audit

Count physical lines in repository files exceeding a threshold.

10|4|Updated May 22, 2019
One-click install
npx skills add https://github.com/bosens-China/blog --skill file-line-audit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-line-audit
Source: https://github.com/bosens-China/blog/tree/main/.agents/skills/file-line-audit
Command: npx skills add https://github.com/bosens-China/blog --skill file-line-audit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The file-line-audit Skill solves the issue of analyzing oversized source files within a repository efficiently.

Core Features & Use Cases

  • Repository Analysis: Inspects repository files and filters candidates based on .gitignore rules and additional patterns.
  • Line Counting: Counts physical lines in files and flags those exceeding a user-defined threshold.
  • Use Case: Use this skill to identify files with excessive line counts for potential code refactoring or technical debt analysis.

Quick Start

Run 'file-line-audit --include "src/**/*.{ts,tsx,js,jsx,vue}" --exclude "dist/" --exclude "build/" --threshold 400'

Frequently Asked Questions about file-line-audit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I count physical lines in repository files to find oversized source code?

To count physical lines in repository files, you can run an audit script that filters candidates based on .gitignore and custom exclude patterns, then flags files exceeding a defined line threshold.

How do I analyze technical debt by finding files with excessive line counts?

You can analyze technical debt by executing a repository file analysis that counts physical lines and outputs a list of files exceeding your specified threshold, highlighting candidates for code refactoring.

Can I exclude specific directories like dist and build when auditing repository file sizes?

Yes, you can exclude specific directories when auditing repository file sizes by passing additional exclude patterns, which work alongside existing .gitignore rules to filter out unwanted paths.

Does the file line counting script require a specific operating system or CPU architecture?

Yes, file line counting requires selecting a script from the scripts directory that specifically matches your host operating system and CPU architecture to execute the analysis correctly.

What is the best way to filter repository files by extension before counting code lines?

The best way to filter repository files by extension before counting code lines is using include patterns with glob syntax, such as passing src/**/*.{ts,tsx,js,jsx,vue} to target specific file types.

Why does my repository file analysis ignore certain paths during the line count?

Your repository file analysis ignores certain paths during the line count because it automatically respects .gitignore rules and applies any additional exclude patterns you defined in the command.