agentleFS
spizganedspizganed/skills/audit-repo/SKILL.md

audit-repo

Skill0 starsChanged 21 days agoMITView on GitHub

Audit code or .md files. Report findings and propose fixes. Run only when the user types /audit-repo.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. narrative-io/narrative-skills-marketplace★ 9same name
    2. martinappberg/chimaera★ 7same name
    3. gerivdb/SKILLS★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the user gave an argument, use it as the target: a repo, a directory, a file, or a skill name.

    line 13
  2. Distinctive:

    Use AskUserQuestion for every choice.

    line 18
  3. Distinctive:

    Do not read any file before the user answers all questions.

    line 19
  4. Distinctive:

    Read every tracked file. Use git ls-files to list them.

    line 22
  5. Distinctive:

    Read a large repo in parts.

    line 23
  6. Distinctive:

    Ask this in step 3, after the branch.

    line 52
  7. Very specific:

    Use git log -p or git log --all -S<pattern> with narrow patterns.

    line 55
  8. Distinctive:

    Never rewrite the history yourself.

    line 59
  9. Distinctive:

    After each finding, give one proposed fix.

    line 65
  10. Distinctive:

    Ask which fixes to apply.

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Audit repo

Audit the target. Report findings. Propose fixes. Do not edit any file.

Target

  • If the user gave an argument, use it as the target: a repo, a directory, a file, or a skill name. Still confirm the branch.
  • With no argument, scan for repos first. Run command find ~ -maxdepth 3 -name .git -not -path '*/.*/*' and take the parent directories. Also include the repo of the current directory.
  • Step 1, repo: ask with AskUserQuestion which repo to audit. Offer the repo of the current directory first, marked "(Recommended)", then the other repos found. The picker holds 4 options at most. With more than 4 repos, show 3 and make the fourth "More repos...", then ask again with the next ones. The user can also type a path in Other.
  • Step 2, branch: run git branch --all in the chosen repo. Ask with AskUserQuestion which branch to audit. Offer the current branch first, marked "(Recommended)", then the other branches. The user can type a branch in Other.
  • Step 3, history: ask the commit history question from the section "Commit history (optional)". Ask it in the same series, right after the branch.
  • Use AskUserQuestion for every choice. It gives an arrow-key picker. Never ask the user to type a number or a name in plain chat.
  • Do not read any file before the user answers all questions.
  • To audit a branch that is not checked out, do not switch the branch in the working tree. Use git ls-tree and git show <branch>:<file>, or git worktree add in the scratchpad directory.
  • Audit the whole repo, not only the changed files. Include code and .md files.
  • Read every tracked file. Use git ls-files to list them. Skip build output, lock files, and binaries.
  • Read a large repo in parts. Do not skip a directory.

Checks for code

  • Bugs: wrong logic, unhandled error, race, off-by-one.
  • Security: secret in source, unsafe input, unsafe permission.
  • Dead code, duplicate code, unused dependency.
  • Code that breaks the style of the surrounding code.

Checks for sensitive data (code and .md files)

  • Secrets: API key, token, password, private key, credential in a URL.
  • Personal details of any person: real name, email address, phone number, home address, account ID, handle, location.
  • Private device data: IP address, MAC address, serial number, hostname, absolute path with a user name.
  • Report the place and the kind of data. Do not print the secret or the detail in full. Show the first 4 characters at most.
  • Propose a fix: remove it, replace it with a placeholder, move it to an ignored file, or rotate the secret.

Checks for .md files (docs, skills, memory, CLAUDE.md)

  • Frontmatter: name matches the directory. description is present and says when to use it.
  • Broken link, broken [[memory link]], or reference to a file that does not exist.
  • A fact that is out of date. Verify it against the files before you report it.
  • Two rules that contradict each other, in one file or across files.
  • Duplicate text that another file already holds.
  • Text that breaks the asd-ste100 rules: sentence over 20 words, fragment, filler.
  • Text that costs context and gives no value.

Commit history (optional)

  • Ask this in step 3, after the branch. Ask the user with AskUserQuestion: "Also scan the commit history for sensitive data?"
  • Give two options: "No, current files only (Recommended)" and "Yes, scan the history". Note that the history scan costs more.
  • On yes, scan only for sensitive data. Do not review old code for bugs.
  • Use git log -p or git log --all -S<pattern> with narrow patterns. Do not read every diff in full.
  • Also list the author names and emails in the history with git log --format='%an <%ae>' | sort -u.
  • For each hit, give the commit hash, the file, and the kind of data.
  • Tell the user that a removal from the history needs a rewrite (for example git filter-repo) and a force push. A leaked secret needs rotation even after removal.
  • Never rewrite the history yourself.

Report

  • One finding per line: file:line - problem - severity (high, medium, low).
  • Sort by severity, high first.
  • After each finding, give one proposed fix. Show the exact new text when the fix is small.
  • Mark each fix as safe or risky.
  • End with a count per severity. If you find nothing, say so.

After the report

  • Ask which fixes to apply.
  • Apply only the fixes the user approves.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.