From redaxo-core
Scaffolds new REDAXO CMS modules with PHP input forms using REX_INPUT_VALUE and escaped output via REX_VALUE placeholders. Prompts for name, fields like text/media/link, and output style.
npx claudepluginhub friendsofredaxo/claude-marketplace --plugin redaxo-coreThis skill uses the workspace's default tool permissions.
You are helping the user scaffold a new REDAXO module. A module has two parts:
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Executes ctx7 CLI to fetch up-to-date library documentation, manage AI coding skills (install/search/generate/remove/suggest), and configure Context7 MCP. Useful for current API refs, skill handling, or agent setup.
Share bugs, ideas, or general feedback.
You are helping the user scaffold a new REDAXO module. A module has two parts:
name="REX_INPUT_VALUE[N]")'REX_VALUE[N]', always with rex_escape())Ask the user for:
text – single-line texttextarea – multi-line textwysiwyg – rich text (escape with 'html_simplified' on output)media – single image/file (uses REX_MEDIA[N] widget)medialist – multiple media (uses REX_MEDIALIST[N])link – single internal link (uses REX_LINK[N])linklist – multiple internal links (uses REX_LINKLIST[N])Verify limits: at most 20 REX_VALUE slots, 10 each of REX_MEDIA, REX_MEDIALIST, REX_LINK, REX_LINKLIST. If the user wants more, suggest storing JSON in one REX_VALUE slot or recommending the yform addon.
Generate two files:
<name>_input.php – the editor form, using class="form-control" Bootstrap-style markup that REDAXO ships with in the backend.<name>_output.php – the frontend rendering. Every value touched by an editor must go through rex_escape() with the right strategy.Wrap the input in a <fieldset> with a <legend> matching the module name, so the editor view stays organized.
For media output, look up the rex_media instance to get dimensions and alt text:
<?php if ($filename = 'REX_MEDIA[1]') { $media = rex_media::get($filename); } ?>
<?php if ($media): ?>
<img src="<?= rex_url::media($media->getFileName()) ?>"
alt="<?= rex_escape($media->getTitle()) ?>"
width="<?= $media->getWidth() ?>"
height="<?= $media->getHeight() ?>">
<?php endif; ?>
rex_article:<?php $articleId = (int) 'REX_LINK[1]'; $article = $articleId ? rex_article::get($articleId) : null; ?>
<?php if ($article): ?>
<a href="<?= $article->getUrl() ?>"><?= rex_escape($article->getName()) ?></a>
<?php endif; ?>
Output the two files as separate code blocks the user can copy into the REDAXO backend (Modules → Add new module). Add a short comment at the top of each block: <?php // Input and <?php // Output.
Don't write to disk – modules are stored in the database, not as files. The user pastes the code into the backend UI.
After generating, briefly explain what you produced and remind them to clear the REDAXO cache after creating the module if it's already in use.