Skip to content
Skill

Create module

Scaffolds a new Marko module as a Composer package with src, Pest tests and config

Create module is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
416
Last commit
License
MIT
Listing updated

Similar skills

About Create module

This skill walks the agent through creating a new Marko module, which is a self-contained Composer package that the framework discovers through an extra.marko.module flag. It covers choosing where the module lives (app-local, distributable under modules/, or inside the framework monorepo), naming rules that keep directories and Composer names lowercase while the PHP namespace uses StudlyCase, and picking the right marko/core version constraint based on the host project's existing composer.json.

The workflow copies templates from the skill's assets folder for composer.json, the Pest bootstrap, a README pointer and an optional module.php that is only added when explicit bindings or boot callbacks are needed. It also sets out coding conventions to follow, such as strict types, constructor property promotion and avoiding final classes, plus guidance for driver modules that must throw an unsupported-feature exception for unsupported methods.

The skill assumes a Marko project and works with PHP and Composer. It states it does not cover writing plugins, routes or migrations, which are handled by other skills or the framework docs.

When your agent uses it

Scaffold a new Marko module — a self-contained Composer package with composer.json, namespaced src/, and Pest tests. **Use this skill whenever the user asks to create, add, or scaffold a new Marko module or package.** Concrete triggers: 'create a module named payment', 'scaffold an acme/blog package', 'add a new module for X', 'break this code out into its own package', 'I need a new module', 'make me a Marko module'. Marko makes no distinction between core and third-party modules: layout is identical.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 6 files (12 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the marko-skills plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add marko-php/marko
/plugin install marko-skills@marko

Or copy only this skill to ~/.claude/skills/create-module:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/marko-php/marko.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/create-module &&
cp -R "$tmp/packages/claude-plugins/plugins/marko-skills/skills/create-module" ~/.claude/skills/create-module &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/create-module inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/create-module to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/marko-php/marko.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/create-module &&
cp -R "$tmp/packages/claude-plugins/plugins/marko-skills/skills/create-module" ~/.agents/skills/create-module &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/create-module inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/create-module to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/marko-php/marko.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/create-module &&
cp -R "$tmp/packages/claude-plugins/plugins/marko-skills/skills/create-module" ~/.cursor/skills/create-module &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/create-module inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/marko-php/marko.git --path packages/claude-plugins/plugins/marko-skills/skills/create-module

Or copy the folder to ~/.gemini/skills/create-module yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/create-module:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/marko-php/marko.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/create-module &&
cp -R "$tmp/packages/claude-plugins/plugins/marko-skills/skills/create-module" ~/.copilot/skills/create-module &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/create-module inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/marko-php/marko.git

Then copy marko/packages/claude-plugins/plugins/marko-skills/skills/create-module into your agent's skills folder as create-module. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Module layout scaffolding
Creates the composer.json, src directory, Pest test folders and a slim README for a new module.
Tier and naming selection
Chooses app-local, distributable or monorepo placement and applies the lowercase directory and StudlyCase namespace rules.
Version constraint resolution
Matches the marko/core constraint to what the host project already declares.
Optional module.php setup
Adds DI bindings, argument overrides and boot callbacks only when the module needs them.
Driver exception guidance
Specifies how driver modules should report features they cannot support.
Coding conventions
Enforces strict types, constructor promotion, explicit typing and no magic methods.

Good for

  • Create a new Marko module named payment in my app
  • Scaffold a distributable acme/blog package for my host project
  • Break this code out into its own Marko package
  • Add a new module for handling user notifications

Create module FAQ

What does the skill need before Create module runs?

It needs a module name from the user; the skill asks for one rather than inventing it. It targets PHP projects that use Composer and Marko.

Does Create module create a module.php file every time?

No. module.php is optional and is only created when the module needs DI bindings, constructor arguments, singletons or boot callbacks.

Which marko/core version constraint does Create module use?

It reads the first marko/* constraint in the host project's composer.json and reuses it, defaulting to * when none is declared.

Does Create module cover plugins, routes or migrations?

No. The skill points to other skills and Marko docs for plugins, routes, observers, commands and database migrations.

How do I install Create module in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/create-module to use it in all your projects, or to .claude/skills/create-module in one project. Or install the marko-skills plugin, which includes it: /plugin marketplace add marko-php/marko, then /plugin install marko-skills@marko.

Does Create module run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Create module?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Create module?

The closest alternatives to Create module are Create plugin, Php MCP server generator, Release, Project scaffold and Skill creator.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from marko-php/marko

  1. Guides an agent through cutting a Marko release: audit PR labels, pick a version, then run

    • Open source
    • 416 GitHub stars
    • Developer tools
  2. Guides an agent to write Marko PHP plugins that intercept public methods with Before

    • Open source
    • 416 GitHub stars
    • Developer tools