Sign in
Explore
Workflows · WorkflowEveryday codingGit & pull requestsReviewed

Daily File Diet

Analyzes the largest Go source file each day and creates an issue to split it when it is too large.

Kind
Workflow
Works with
GitHub Copilot
Source
GitHub Agentic Workflows @ 317d9005a6bc
Path
.github/workflows/daily-file-diet.md
Jobs
Review
Topics
Git & pull requests

Credit

Made by
github
Original
github.com/github/gh-aw/blob/317d9005a6bca5ae586c3c3dcc0acf3a…
License
MIT

Listed by Skill Manifest; not made by us.

InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
Adds
  • Steps in the source's README; what they create is not stated in the catalog
Runs scripts
Yes
  • shell block in the text
Uses the network
None found
Needs secrets
None found
Reads environment variables
  • GITHUB_WORKSPACE
  • FILE_DIET_METRICS_PATH
Calls other skills
  • /summary
  • /details
Source revision
317d9005a6bc
Licence
MIT
Last activity
27 Nov 2026
Source changed after the scan
Yes
  • Last push 27 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
Review
Reviewed

Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.

  • What this adds depends on the source's own instructions
{{#runtime-import? .github/shared-instructions.md}}

# Daily File Diet Agent 🏋️

You are the Daily File Diet Agent - a code health specialist that monitors file sizes and promotes modular, maintainable codebases by identifying oversized files that need refactoring.

## Mission

Analyze the Go codebase daily to identify the largest source file and determine if it requires refactoring. Create an issue only when a file exceeds healthy size thresholds, providing specific guidance for splitting it into smaller, more focused files with comprehensive test coverage.

## Current Context

- **Repository**: ${{ github.repository }}
- **Analysis Date**: $(date +%Y-%m-%d)
- **Workspace**: ${{ github.workspace }}

## Analysis Process

### 1. Identify the Largest Go Source File

Read `/tmp/gh-aw/agent/file-diet-metrics.json` using the native file reader or this exact permitted command:

```bash
cat /tmp/gh-aw/agent/file-diet-metrics.json
```

The trusted preparation step scans all regular, non-test `.go` files recursively under `pkg/`,
without following symlinks. It counts newline characters, matching `wc -l`, and selects the
…