create-shortcode

Generate a PHP Shortcode class extending BaseShortcode for StaticForge.

2|Updated Oct 25, 2025
One-click install
npx skills add https://github.com/calevans/staticforge --skill create-shortcode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-shortcode
Source: https://github.com/calevans/staticforge/tree/main/.opencode/skills/create-shortcode
Command: npx skills add https://github.com/calevans/staticforge --skill create-shortcode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of creating new dynamic content tags (shortcodes) within the StaticForge project, ensuring consistency and adherence to established patterns.

Core Features & Use Cases

  • Shortcode Generation: Automatically creates the boilerplate code for a new shortcode class.
  • Pattern Adherence: Ensures new shortcodes extend the BaseShortcode class and are correctly structured.
  • Use Case: When you need to add a new custom tag like [[image-gallery]] to your site content, use this skill to generate the necessary PHP class file.

Quick Start

Use the create-shortcode skill to scaffold a new shortcode named 'youtube'.

Frequently Asked Questions about create-shortcode

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create custom dynamic content tags for my static site generator?

To create custom dynamic content tags, you scaffold a new PHP shortcode class that extends the BaseShortcode pattern, generating the boilerplate code required for registration within the StaticForge project.

How do I add a new shortcode to my Markdown content in PHP?

Adding a new shortcode to Markdown content requires generating a new PHP class file extending BaseShortcode, which establishes the structural pattern and registration process for rendering dynamic tags like image galleries.

Can I use this scaffolding tool to generate PHP classes for any static site generator?

No, this scaffolding tool is designed specifically for the StaticForge project, as the generated PHP shortcode classes must adhere to its specific BaseShortcode class structure and project registration process.

What is the best way to ensure new shortcodes follow existing project patterns?

The best way to ensure pattern adherence is to use a scaffolding generator that automatically creates the boilerplate PHP class extending BaseShortcode, enforcing structural consistency across all new dynamic content tags.

Do I need to manually register a shortcode class after generating the PHP file?

Yes, after generating the PHP class file, you must complete the project's registration process so the static site generator can recognize and render the new shortcode tag within your Markdown content.