Skip to content
Back to skills

Dhpk Composer Package Hygiene

ASecurity

Composer-published package contract review. Use when: deciding semver, auditing public API or composer.json, validating Laravel package discovery, or coordinating a package release. Not for: everyday application code, language idioms, or Laravel-specific authoring mechanics. Output: a contract verdict, audited manifest, or release gate backed by the package-contract reference.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentsphpgitapi

Works with

  • api

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add hmj1026/dhpk --skill dhpk-composer-package-hygiene --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dhpk Composer Package Hygiene?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dhpk Composer Package Hygiene
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hmj1026-dhpk-composer-package-hygiene-dhpk/badge)](https://www.skillsdirectory.com/skills/hmj1026-dhpk-composer-package-hygiene-dhpk)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dhpk-composer-package-hygiene
description: 'Composer-published package contract review. Use when: deciding semver, auditing public API or composer.json, validating Laravel package discovery, or coordinating a package release. Not for: everyday application code, language idioms, or Laravel-specific authoring mechanics. Output: a contract verdict, audited manifest, or release gate backed by the package-contract reference.'
metadata:
  dhpk-invocation-class: implicit-eligible
---

# Composer package hygiene

Use this skill for PHP packages installed by downstream projects. Treat every public
symbol, `composer.json` entry, published artifact, tag, and registry release as one
consumer-facing contract.

## Working sequence

1. Load `references/package-contracts.md` and select the branch that matches the task.
2. Inspect the package's declared PHP/dependency floors, public symbols, autoload maps,
   Laravel discovery metadata, and release files before choosing a change.
3. Classify compatibility from the contract rules, not from author intent or the
   current resolver result alone.
4. Run the branch-specific checks in the verification gate below and report any
   unavailable consumer or registry check as blocked rather than green.

## Contract branches

- Semver or public API change → `package-contracts.md` §Semver and §Public API surface.
- `composer.json`, autoload, or dependency change → §composer.json hygiene.
- Laravel providers, aliases, or facade discovery → §Laravel package discovery.
- Changelog, tag, or Packagist publication → §Release flow.

## When NOT to Use

- Application code that is never published to downstream consumers.
- Language-level idiom selection; use `skills/dhpk-php-modern-pro`.
- Laravel service-provider, facade, publishing, or Testbench mechanics; use
  `dhpk-laravel-package-author` or `dhpk-laravel-testbench-matrix`.
- A release workflow that does not publish a Composer package.

## Output

Return one of:

- a semver verdict (`major`, `minor`, or `patch`) with the contract evidence;
- an audited `composer.json` covering constraints, autoload, plugins, suggestions, and
  Laravel discovery metadata; or
- a release gate showing the CHANGELOG, tag, GitHub release, package matrix, and
  registry state.

## Verification

- [ ] The relevant section of `package-contracts.md` was loaded before judging.
- [ ] Every changed public symbol has an intentional `@api` / `@internal` status and
  its dependency types are included in the compatibility decision.
- [ ] `composer validate --strict` passes.
- [ ] Lowest supported dependency floors and the declared PHP/framework matrix pass.
- [ ] Laravel packages pass `php artisan package:discover --ansi` in a fresh consumer
  install, with a facade smoke test when aliases are present.
- [ ] A release has a matching versioned CHANGELOG entry, tag, GitHub release, and
  registry visibility; missing external evidence is reported as blocked.

## References

- `references/package-contracts.md` — semver, public API, composer.json, Laravel
  discovery, and release contract details; load only the branch being used.
- `skills/dhpk-php-modern-pro/SKILL.md` — PHP language and dual-floor idioms.
- `skills/dhpk-laravel-package-author/SKILL.md` — Laravel package authoring mechanics.
- `skills/dhpk-laravel-testbench-matrix/SKILL.md` — per-major Testbench matrix mechanics.

Files in this skill

  • SKILL.md3.3 KB
  • references/package-contracts.md3.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.