Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

audit

/audit

Sprawdza bieżące zmiany lub cały projekt pod kątem jakości, bezpieczeństwa, wydajności i testów oraz zapisuje ustalenia.

Repozytorium
pawang-agents ↗
Licencja
MIT
Ostatnia zmiana repozytorium
05.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 05.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Sprawdza bieżące zmiany lub cały projekt pod kątem jakości, bezpieczeństwa, wydajności i testów oraz zapisuje ustalenia.

Oryginalny opis (EN)

Audit current changes, a path, or the full project for quality, security, performance, or test problems and record durable findings; `independent` adds a second-opinion reviewer verdict. Use for /audit, security review, code quality review, dead code, duplication, or standards drift.

Jak działa

  1. Input
  2. Step 1 - gather context
  3. Step 2 - run available signals
  4. Step 3 - review the code
  5. Step 4 - update the findings ledger
  6. Step 5 - report findings
  7. Independent review
  8. Rules
  9. Formatting
Sekcje z nagłówków SKILL.md, w oryginale · 375 linii, 2 986 słów
Podgląd SKILL.md
---
name: audit
description: Audit current changes, a path, or the full project for quality, security, performance, or test problems and record durable findings; `independent` adds a second-opinion reviewer verdict. Use for /audit, security review, code quality review, dead code, duplication, or standards drift.
disable-model-invocation: true
---

# audit - review code quality against the project standards

**Context reuse:** Reuse any required file already loaded in project instructions or the current session. Read it again only if absent, changed, or exact current bytes or line references are needed.

Where this sits in the workflow:

    /implement  ->  [audit]    ->  fixes or /complete
    (code exists)                 (review +    (repair quality issues
                                   ledger)      or close the feature)

`/check` proves behavior against the spec. This skill checks the code itself through either a broad review
or one focused lens: quality, security, performance, or tests.

It reviews code without changing it: it never edits source files, installs
dependencies, commits, merges, pushes, or starts product work. Its writes are
the findings ledger, the `## Findings` section of the active spec file in
`.pawang/specs/` (Step 4), the durable record of findings and their status, and, in
independent mode, the `## Review` block of that file.

The quality-gate config controls when another workflow invokes this skill
automatically. An explicit `/audit` or `$audit` request always selects the audit
regardless of whether the applicable gate is `manual` or a conditional value
(`when-sensitive`, `when-behavioral`, `when-testable`) or `always`.
A missing config means built-in defaults. If it exists but is invalid, stop and
ask the user to fix `.agents/pawang.json` before writing the findings ledger.

## Input

Treat scope and lens as separate controls. Arguments may appear in either order,
such as `/audit security current` or `/audit src/auth tests`.

Optional mode: `independent` runs the scope `current` audit through a separate
reviewer and records a `## Review` block; follow "Independent review" below.
It cannot be combined with a path or `full`.

Optional scope:

- no scope argument: use `current` when an active feature exists, otherwise use
  `changed` when local changes exist, otherwise use `full`
- `current`: audit the active spec in `.pawang/specs/` (the one whose `**Status:**`
  is not `done`; see `.agents/README.md`, section "Specs"), every committed feature-branch
  change from its merge base through `HEAD`, staged and unstaged changes,
  untracked source files, and nearby code affected by the feature
- `changed`: audit staged, unstaged, and untracked source files plus nearby code
- `full`: audit all project-owned source, tests, and configuration while excluding
  dependencies, generated files, build output, coverage output, caches, vendored
  code, and minified assets unless the user explicitly includes them
- path or directory: audit that area and the tests or callers needed to understand it

Optional lens:

- no lens: review all four lenses
- `quality`: maintainability, duplication, dead code, consistency, complexity,
  and standards drift
- `security`: authorization, input trust, injection, data exposure, secret
  handling, and unsafe configuration
- `performance`: query, network, rendering, memory, payload, concurrency, and
  unbounded-work risks
- `tests`: missing coverage for important logic, weak assertions, skipped or
  focused tests, poor isolation, brittle mocks, and likely flakiness

