package-dev
БесплатноБез исполняемых скриптовНе проверенComplete Laravel package development skill — scaffolds package directory structure with src, config, migrations, tests, README, and CHANGELOG; generates…
от nasrulhazim★ 26 звёзд на GitHubОб этом скилле
Package Development Skill
Scaffold, test, document, and release production-quality Laravel/PHP packages — from initial directory structure through Packagist publishing. Follows Laravel ecosystem conventions and integrates with Orchestra Testbench for package testing.
Command Reference
| Command | Description |
|---|---|
/package scaffold |
Generate complete package directory structure with all boilerplate files |
/package test |
Set up Pest test suite with Orchestra Testbench integration |
/package release |
Run release checklist: version bump, changelog, git tag, Packagist |
/package readme |
Generate professional README with badges, installation, usage, and testing sections |
/package upgrade |
Upgrade PHP/Laravel version constraints and dependencies |
1. /package scaffold — Generate Package Structure
Step 1: Gather Package Information
Ask the user for:
- Vendor name — always ask, default:
cleaniquecoders - Package name — kebab-case, all lowercase (e.g.
laravel-helper,profile) - Package type — Laravel package or pure PHP package
- Package description (one-liner for composer.json)
- PHP minimum version (default:
^8.4) - Laravel version constraint (default:
^12.0, Laravel packages only) - Namespace (default: derived from vendor/package, e.g.
CleaniqueCoders\Profile) - Features to include (config, migrations, views, routes, commands — pick applicable ones)
If the user already provided context, extract what you can and only ask for what is missing.
Skeleton Templates
Use Spatie's skeleton templates to scaffold the package:
- Laravel package: Clone from spatie/package-skeleton-laravel
- PHP package: Clone from spatie/package-skeleton-php
After cloning, run the skeleton's configure script to replace placeholders with the actual vendor name, package name, namespace, and author details.
Step 2: Generate Directory Structure
Create the following structure:
packages/vendor/package-name/
├── src/
│ ├── PackageNameServiceProvider.php
│ ├── Facades/
│ │ └── PackageName.php
│ ├── Actions/
│ ├── Concerns/
│ └── Contracts/
├── config/
│ └── package-name.php
├── database/
│ ├── factories/
│ └── migrations/
├── resources/
│ └── views/
├── routes/
│ └── web.php
├── tests/
│ ├── Pest.php
│ ├── TestCase.php
│ └── Feature/
├── stubs/
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── composer.json
└── phpunit.xml
Only include directories for features the user selected. Always include src/, tests/,
composer.json, README.md, CHANGELOG.md, and LICENSE.
Step 3: Generate composer.json
Read references/package-structure.md for the full template. Key sections:
{
"name": "vendor/package-name",
"description": "Package description here",
"keywords": ["laravel", "php"],
"license": "MIT",
"require": {
"php": "^8.4",
"illuminate/support": "^12.0"
},
"require-dev": {
"orchestra/testbench": "^10.0",
"pestphp/pest": "^5.0",
"pestphp/pest-plugin-laravel": "^5.0",
"laravel/pint": "^1.0"
},
"autoload": {
"psr-4": {
"Vendor\\PackageName\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Vendor\\PackageName\\Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"providers": [
"Vendor\\PackageName\\PackageNameServiceProvider"
],
"aliases": {
"PackageName": "Vendor\\PackageName\\Facades\\PackageName"
}
}
},
"config": {
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
Step 4: Generate ServiceProvider
Read references/package-structure.md for the full ServiceProvider patterns. The provider must:
- Extend
Illuminate\Support\ServiceProvider - Use
register()for bindings and merging config - Use
boot()for publishing assets, loading routes, views, migrations, and commands - Include conditional
if ($this->app->runningInConsole())blocks for publishable assets - Group publishes with tags:
{package-name}-config,{package-name}-migrations, etc.
Step 5: Generate Facade
<?php
declare(strict_types=1);
namespace Vendor\PackageName\Facades;
use Illuminate\Support\Facades\Facade;
/**
* @see \Vendor\PackageName\PackageName
*/
class PackageName extends Facade
{
protected static function getFacadeAccessor(): string
{
return \Vendor\PackageName\PackageName::class;
}
}
Step 6: Generate Config File
<?php
return [
// Package configuration options
];
Step 7: Generate Starter Files
Generate .gitignore, LICENSE (MIT),
Установить package-dev в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл package-dev?
Complete Laravel package development skill — scaffolds package directory structure with src, config, migrations, tests, README, and CHANGELOG; generates service providers, facades, config publishing patterns; sets up Pest test suites with Orchestra Testbench integration; manages release workflows including version bumps, changelog updates, git tags, and Packagist publishing; generates professional README files with badges, installation instructions, usage examples, testing commands, and changelog sections. Use this skill whenever the user asks to create a Laravel package, scaffold a PHP package, set up a Composer library, generate a service provider, add facade support, configure Testbench tests, prepare a package release, write a package README, publish to Packagist, or manage package versioning — including: "create a new Laravel package", "scaffold package structure", "set up package tests", "prepare a release", "generate package README", "add a facade to my package", "configure Testbench", "publish my package", "buat package Laravel baru", "scaffold struktur package", "sediakan test untuk package", "sediakan release", "jana README package", "tambah facade", "konfigurasi Testbench", "terbitkan package ke Packagist", "uruskan versioning package", "upgrade Laravel version", "bump PHP version constraint", "update package dependencies", "naik taraf versi Laravel", "kemaskini versi PHP", or "upgrade dependencies package".
Как установить скилл package-dev?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл package-dev запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic