- Home
- Skills
- DevOps & Cloud
- Repository Hygiene Check
More screenshots
Works with the AI Agents you already use
Repository Hygiene Check
A push fails because a 120 MiB model file slipped into the last commit.
$5
Repository Hygiene Check
Example session with this skill installed
Check this project with repo-hygiene-check.
- Read your context and instructions
- Compiled the repository hygiene check
$ python3 scripts/check_repo_hygiene.py examples/risky
BLOCK bin/deploy:1 R03 SCRIPT_HAS_CRLF
Line 1 ends with CRLF; 5 of 5 lines do. No .git/index here, so the committed copy was not compared.
Why: A shell script (.sh, .bash, a shell startup file, a sh/bash/node #! line, or an extensionless file with #!) has Windows CRLF line endings, and git stores it that way, or .gitattributes sets eol=crlf for it, or nothing shows that the committed copy has LF (no .git/index, or the file changed since it was staged). On Linux and macOS the carriage return becomes part of each line: bash stops with $'\r': command not found and #!/usr/bin/env node fails with 'node\r': No such file or directory, so CI runners, Docker images and published npm bin scripts break. When git stores the file with LF and only this checkout has CRLF, R21 reports it instead.
Safer: Save the file with LF endings and add a .gitattributes rule such as .sh text eol=lf (and one for extensionless scripts, for example bin/ text eol=lf), so every checkout gets LF. Then run git add --renormalize .
BLOCK src/server.js:4 R01 MERGE_CONFLICT_MARKERS
REVIEW LICENSE R20 NO_SECURITY_POLICY
REVIEW docs/runbook.md:3 R12 MIXED_LINE_ENDINGS
REVIEW scripts/setup.sh:1 R16 SHELL_SCRIPT_WITHOUT_SHEBANG
REVIEW src/server.js.orig R17 MERGE_LEFTOVER_FILE
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 9 files, 9 with repository content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
A push fails because a 120 MiB model file slipped into the last commit. A teammate on Windows clones the repository and git stops with "invalid path 'lib/aux.js'". A container exits with "exec /entrypoint.sh: no such file or directory" because the script was committed with CRLF line endings. A .env file that .gitignore lists was committed before the rule existed, and every fork still gets it. This skill finds those and the other repository hygiene mistakes below, and tells you how to fix each one.
Your agent runs a scanner on the repository folder. It walks every file except vendored and generated folders (node_modules, vendor, dist, build, .venv and the like), nested repositories and the files .gitignore ignores, and it reads .git/index directly, without running git, to learn which paths git tracks and how big they are. That is how it sees two names that differ only by case, or a Windows-reserved name, even on a Windows or macOS checkout where those files cannot exist on disk, and how it tells a script git stores with CRLF (a real problem) from one that only this Windows checkout has with CRLF because of core.autocrlf (a local one). It follows .gitattributes (text, eol, filter=lfs, conflict-marker-size) and .git/info/exclude. It never runs git or the project's code and never uses the network. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. File contents and secret values are never printed.
What it checks
BLOCK
- R01: merge conflicts left in files (<<<<<<<, =======, >>>>>>>), not heading underlines or examples in Markdown code fences
- R02: files over 100 MiB that are not stored with Git LFS
- R03: CRLF line endings in shell scripts, shell startup files, sh/bash/node #! files and extensionless #! files (bin/deploy, git hooks) when git stores them that way, .gitattributes sets eol=crlf, or there is no .git/index to compare with
- R04: paths that differ only by case or Unicode normalization, or a file named like a folder in another case (the finding says a project never checked out on Windows or macOS can keep them)
- R05: names Windows cannot create: CON, PRN, AUX, NUL, COM1-9, LPT1-9 (also aux.js, nul.txt), < > : " | ? * \ and control characters, names ending in a space or a period
- R06: credential files git tracks: SSH private keys, .ppk, .p12, .pfx, .jks, .keystore, .kdbx, AuthKey_*.p8, PEM private keys, service-account JSON keys, .git-credentials, .netrc, terraform.tfstate, and env files with secret values that are named .local or ignored by .gitignore (in test folders, see R22)
REVIEW
- R11: files over 50 MiB that are not stored with Git LFS
- R12: mixed CRLF and LF line endings with no .gitattributes rule for the file
- R13: a UTF-8 byte order mark in JSON, PHP, shell scripts and #! files
- R14: paths over 200 characters from the repository root, or names over 255 bytes
- R15: symlinks that point outside the repository
- R16: .sh files without a #! line on line 1
- R17: .orig, .rej and merge-tool BASE/LOCAL/REMOTE/BACKUP leftovers
- R18: database dumps and local databases git tracks (.sql.gz, .dump, dump.sql, dump.rdb, .bson, .sqlite3, .mdf)
- R19: files git tracks although .gitignore or .git/info/exclude ignores them (one finding per ignored folder)
- R20: a LICENSE file but no SECURITY.md in the root, docs/ or .github/
- R21: shell scripts with CRLF only in this checkout: git stores them with LF (core.autocrlf=true on Windows), so the push and Linux CI are fine but WSL and Docker builds from the folder are not
- R22: test keys and key stores in test, spec and fixtures folders, and trust stores (truststore.jks, cacerts): confirm they are not used anywhere real
What's included
- The scanner (Python 3.9+, standard library only), with a reader for git's index format (versions 2, 3 and 4, SHA-1 and SHA-256 repositories, split indexes, linked worktrees)
- A rules guide with the reason, safer approach and official source for each rule
- A risky and a safe example project, and the real report the scanner produces on the risky one (the example shows six of the rules; the others need things a ZIP cannot carry, such as a 100 MiB file, a symlink or a .git folder)
Limits It reads the files as they are now and the list of tracked paths in .git/index. Git history, other branches and stored objects are not read, so a file deleted in a later commit but still in history is not found. Without a .git folder (a downloaded source archive) the rules about tracked files (R06, R18, R19, R22) do not run, and a CRLF script is reported as R03 because the committed copy cannot be compared. A global excludes file, global attributes and file modes such as the executable bit are not checked. It does not search file text for secrets. NOT FLAGGED is not a guarantee.
Static check of the work tree and the git index. Git history, other branches, hosting settings (branch protection, LFS quotas) and secrets inside file text are not checked. NOT FLAGGED is not a guarantee.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example project contains an inert merge conflict, a script with CRLF line endings and a leftover .orig file for the scanner to find. Nothing in it is run. The scanner reads .git/index and file sizes; it never runs git.