`full` is always the full-project scope, not a lens. `/audit full` therefore runs
all lenses across the full project. When only a lens is supplied, select scope
with the normal no-scope rules. A focused pass may name one or more lenses. If
the request names multiple lenses, review their union and report them separately.

If the requested scope is unclear, pick the smallest useful scope and state it.
If the lens is unclear, use all lenses and state that choice.

## Step 1 - gather context

Resolve this required context:

- `AGENTS.md`
- `.pawang/rules.md` (the kit requires it before reviewing code)
- `.agents/pawang.json`
- `CONTEXT.md`: the relevant sections, and the active spec file in `.pawang/specs/`
- `.pawang/conventions/`
- `DESIGN.md`, when the scope touches UI
- the active spec's `## Findings`, for existing IDs and statuses, and the unresolved
  P2/P3 findings (`open`, `fixed`, `unverified`) of earlier specs:
  `grep -E '^### F-[0-9]+ \[P[0-3]\] (open|fixed|unverified)' .pawang/specs/*.md`
- git branch and working tree status
- relevant source files, tests, and configs for the chosen scope

For `current`, `changed`, and path scopes, begin with the diff or named area and
follow only the callers, dependencies, tests, and contracts needed to verify a
reachable finding. Do not survey unrelated directories. For `full`, preserve the
declared exclusions and inspect by bounded area rather than dumping the project
into one response.

For `current`, resolve the comparison base without network access:

1. Use a base branch declared by the active spec or project instructions.
2. Otherwise use the locally recorded remote default branch when available.
3. Otherwise use an existing local `main`, then `master`.
4. Find the merge base and inspect the committed delta through `HEAD`, then add
   staged, unstaged, and untracked work.
5. If no reliable base exists, say so and use the active spec plus local changes.
   Never claim that committed feature work was fully covered in that case.

Do not fetch or pull to discover the base. For `full`, state the excluded paths
before reviewing so generated or third-party code does not consume the audit.

Prefer `rg` and targeted file reads. Do not dump large files into the response.

## Step 2 - run available signals

Use existing commands only. Do not install tools.

Run or inspect only the signals relevant to the selected lens and scope:

- lint and typecheck commands when declared and relevant
- test command for the tests lens or when it directly validates a suspected risk
- build command when the selected lens needs compilation or bundle evidence
- existing security command for the security lens, when declared and locally runnable
- existing performance command for the performance lens, when declared and locally runnable
- targeted lightweight searches for the chosen lens, such as unused exports and
  copied logic for quality, unsafe trust boundaries for security, repeated or
  unbounded work for performance, and skipped or weak tests for tests

Do not run broad checks unrelated to a focused lens. If a useful command is
missing, report that as a gap. Do not invent a pass or claim that a focused
review covered the other lenses.

## Step 3 - review the code

For all lenses, ground findings in reachable code and project-specific
expectations. Apply only the selected lens or lenses:

- **Quality:** duplicated logic, dead or unused code, unreachable paths,
  oversized modules, abstractions that do not pay for themselves, risky missing
  abstractions, speculative dependencies, services, configuration surfaces,
  compatibility layers or security machinery, inconsistent patterns, and drift
  from the standards or spec. Untuned stack-specific template defaults are not
  established requirements.
- **Security:** missing authentication or authorization, client-controlled
  ownership, injection, unsafe parsing or deserialization, sensitive-data
  exposure, secret handling, insecure defaults, and trust-boundary mistakes.
  Inspect existing dependency or scanner output when available, but never imply
  that local manifest inspection is a current vulnerability scan.
- **Performance:** N+1 queries, repeated network or database work, unnecessary
  rendering, blocking work on hot paths, unbounded loops or collections, memory
  growth, oversized payloads, missing pagination, and unsafe concurrency. Mark
  hypotheses as unverified when runtime or profiling evidence is missing.
- **Tests:** important logic without coverage when a test command exists, weak
  assertions, tests that only mirror implementation, excessive mocking, shared
  state, time or order dependence, skipped or focused tests, placeholder tests,
  swallowed failures, and missing browser or integration evidence where behavior
  crosses a real boundary. Never invent a coverage percentage.

