freekmurze/dotfiles/spatie-package-skeleton
Claude Code and agent skill by freekmurze/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
Guide for creating PHP and Laravel packages using Spatie's package-skeleton-laravel and package-skeleton-php templates. Use when the user wants to create a new PHP or Laravel package, scaffold a package. Also use when building customizable packages — covers proven patterns for extensibility (events, configurable models/jobs, action classes) instead of config option creep.
Install
npx vskill@latest install freekmurze/dotfiles/spatie-package-skeletonSKILL.md
The same SKILL.md was published earlier as freekmurze/dotfiles/spatie-package-skeleton.
Creating a Laravel Package with Spatie's Skeleton
Prerequisites
ghCLI installed and authenticatedphpavailable in PATHcomposeravailable in PATH
Workflow
1. Gather Package Details
Ask the user for:
- Vendor name (e.g.
spatie) — the GitHub org or username - Package name (e.g.
laravel-cool-feature) — the repo/package name - Package description — one-liner for composer.json
- Visibility — public or private (default: public)
Use defaults where sensible:
- Author name: from
git config user.name - Author email: from
git config user.email - Author username: from
gh auth status - Vendor namespace: PascalCase of vendor name (e.g.
Spatie) - Class name: TitleCase of package name without
laravel-prefix (e.g.CoolFeature)
2. Create the Repository from Template
If the user wants a private repo, use --private instead of --public.
3. Configure the Package (Manual Replacement)
WARNING: Do NOT pipe stdin to configure.php. The script's child processes (gh auth status, git log, git config) consume lines from the piped stdin, causing inputs to shift and produce garbled results. Instead, do the replacements manually:
- Run
sedto replace all placeholder strings across the repo:
Important: The order of -e flags matters. Replace :package_slug_without_prefix before :package_slug to avoid partial matches. Replace Skeleton (PascalCase) before skeleton (lowercase).
- Rename the skeleton files:
- Delete
configure.phpand runcomposer install:
Use a longer timeout (5 minutes) for composer install.
4. Verify Setup
After the script completes:
5. Initial Commit and Push
The configure script modifies all files but doesn't commit. Create the initial commit:
6. Report to User
Tell the user:
- The repo URL (e.g.
https://github.com/<vendor>/<package-name>) - The namespace (e.g.
VendorNamespace\ClassName) - Key files to start editing:
src/<ClassName>.php— main package classsrc/<ClassName>ServiceProvider.php— service providerconfig/<package-slug>.php— configurationtests/— test directory
Detailed references
Load these as needed:
- Post-setup reference:
references/post-setup.md. What the skeleton generated and what to do with it. - Package patterns:
references/package-patterns.md. API design principles, and proven extensibility patterns (events, configurable models and jobs, action classes) instead of config option creep.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingconfig/claude/skills/spatie-package-skeleton/SKILL.md
Popularity
- Repository stars
- 947
- Repository forks
- 198
- 7-day trend score
- 34
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/freekmurze/dotfiles/spatie-package-skeleton)