---
name: package-audit
origin: alex-kassel/laravel-package-audit
version: 1.2.1
status: published
description: >-
  Use this skill EXCLUSIVELY when the user explicitly requests a full package audit and release certification (e.g., "проведи полный аудит пакета", "полный аудит перед релизом", "audit package", "certify package").
title: package-audit
canonical_url: https://skilld.dev/gh/alex-kassel/laravel-package-audit
last_updated: 2026-09-29T02:46:12.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> 37 supporting files sit beside this SKILL.md. When the Skill refers to one, fetch https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/PATH with PATH replaced.
>
> If the user asked to install this Skill, run `npx skilld install alex-kassel/laravel-package-audit/laravel-package-audit`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/laravel-package-audit`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/alex-kassel/laravel-package-audit/laravel-package-audit) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/laravel-package-audit`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/laravel-package-audit --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/laravel-package-audit --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Package Audit & Release Certification Skill

> [!IMPORTANT]
> **AUDIT ACTIVATION CONTRACT & TOKEN CONSERVATION RULE**:
> This skill is an expensive, high-rigor governance procedure reserved strictly for formal release certification.
> - **DO NOT INVOKE OR EXECUTE THIS SKILL** during routine feature development, bugfixing, refactoring, or patch updates (`1.2.0` -> `1.2.1`).
> - For everyday quality checks, use `php artisan package:check <pkg> --quick` or `composer test` instead.
> - Execute this procedure **ONLY** when the human user explicitly instructs: *"проведи полный аудит"*, *"подготовь релизную сертификацию"*, *"certify package for release"*.

---

## Directory Structure & Resources

- [**Master Orchestrator Guide**](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/references/orchestrator.md): Lifecycle coordination, 3-section reporting protocol, and remediation rules.
- [**7 Specialized Audit Contracts**](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/references/contracts):
  - [`01_architecture_api.md`](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/references/contracts/01_architecture_api.md) — Public API surface, "Laravel First" abstractions, Octane safety, BC safety.
  - [`02_code_quality.md`](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/references/contracts/02_code_quality.md) — Strict types, PHPStan Level 8+/max, Pint formatting.
  - [`03_database.md`](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/references/contracts/03_database.md) — Migrations, table prefixes, multi-DB compatibility.
  - [`04_security_isolation.md`](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/references/contracts/04_security_isolation.md) — Container hijacking prevention, secret leaks, injection protection.
  - [`05_composer_supply_chain.md`](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/references/contracts/05_composer_supply_chain.md) — `composer validate --strict`, export-ignore, lockfile hygiene.
  - [`06_testing_compatibility.md`](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/references/contracts/06_testing_compatibility.md) — PHPUnit/Pest coverage, test isolation, Testbench.
  - [`07_consumer_release.md`](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/references/contracts/07_consumer_release.md) — Fresh sandbox smoke test, README quickstart, `AUDIT.json`.
- **Templates**:
  - Manifest Template: [`resources/templates/audit-manifest.template.json`](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/resources/templates/audit-manifest.template.json)
- **Local Run Artifacts**: Stored in target package `.audit/<timestamp>/` (gitignored).

---

## Operational Workflow

### Phase 0: Tooling Verification & Self-Bootstrapping
When explicitly invoked by the human user, check if `php artisan package:audit` is available:
```bash
php artisan list package:audit
```
- **If available**: Proceed directly to Phase 1.
- **If missing (Self-Bootstrapping)**:
  Install the audit engine into `require-dev`:
  ```bash
  composer require --dev alex-kassel/laravel-package-audit
  ```
- **Direct CLI Fallback**: If the environment prevents installing composer packages, directly execute the underlying tools (`vendor/bin/pint --test`, `vendor/bin/phpstan`, `vendor/bin/phpunit`, `composer validate --strict`).

---

### Phase 1: Cognitive Audit & Mandatory Human Gate (Read-Only)

1. **Mechanical Baseline Diagnosis**:
   Run the package audit in inspect mode (no certification issued):
   ```bash
   php artisan package:audit <path/to/package> --json --no-commit
   ```
2. **Cognitive Domain Evaluation**:
   Inspect the package code against the 7 specialized contracts in [`references/contracts/`](https://skilld.dev/api/skills-raw/alex-kassel/laravel-package-audit/laravel-package-audit/references/contracts).
3. **Compile Local Review Artifacts**:
   Store diagnostic details in `.audit/<timestamp>/`:
   - `01_baseline_inspection.md`
   - `02_remediation_plan.md`
4. **Compile Structured 3-Section Report for the Human**:
   - **Section 1: Baseline Findings & Risk Assessment**
   - **Section 2: Planned Automated Fixes**
   - **Section 3: Architectural Decisions Requiring Explicit Choice**
5. **🛑 MANDATORY STOP (Human Gate)**:
   **DO NOT PROCEED. DO NOT MODIFY CODE. DO NOT GENERATE CERTIFICATE.**
   Present the report to the user and wait for explicit confirmation.

---

### Phase 2: Remediation, Commit & Cryptographic Certification

Once the human user confirms and approves the plan:
1. **Apply Atomic Remediation**:
   Execute the approved fixes in logical order (Code Quality -> Architecture -> Tests -> Docs).
2. **Create Release Commit**:
   Stage changes and create a clean git commit representing the audited release milestone:
   ```bash
   git add .
   git commit -m "release: prepare audited release v{version}"
   ```
3. **Mechanical Verification & Cryptographic Certification**:
   Execute final certification against the committed state:
   ```bash
   php artisan package:audit <path/to/package> --target-version={version}
   ```
   This issues the tamper-proof **`AUDIT.json`** anchored to the immutable Git `tree_hash` and commit.
4. **Archive Run Artifacts**:
   Save `FINAL-REPORT.md` into `.audit/<timestamp>/` for local audit trail.