Do not nitpick harmless style differences unless they signal drift from the local
patterns. Prefer a short list of real findings over a broad list of guesses.

For a proportionality finding, state in **Suggested fix** what can be deleted,
which existing, standard-library, native-platform, or installed mechanism
replaces it, and which current requirement would be lost. Use `None` when no
current requirement would be lost. If the suggested fix removes or changes
shipped behavior, require an explicit user decision and never describe it as an
automatic repair.

Do not broaden a focused pass because another category might be interesting.
Do not report or call out non-critical concerns from omitted lenses, even as
suggestions for a later audit. If an obvious P0 is directly encountered outside
the selected lens, report and record it as an out-of-lens critical risk, but do
not continue searching that other lens.

If a possible secret is found, never quote its value, paste the matching source
line, or include raw command output containing it. Report only the redacted secret
category, file, line, risk, and remediation. Redact sensitive values from all
audit evidence before responding.

## Step 4 - update the findings ledger

The `## Findings` section of the active spec file in `.pawang/specs/` is the durable
record of findings. Chat reports do not survive a context clear; the ledger does.
It is the only place this skill writes (plus `## Review` in independent mode).
If the spec has no `## Findings` section yet, add it after the spec sections;
never touch the rest of the file. When no spec is active (for example a `full`
audit between work items), do not create one: report the findings in chat only
and offer `/fix "<finding>"` for the ones worth repairing.

An unresolved P2 or P3 finding that an earlier, finished spec carried stays in
that spec's `## Findings`. Report it when it is relevant, and re-examine it
through its qualified ID, `<spec-stem>#F-03` (the file name without `.md`). The
only edit a finished spec accepts is a change to a finding's status and
**Resolution**.

**The ledger never scopes the review.** Review the code fresh in Step 3, then
record what the review found. Working from the open findings as a checklist and
verifying only those is the exact failure this file exists to prevent: a repair
can introduce a new defect that no existing entry points at.

One block per finding. The header line is the machine-readable contract and must
keep this exact shape; the prose below it is for humans and may vary:

    ### F-03 [P0] open - Retained auth volumes carry the run label

    **File:** ops/agent-proof/compose.yaml:86
    **Found:** 2026-07-21 by /audit (scope: current; lens: security)
    **Why it matters:** ...
    **Suggested fix:** ...
    **Resolution:**

IDs are sequential within one spec file (`F-01`, `F-02`, ...), never reused and
never renumbered, even after a finding closes. A bare ID means the active spec's
ledger; across files use `<spec-stem>#F-03`. `/complete` keeps resolved entries
in the file, so a finished spec remains the full record of its findings. Severity reuses the P0-P3 scheme from Step 5; only P0 and P1
block `/complete`. Status is one of:

| Status | Meaning | Blocks P0/P1 at /complete |
|---|---|---|
| `unverified` | Suspected, no confirming evidence yet | No |
| `open` | Confirmed, not yet repaired | Yes |
| `fixed` | Repaired, not yet re-reviewed | Yes |
| `closed` | Repaired and re-reviewed against the new code | No |
| `accepted` | Not fixing, by the user's explicit decision; reason recorded in Resolution | No |
| `invalid` | Re-examination proved the finding wrong; evidence recorded in Resolution | No |

After the review:

- Append each new confirmed finding as `open` with the next sequential ID, one
  past the highest ID present in this spec's ledger (a new spec starts at `F-01`).
- Record an unverified risk worth tracking as `unverified`. It is a lead, not a
  defect, and never gates a merge.
- Update the entries this pass re-examined: correct the status or severity and
  note the evidence in **Resolution**.
- Move a `fixed` finding to `closed` only when all three hold: this pass's
  reviewed set included the finding's file, re-examining the repaired code
  confirmed the original defect is gone and the repair introduced no new one,
  and the report names the finding as closed. An unrelated new finding in the
  same file gets its own entry and does not keep the repaired one open. Never
  close a finding implicitly.
- Set `accepted` only on the user's explicit decision in the current session,
  and record their reason. Never accept a finding on their behalf.
