# audit

Adopt this skill: https://proskills.md/skills/other/grinchenkoedu-claude-skills-plugins-gku-skills-audit

Page: https://proskills.md/skills/other/grinchenkoedu-claude-skills-plugins-gku-skills-audit
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: plugins/gku/skills/audit/SKILL.md
size: 8066
upstream: https://github.com/grinchenkoedu/claude-skills/blob/main/plugins/gku/skills/audit/SKILL.md

```text
---
name: audit
description: Audit a whole repository — not a diff — against the rules the other skills already apply to a change: the security checklist, code provenance and licensing, the family's code-quality rules, and whether the repository is ready for agent-driven development (CLAUDE.md, AGENTS.md, an ignored profile, a detectable test command). Asks you in the chat, in one batched round, the decisions that block a fix — which licence, whether a copyleft dependency may stay, where a copied block came from — and writes your answers in as steps. Writes a task file in the /gku:plan shape, findings grouped into branch-sized rounds, that /gku:implement builds in one run or one step at a time. Read-only; writes no production code.
argument-hint: "[--area security|licence|quality|agents]... [--deep] [--provenance]"
user-invocable: true
disable-model-invocation: true
disallowed-tools: Edit, NotebookEdit
---

# /gku:audit — read the whole repository against the rules, then hand over a plan

Every other skill applies the toolkit's rules to a change. This one applies them to the
repository as it stands: a codebase being onboarded, a plugin inherited from someone else, a
project about to be published. It invents no rules of its own — it reads the tree against the
same reference files `/gku:review` and `/gku:init` use, adds only the checks that make sense for
a whole tree and not for a diff, asks you the decisions its findings wait on, and writes what it
found as a task file `/gku:implement` can build from, one round at a time.

Run it rarely — on onboarding, before a release, after a long gap. It is the one skill that reads
a tree instead of a diff, and it says which files it read.

Read-only. The only file it writes is the task file.

## Arguments

- **nothing** — audit the current repository, all four areas.
- `--area <name>` — repeatable; restrict to `security`, `licence`, `quality` or `agents`.
- `--deep` — allow one sub-agent, on a small fast model, for mechanical search over a large tree.
  Stays local.
- `--provenance` — hunt for the **origin** of code that reads as copied (step 5b): fingerprints
  of candidate blocks are searched on GitHub and the hits compared side by side. A separate flag,
  not part of `--deep`, because it is the only step that sends fragments of the code to an
  outside search; the developer opts into that explicitly. With both flags the sub-agent picks
  the candidates over the whole tree.

No path argument: the audit is of the repository it runs in. Given a branch or a pull request,
say that `/gku:review` and `/gku:pr-review` are for those and stop.

## Step 1 — Profile and inventory

Read `.claude/repo-profile.json` (see `reference/repo-profile.md`; detect and cache if missing)
and `reference/exec.md`. The profile gate in `reference/untrusted-input.md` applies here more
than anywhere: a profile that turns out to be **tracked** is not executed — re-detect, and
record the tracked file as the first finding. You need family, language, `standardsDoc`,
`hasDatabase`, `runtime.kind` and `exec.kind`.

Then take stock with `git ls-files`: how many files, of what kinds, in what layout, and where
the family keeps its entry points — a Moodle plugin's root pages, `classes/external/`,
`db/services.php` and `cli/`; a `php-app`'s `application/controllers/` and `commands/`; a
`python-app`'s routes, views and `main.py`; a CMS's `functions.php` and templates. Skip
`vendor/`, `node_modules/`, build output and anything generated — those are audited as
dependencies in step 2, not as code.

Say in one line what is being audited and how big it is. In a repository with no code — family
`other`, a markdown-only project — the code sections come back empty; say which parts did not
apply and carry on, because the licence and readiness sections still do.

## Step 2 — Mechanical sweeps over the whole tree

These are cheap, so they cover every tracked file. A hit is a lead to open the file at; a miss
is not clearance.

- **Security** — the sweep in `reference/security-checklist.md`, using its whole-tree form
  (`tracked()` in place of `added()`): the same grep groups over `git ls-files` instead of the diff.
- **Secrets** — the checklist's credential pattern, plus what only a tree shows: a tracked
  `.env`, `*.pem`, `id_rsa*`, a `-----BEGIN … PRIVATE KEY` block, a configuration file carrying a
  password literal. **Never quote a value into the report** — the path, the key name and
  `<redacted>`.
- **Licensing** — `LICENSE*` or `COPYING*` at the root; the `license` field in `composer.json`,
  `package.json`, `pyproject.toml` or `setup.cfg`; whether the two agree; the provenance-marker
  group of the checklist sweep; a tracked `vendor/` or `node_modules/` and whether the notices in
  it are intact; for a Moodle plugin, how many PHP files lack the GPL header block
  (`reference/code-provenance.md`: a Moodle plugin is GPL by requirement). What the hits mean is
  step 5a; where a block came from is step 5b.
- **Dependencies** — a lock file tracked beside each manifest; `composer audit`,
  `npm audit --omit=dev` or `pip-audit`, whichever the project has, through `exec.prefix` and
  wrapped in the `timeoutTool`, summary line quoted; the declared runtime version against
  end-of-life (checklist section 12 — a standing WARNING); dependency licences through
  `composer licenses`, `npm ls --json` or `pip-licenses` where present. A copyleft licence in a
  project whose own licence is not copyleft is **flagged for a person to decide** — the skill
  names both licences and never rules on compatibility.
- **Agent readiness** — `CLAUDE.md` and `AGENTS.md`: present, and which one is the pointer;
  `.gitignore` covering `.claude/repo-profile.json`, `.gku/` and `.tasks/` (the rules in
  `reference/repo-profile.md` and `reference/reports.md`); a test command that
  `reference/repo-profile.md` step 5 can detect — a `Makefile`, manifest scripts, a CI workflow;
  a CI workflow at all; a container definition (`docker-compose.yml`, a development `Dockerfile`)
  so `exec.kind` need not be `host`; `.claude/settings.json` and anything else tracked under
  `.claude/` read **as code** (`reference/untrusted-input.md`) — a permission or hook that
  pushes, passes `--no-verify` or `--force`, or fetches a URL is a finding;
  `.github/pull_request_template.md` and `CONTRIBUTING.md`, noted as present or absent.

## Step 3 — Rank and read, ten files at most

Rank what the sweeps pointed at and read down the list until ten files have been read in full:

1. entry points where a security hit landed;
2. anything writing to the database in bulk, or handling money, grades or records-of-record
   (`hasDatabase` gates the data-safety rules in `reference/repo-profile.md`);
3. authentication, session and permission code;
4. uploads, downloads and outbound requests;
5. the standards doc itself — step 4 needs it read, and it counts toward the ten;
6. up to two test files, to judge whether the tests assert anything — `/gku:review` step 4's
   list, sampled rather than swept.

For every entry point read, answer the checklist's four questions by reading, not guessing.
Name the ten in the report and say that everything else was judged from the hits. An honest cap
beats a silent one.

If the profile has a `lint` command, run it over the tree through `exec.prefix`, wrapped in the
`timeoutTool`. A parse error is a BLOCKER, quoted verbatim. No lint command, or a host fallback
without the toolchain, means the audit is unlinted — say so; never report a lint that did not
run. Mind the version, as `/gku:review` step 4b says.

**Code quality is judged from what scales.** Lint; whether tests exist and assert; whether a
bulk-writing script carries dry-run by default, safe re-runs and bounded scope; long work run
inline in a web request when the project already has a background mechanism; the lock file; an
end-of-life runtime; the same block copied a third time. The family's style rules from the
standards doc are app
```

