Help us improve
Share bugs, ideas, or general feedback.
From marko-skills
Scaffold a new Marko Composer package with composer.json, namespaced src/, Pest tests, and optional module.php.
npx claudepluginhub marko-php/marko --plugin marko-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/marko-skills:create-moduleThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
A Marko module is a Composer package that the framework auto-discovers via the `extra.marko.module` flag. Modules can live anywhere — `packages/{name}/` in the monorepo, `vendor/{vendor}/{package}/` once installed from Packagist, or `app/{Module}/` inside a project. The layout is identical in every case.
Guides PHP Composer for dependency management, PSR-4 autoloading setup, package creation, version constraints, and modern project organization patterns.
Creates Marko plugins — classes that intercept method arguments or return values via #[Before] and #[After] attributes, without subclassing. Auto-discovered from src/.
Scaffolds boilerplate for APIs (FastAPI, Express), web apps (Next.js, Nuxt, SvelteKit), CLI tools, libraries, monorepos with best-practice stacks and directory structures.
Share bugs, ideas, or general feedback.
A Marko module is a Composer package that the framework auto-discovers via the extra.marko.module flag. Modules can live anywhere — packages/{name}/ in the monorepo, vendor/{vendor}/{package}/ once installed from Packagist, or app/{Module}/ inside a project. The layout is identical in every case.
This skill is the canonical specification for a Marko module. Do not inspect existing modules in this project to infer layout — siblings may have drifted from spec. Copy the templates from assets/ verbatim, substitute placeholders, and stop.
packages/{name}/ (e.g. packages/payment/)vendor/{vendor}/{name}/app/{Module}/ inside the host projectThe composer name is {vendor}/{name} (e.g. marko/payment, acme/payment). The PHP namespace is the StudlyCase form: Marko\Payment, Acme\Payment.
Copy assets/composer.json.tmpl (or assets/composer.json.monorepo.tmpl if working in the marko monorepo) to <module-root>/composer.json and substitute {{vendor}} and {{name}} (lowercase) and {{Vendor}} and {{Name}} (StudlyCase) placeholders.
Required keys: name, type: marko-module, require.marko/core, psr-4 autoload, and extra.marko.module: true to flag it for the code indexer. Never set a version field — let Composer infer it from the branch.
In the monorepo, use assets/composer.json.monorepo.tmpl which uses self.version for all marko/* requirements.
{module-root}/
composer.json
src/ # PSR-4 source
tests/
Pest.php # Pest bootstrap
Unit/
Feature/
README.md # Slim pointer per docs/DOCS-STANDARDS.md
Copy assets/Pest.php.tmpl to tests/Pest.php. No placeholder substitution needed.
module.php is optional. Only create it if the module needs explicit DI bindings (interface → concrete class wiring), singleton declarations, or boot callbacks for lifecycle hooks.
If the module is just classes that auto-resolve, omit module.php entirely. Do not create an empty manifest.
When you do need it, copy assets/module.php.tmpl to <module-root>/module.php and substitute {{Vendor}} and {{Name}} placeholders.
Copy assets/README.md.tmpl to <module-root>/README.md and substitute {{vendor}} and {{name}} placeholders.
Per docs/DOCS-STANDARDS.md, package READMEs are slim pointers — title, install command, one quick example, and a link to the full docs page. Substantive documentation belongs in docs/src/content/docs/packages/{name}.md, not the README.
After installing or registering the module, call the MCP tool list_modules. The new module should appear in the list. If not, check that:
composer.json has extra.marko.module: truecomposer dump-autoload or composer update)After writing files, expect LSP diagnostics from marko-lsp to surface in the same turn. Resolve all diagnostics before declaring the module complete — diagnostics are the verification gate, not optional warnings. Then call the list_modules MCP tool to confirm the module is discovered by the framework.
declare(strict_types=1);final classes (blocks Preferences extensibility)readonly where immutability is appropriate, not as a blanket rulemarko-create-plugin skillmarko/database package docs