- Set `invalid` only when re-examination shows the finding was wrong, and
  record that evidence in **Resolution**. It is a review verdict (or the
  user's explicit call), never a shortcut past the gate for blocked work.

`fixed` blocking `/complete` is deliberate: a repair is not done when the code
changes, it is done when a review has looked at the result. `/implement` marks
repairs `fixed`; only a review pass moves them to `closed`.

## Step 5 - report findings

Lead with findings, ordered by severity, using the IDs the ledger assigned:

    F-04 [P1] Title
    File: path:line
    Why it matters: ...
    Suggested fix: ...

Severity:

- `P0` - data loss, security break, or code that cannot ship
- `P1` - likely bug, broken contract, missing guard, or high-risk duplication
- `P2` - maintainability issue worth fixing before the feature closes
- `P3` - small cleanup, consistency issue, or follow-up candidate

Use P0 or P1 only when a concrete code path, violated contract or security
boundary, failing command or test, or reproducible behavior confirms the risk. If
the evidence is incomplete, list it under `Unverified risks` with the missing
validation instead of presenting it as a confirmed high-severity finding.
An otherwise pure proportionality finding is P2 or P3. Raise it to P0 or P1 only
when the unnecessary machinery causes a concrete reachable defect or violates an
established security or data-integrity boundary.

If there are no findings, say that clearly for the selected lens and name any
remaining risk or missing signal, such as "no test command declared" or
"browser flow not audited."

Then include:

- ledger changes: findings added, updated, or closed this pass, by ID
- commands run and results
- selected scope
- selected lens or lenses
- base branch, merge base, and commit range for `current`, when available
- files or directories reviewed
- generated, third-party, or otherwise excluded paths
- applicable standards checked
- browser or runtime evidence inspected, when relevant
- skipped, focused, or placeholder tests found, when the tests lens was selected
- checks that were unavailable or could not run
- suggested repair order

For `full`, say whether coverage was complete or partial. Never label a partial
review as a full-project audit.

## Independent review

`/audit independent` (or `$audit independent`) gets a second opinion from a reviewer
that did not write the code. It includes a full current audit (Steps 1-5, scope
`current`), so it satisfies a selected Audit gate instead of repeating it.

Run it after the implementation steps are done and `Verify` and any required
`/check` pass. It reads the diff and the spec; it never edits code. Its writes are
the findings ledger (Step 4) and the `## Review` block below.

1. **Fix the target.** Compute the reviewed tree hash. Set `BRANCH` to the default
   branch (for example `main`) before running the block. The hash covers committed branch work, uncommitted edits, and untracked
   files, but not session-scoped workflow state, so ledger and handoff edits do not
   make a review stale. Excluded: `CONTEXT.md`, `.pawang/specs/`, `.pawang/handoff/`,
   `.pawang/runbooks/`, `.pawang/assessments/`. `.pawang/decisions/` and
   `.pawang/conventions/` stay in the hash on purpose: changing a rule or an Accepted
   decision should invalidate the review.

       BRANCH=main
       WF=":(exclude)CONTEXT.md :(exclude).pawang/specs :(exclude).pawang/handoff :(exclude).pawang/runbooks :(exclude).pawang/assessments"
       (git diff "$BRANCH" -- . $WF; \
        git ls-files -o --exclude-standard -z \
        | grep -zv -e '^CONTEXT\.md$' -e '^\.pawang/specs/' -e '^\.pawang/handoff/' \
                  -e '^\.pawang/runbooks/' -e '^\.pawang/assessments/' \
        | xargs -0 -r git hash-object --) | git hash-object --stdin

2. **Run the reviewer.** When the runtime can start the `reviewer` subagent
   (`.opencode/agents/reviewer.md`, installed by `/agents`), start it with a brief
   that contains only: the spec's goal and done-whens, the diff command above, and
   the files to judge against (`AGENTS.md`, `.pawang/conventions/`, `DESIGN.md` for UI).
   Never pass the builder's reasoning or self-assessment. Record `Mode: subagent`.
   When no subagent can be started, tell the user to open a fresh session and run
   `/audit independent` there; that session is the reviewer. Record
   `Mode: fresh session`.
3. **Record findings.** Add each reviewer finding to the ledger through Step 4:
   `BLOCKER` becomes P1 and `SARAN` becomes P3, with `Found: <date> by /audit
   independent (reviewer: <name>)`. A reviewer finding without `path:line` and a
   reason is not recorded.
4. **Write the review block** as `## Review` in the active spec file, after
   `## Findings`. Replace an existing block; never keep two.

       ## Review

       **Mode:** subagent | fresh session
       **Reviewer:** <agent name or session>
       **Reviewed tree:** <hash from step 1>
       **Reviewed at:** <UTC date>
       **Verdict:** passed | changes-requested
       **Notes:** <one line: what was checked, remaining risk>

   The verdict is `changes-requested` when the review produced any P0 or P1
   finding, otherwise `passed`.
5. **Freshness.** A review is current only while recomputing step 1 gives the same
   hash. Any later edit makes it stale and requires a new `/audit independent`.
   After repairs for a `changes-requested` verdict, mark the findings `fixed`
   through `/implement`, then run the review again.

`/complete` refuses to land with a missing, stale, or `changes-requested` review
when the gate is selected or a block already exists. This skill never waives that
gate; the user may cancel a pending review by deleting the block.

## Rules

- An audit writes only the `## Findings` ledger (and, in independent mode, `## Review`)
  of the active spec file in `.pawang/specs/`.
  Never edit, format, install, commit, merge, push, or delete anything else.
- A focused lens is not a broad audit. State what was not reviewed and never
  imply that omitted lenses passed.
- The ledger reports status; it never defines what the review looks at. Do not
  turn open findings into the review checklist.
- Never fetch, pull, or run network-backed audit tools without explicit approval.
- Never reproduce secrets or sensitive values in findings or command output.
- Findings first. Keep summaries short.
- Ground every finding in a file path and line number when possible.
- Avoid speculative rewrites. Recommend the smallest fix that removes the risk.
- Respect existing project patterns over generic advice.
- Do not require perfection. The goal is code that is understandable, consistent,
  testable where it matters, and safe to keep building on.

## Formatting

Format the output to match the project's conventions in
`AGENTS.md#communication`: concise, scannable markdown, with lists for
enumerations and tables for matrices rather than dense paragraphs.

Wersje

RepozytoriumWynikLicencja
Ta strona · pawangai/pawang-agents100MIT
marcel-bich/marcel-bich-claude-marketplace100MIT
jeremylongshore/tons-of-skills-marketplace100MIT
friendlyinternet/nuxt-crouton100MIT
userKael/rastro100MIT
Archont561/qgis-agent-harness100MIT
lilly-logic-labs/lll-skills100MIT
Come-In-Labs/agent-skills100MIT
minanyang/10x-agent100MIT

Migawka bazy z 13.11.2026 · wersja paczki a3e771662b0e (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 84review-code
    Recenzuje zmiany w kodzie pod kątem jakości, bezpieczeństwa i wydajności, w tym architektury i stylu, i ocenia, czy PR jest gotowy.
  • 100code-review-senior
    Analizuje zmiany pod kątem bezpieczeństwa, wydajności, jakości kodu, architektury i testów, jak senior inżynier.
  • 95memstack-development-code-reviewer
    Przegląda kod pod kątem jakości, bezpieczeństwa, wydajności i utrzymywalności, także w pull requestach.
  • 100code-reviewer
    Recenzuje pull requesty i zmiany w kodzie pod kątem jakości, bezpieczeństwa i dobrych praktyk.
  • 90code-review
    Przegląda kod i zmiany, analizuje pull requesty i ocenia jakość pod kątem poprawności, bezpieczeństwa, wydajności, dostępności i testów, także w przeglądzie bezpieczeństwa.
  • 100code-review
    Przegląda zmiany w kodzie z niezależnej perspektywy pod kątem jakości, poprawności, bezpieczeństwa i utrzymywalności.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.