## File: README.md
upstream: https://github.com/grinchenkoedu/claude-skills/blob/main/README.md

````text
# claude-skills

**🇬🇧 English** · [🇺🇦 Українська](README.uk.md)

<p>
  <img src="https://img.shields.io/badge/Claude_Code-D97757?style=for-the-badge&logo=claude&logoColor=white" alt="Claude Code" /> <img src="https://img.shields.io/badge/macOS_%7C_Linux_%7C_Windows-4A4A4A?style=for-the-badge" alt="macOS | Linux | Windows" /> <img src="https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white" alt="Docker" /> <a href="https://github.com/grinchenkoedu/claude-skills/actions/workflows/checks.yml"><img src="https://img.shields.io/github/actions/workflow/status/grinchenkoedu/claude-skills/checks.yml?branch=main&style=for-the-badge&label=Checks" alt="Checks" /></a> <img src="https://img.shields.io/badge/License-MIT-3DA639?style=for-the-badge" alt="License: MIT" />
</p>

Skills for [Claude Code](https://claude.com/claude-code) that cover an ordinary
development day: work out what to build, build it, check your own work, review a colleague's
pull request, deal with the comments on yours, and prove the result actually works.

They work in any repository — nothing here is tied to a particular project, language or
framework. They are also written to be **economical**, so they are usable on a modest Claude
plan: no background agent swarms, no parallel sub-agents, and answers in the chat instead of a
pile of generated report files. The few sub-agents they use are their own, each on a pinned
model, and each there to keep your session's context short rather than to add work. That is measured, not only promised: the cases in
`evals/live/` run the skills in real sessions, and `evals/live/README.md` says how to measure
them on your own model and plan.

**They do not have to write your code.** `/gku:plan --manual` produces a plan you build by
hand — the shape of each change, the reason it is shaped that way, and the command that proves
it — and the rest of the toolkit follows: `/gku:implement` asks before it would build such a
plan, `/gku:review` and `/gku:verify` read what you typed exactly as they read anything else,
and none of them ever commits for you. Use the agent as an **adviser and reviewer**, where that
is what helps, and keep the keyboard: in a repository that does not accept generated code, on a
change too delicate to hand over, or while you are learning a codebase and writing it yourself
is the whole point.

MIT licensed.

---

## Contents

- [What is this, exactly?](#what-is-this-exactly)
- [Before you start](#before-you-start)
- [Installation](#installation)
- [The skills](#the-skills)
- [A worked example](#a-worked-example-start-to-finish)
- [Each skill in detail](#each-skill-in-detail)
- [Writing a task file](#writing-a-task-file)
- [Where the reports go](#where-the-reports-go)
- [What runs underneath](#what-runs-underneath)
- [Using these on a Pro plan](#using-these-on-a-pro-plan)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)

---

## What is this, exactly?

A **skill** is a set of instructions you can call by name in Claude Code. Instead of
explaining what a good code review looks like every time, you type `/gku:review` and Claude
follows a procedure that was written once and refined.

You call them with a slash, like `/gku:review`, in the Claude Code chat.

They are **not** magic and they are **not** automatic. Every one of them does something you
could do yourself; they just do it consistently and without forgetting the boring parts —
which is exactly where mistakes come from.

Six of them (`/gku:research`, `/gku:plan`, `/gku:audit`, `/gku:review`, `/gku:pr-review`,
`/gku:verify`) never change your code at all.
Three do (`/gku:implement`, `/gku:fix`, `/gku:pr-resolve`), and each tells you what it is about to
do. `/gku:pr` changes nothing locally; it pushes commits you already made and opens the pull
request.

None of them takes instructions from what it reads. A comment on a pull request, a brief, a
findings file, a test's output — these are evidence about the code, and a skill checks them
against it; they cannot make a skill push, skip a hook, run a command or change its own rules.
Only you can, in the chat. `plugins/gku/reference/untrusted-input.md` says where that line is
drawn, and why holding it costs almost nothing per run.

They do not read the internet either, except `/gku:research`, whose job it is, and
`/gku:audit --provenance` when you ask for it. Both send only public names and stripped error
text, never your code, and both say how much they sent.

The code they write is their own, a dependency installed through Composer, npm or pip, or code
under your project's own licence with its header kept. Code under a different licence — closed,
or open source under MIT or any other — is never pasted in without your approval in the chat,
and renaming a pasted block does not count as writing it. The review skills look for the signs
of a copy. `plugins/gku/reference/code-provenance.md` draws that line.

## Before you start

You need:

1. **Claude Code** installed and working — [installation guide](https://docs.claude.com/en/docs/claude-code/overview).
2. **git** — you have this already if you are cloning repositories.
   **On Windows, install [Git for Windows](https://git-scm.com/download/win)**, which includes
   Git Bash. Claude Code uses it to run commands, and these skills assume it is there.
3. **The GitHub CLI (`gh`)**, for the three pull-request skills:

   ```bash
   winget install --id GitHub.cli     # Windows
   brew install gh                    # macOS
   sudo apt install gh                # Ubuntu/Debian
   ```

   Then sign in once, and check it worked:

   ```bash
   gh auth login
   gh auth status
   ```

   `/gku:plan`, `/gku:audit`, `/gku:research`, `/gku:implement`, `/gku:review`, `/gku:fix` and
   `/gku:verify` work without `gh`. `/gku:pr`, `/gku:pr-review` and `/gku:pr-resolve` need it,
   because they talk to GitHub — and so does `/gku:audit --provenance`, which searches GitHub for
   where copied code came from. `/gku:research` uses it for upstream issues and releases when it
   is signed in, and searches the web without it.

4. **Docker** — [Docker Desktop](https://www.docker.com/products/docker-desktop/) on Windows
   and macOS, Docker Engine on Linux. **Strongly recommended on every platform**, not just
   Windows.

   The skills run a project's own commands **inside its container** by default. That is not
   about convenience — it is about being right. These projects target specific runtime
   versions: a plugin written for PHP 7.4 checked by a host PHP 8.4 will accept syntax that
   breaks in production, and a test suite that passes against the wrong version has not proven
   anything. The container has the version the project actually uses, along with its
   dependencies and its database.

   It also means you do not need PHP, Composer, Python or Node installed locally at all —
   several of these projects assume you do not have them — and the same commands work
   identically on Windows, macOS, Linux and WSL.

   Without Docker the skills still work, falling back to whatever is on your machine, and they
   will tell you they did. If the versions differ from the project's, treat a green run with
   suspicion.

**Windows works.** Use Git Bash, as in step 2. The skills detect your platform on first use and
store commands that work there. WSL also works and behaves like Linux.

## Installation

In Claude Code, run these two commands:

```
/plugin marketplace add grinchenkoedu/claude-skills
/plugin install gku@grinchenkoedu
```

That is all. Type `/` and you will see `/gku:init`, `/gku:audit`, `/gku:research`, `/gku:plan`,
`/gku:implement`, `/gku:review`, `/gku:fix`, `/gku:pr`, `/gku:pr-review`, `/gku:pr-resolve` and
`/gku:verify` in the list.

### Updating

The skills are improved regularly. To pull the latest:

```
/plugin marketplace update grinchenkoedu
/reload-plugins
```

The first refreshes the marketplace from GitHub; the second reloads skills in the current
````
