Fine-tuned Code Template
Production-ready setting that handles roll, dice, your, code. Includes structured workflows, validation checks, and reusable patterns for statusline.
Fine-tuned Code Template
Customizable statusline displaying code-centric metrics like file counts, language statistics, and project health.
When to Use This Setting
Apply this setting when you need to:
- Monitor your codebase composition with real-time language distribution and file count statistics
- Track project health indicators like test coverage ratio and documentation presence
- Display contextual coding information that helps guide development decisions during sessions Consider alternatives when:
- You want a minimal statusline that shows only the model name and current directory
- Your project uses an unusual structure that the default code metrics cannot parse accurately
Quick Start
Configuration
name: fine-tuned-code-template type: setting category: statusline
Example Application
claude setting:apply fine-tuned-code-template
Example Output
Setting applied. Changes:
- statusLine: Code metrics monitor
- Displays: [Model] Language stats | File counts | Test ratio | Directory
Core Concepts
Code Metrics Overview
| Aspect | Details |
|---|---|
| Language Detection | Counts files by extension to determine primary and secondary languages |
| File Statistics | Reports total source files, test files, and configuration files separately |
| Test Ratio | Calculates the ratio of test files to source files as a health indicator |
| Project Size | Summarizes total lines of code across all detected source files |
Code Analysis Architecture
+---------------------------+
| Project Directory Scan |
+---------------------------+
|
+----+----+----+
| | | |
v v v v
.ts .js .py .json
files files files files
|
v
+---------------------------+
| Metrics Aggregation |
+---------------------------+
| Primary Language: TS |
| Source Files: 142 |
| Test Files: 38 |
| Test Ratio: 27% |
+---------------------------+
|
v
+---------------------------+
| [Model] TS:142 | Tests:38 |
| Ratio:27% | Directory |
+---------------------------+
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| statusLine.type | string | "command" | Status line type using shell command for dynamic content |
| statusLine.command | string | N/A | Script that scans the project and computes code metrics |
| Source Extensions | array | [".ts",".js",".py"] | File extensions counted as source code files |
| Test Patterns | array | [".test.",".spec."] | File name patterns identified as test files |
| Exclude Directories | array | ["node_modules","dist",".git"] | Directories excluded from the scan |
Best Practices
- Customize source extensions for your stack - The default configuration tracks TypeScript, JavaScript, and Python. Add extensions for languages your project uses to get accurate metrics.
- Use the test ratio as a quality signal - A declining test ratio indicates that new code is being added without corresponding tests. Use this metric to prompt test-writing sessions.
- Exclude build output directories - Generated files in dist, build, or output directories inflate file counts. Ensure these are in the exclusion list for accurate source metrics.
- Track metrics across sessions - Note the file counts at the start and end of coding sessions. Significant changes indicate productive sessions or potential scope creep.
- Combine with git-aware statuslines - Pair code metrics with git branch information for a comprehensive development dashboard that shows both codebase state and version control context.
Common Issues
- Metrics slow on large codebases - File scanning can be slow in repositories with thousands of files. Add aggressive exclusion patterns and consider caching results between interactions.
- Test files not detected - The default patterns look for .test. and .spec. in filenames. If your project uses different naming conventions, update the test patterns accordingly.
- Language distribution seems wrong - Generated files, vendor dependencies, or configuration files may skew the language distribution. Verify that exclusion patterns cover all non-source directories.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Project Standards Config
Claude Code settings preset that enforces consistent coding standards. Configures TypeScript strict mode, ESLint rules, Prettier formatting, and naming conventions.
Bedrock Configuration Blueprint
All-in-one setting covering configure, claude, code, amazon. Includes structured workflows, validation checks, and reusable patterns for api.
Refined Corporate Preset
Production-ready setting that handles configure, proxy, settings, corporate. Includes structured workflows, validation checks, and reusable patterns for api.