gen-controller

Generates Spring SSR Controllers and Mustache templates following project conventions.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng --skill gen-controller-velkaressiablutkrone
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gen-controller
Source: https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng/tree/main/.claude/skills/gen-controller
Command: npx skills add https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng --skill gen-controller-velkaressiablutkrone

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually writing Spring MVC SSR Controllers and Mustache templates for each new domain is repetitive and error-prone, especially when strict project conventions (annotation order, session injection, template layout partials) must be followed. This Skill interviews the user for the target domain and required pages, then generates convention-compliant code automatically. ## Core Features & Use Cases - Convention-Enforced Controller Generation: Creates @Controller classes with @RequiredArgsConstructor, constructor-injected HttpSession, and String return values pointing to Mustache template paths. - Mustache Template Scaffolding: Generates list, detail, save-form, and update-form templates using layout/header and layout/footer partials. - Guided Interview Flow: Collects the target domain, required pages, and authentication needs one question at a time, skipping questions when the user already provided enough information. - Use Case: When adding a new Board domain to a Spring Boot project, ask for a controller and receive BoardController.java plus four Mustache templates placed in the correct source directories. ## Quick Start Ask the assistant to create a controller and pages for the Board domain with list, detail, and save-form pages.

Frequently Asked Questions about gen-controller

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

FAQPage Schema
How do I generate a Spring MVC Controller with Mustache templates?▼

Provide the target domain name and the pages you need (list, detail, save-form, update-form). The skill generates a @Controller class returning Mustache template paths plus the corresponding template files under src/main/resources/templates.

What conventions does the generated Spring Controller follow?▼

The controller uses @RequiredArgsConstructor above @Controller, injects HttpSession via the constructor, returns String template paths, and keeps REST endpoints out of the class. Templates use layout/header and layout/footer partials.

Can this skill generate REST API endpoints?▼

No. REST API endpoints are intentionally excluded from this skill. Use the separate gen-api-controller skill for @RestController classes; this skill only produces SSR controllers returning Mustache views.

What prerequisites are needed before generating a controller?▼

The domain's Service class must already exist, and the layout partials (layout/header, layout/footer) should be present in the templates directory. The skill notifies you if either is missing instead of generating broken code.

Where are the generated controller and template files placed?▼

The controller goes to src/main/java/com/example/ajax_demo/{domain}/{Domain}Controller.java, and templates go to src/main/resources/templates/{domain}/ as list, detail, save-form, and update-form Mustache files.