paw-webapp-layer
Manages webapp layer components for PAW Forkd, including MVC, Spring Security, and REST migration.
Install
mkdir -p .claude/skills/paw-webapp-layer && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11278" && unzip -o skill.zip -d .claude/skills/paw-webapp-layer && rm skill.zipInstalls to .claude/skills/paw-webapp-layer
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use when creating, changing, auditing, or reviewing PAW Forkd webapp controllers, forms, validators, JSP/JSTL views, i18n bundles, Spring Security routes, CSS/JS, uploads, redirects, MVC tests, REST resources, or SPA static-hosting work across TP1 and TP final.Key capabilities
- →Create webapp controllers, forms, and validators
- →Manage JSP/JSTL views and i18n bundles
- →Configure Spring Security routes and webapp CSS/JS
- →Handle uploads, redirects, and MVC tests
- →Develop REST resources and API error mapping
- →Integrate SPA static-hosting work across TP1 and TP final
How it works
This skill guides the development and auditing of webapp components by enforcing layering rules and specific workflows for MVC and REST architectures. It ensures adherence to security and design guidelines.
Inputs & outputs
When to use paw-webapp-layer
- →Edit webapp controller
- →Update Spring Security config
- →Migrate JSP to REST resource
- →Manage i18n bundles
About this skill
Paw Webapp Layer
Overview
Use this for webapp/: TP1 controllers, forms, validation, JSP/JSTL, i18n, Spring Security, filters, webapp CSS/JS, and MVC tests. In TP final, use it for REST resources, API error mapping, auth/web security, CORS, SPA static hosting, and WAR asset integration after $paw-tp-final-migration sets the plan. Use $paw-frontend-layer for SPA source under frontend/.
Read references/layer-rules.md before editing webapp.
Workflow
- Inspect
CLAUDE.md, affected controller/form/JSP/tests, andDESIGN.mdfor UI changes; for TP final also readresumen-final-paw-2026andchecklist-tp-final-rest-spa. - Resolve stage: TP1 uses MVC/JSP; TP final may use REST resources plus SPA assets.
- Keep controllers/resources thin: bind/deserialize, validate, delegate once, return view/redirect or HTTP response/status/header/body.
- Put validation in form annotations/custom JSR380 validators for MVC; keep REST input validation and API errors explicit for final.
- Keep authorization declarative in
WebAuthConfigplusAccessHelperexpressions; update JSP visibility with Spring Security taglib when JSP remains. - Render JSP safely with
<c:out>,<c:url>,<spring:message>, and private views underWEB-INF. - Preserve GET state and inline validation behavior already expected by MVC flows.
- For TP final migration, work only inside the current vertical slice from
$paw-tp-final-migration: REST contract, SPA route/static hosting, tests, and rollback state must match that slice. - Route SPA source code, API client, router, stores/composables, frontend i18n, and frontend tests to
$paw-frontend-layer. - Test routes, bindings, security, redirects/status codes, i18n, template safety, or API contracts as applicable.
Web Rules
- No SQL,
java.sql, business orchestration, or domain ownership decisions in controllers. - No scriptlets or Java code in JSPs.
- No raw
${...}for dynamic user content; use<c:out>or escaping helpers. - No free redirects; use
SafeRedirectPathValidator. - Do not mix
@PreAuthorizewith URL rules unless the existing flow already chose that pattern. - Use shared JSP fragments/tags and
forkd.cssbefore adding local markup or inline styles. - For visual work, read
DESIGN.mdfirst. - For TP final SPA/API work, use
$paw-tp-final-migrationfirst; do not graft a frontend build or JWT flow into TP1 by accident. - For SPA source work under
frontend/, use$paw-frontend-layer; webapp owns hosting/integration, not component/store/router implementation. - TP final JAX-RS resources live under
/api/*, expose DTOs/forms only, and buildLocation, relation links,Link, andETagwith request-aware URI helpers. - API errors are JSON Problem Details (
type,title,status,detail,instance);/api/*404 stays JSON, while SPA fallback servesindex.htmlonly for non-API deep links. - If the SPA reads
Location,Link,ETag,X-Access-Token, orX-Refresh-Token, expose them explicitly through CORS. - Cache dynamic API responses with validators (
ETag/If-None-Match/304) only when semantically valid. Cache only hashed static assets as long-livedimmutable; keepindex.html/root revalidated or short-lived. - TP final packaging must keep one WAR with API,
index.html, hashed JS/CSS/assets, and backend classes; Maven must build frontend beforewebapp. - Do not remove the old JSP route for a migrated flow until the slice has green API/resource tests, SPA route verification, and package/static-hosting checks or an explicit rollback decision.
- Admin and owner restaurant forms share
WEB-INF/views/shared/restaurant-form-body.jspf; keep them aligned. - Upload errors go through
MultipartRequestSizeFilterandErrorHandlingAdvice.
Verification
- Focused MVC tests:
mvn -pl webapp -am -Dtest=<MvcTestName> -Dsurefire.failIfNoSpecifiedTests=false test. - Webapp suite:
mvn -pl webapp -am test. - Cross-layer feature:
mvn clean test. - TP final package gate:
mvn clean package, then inspect the WAR forindex.html, JS/CSS/assets, andWEB-INF/classes. - WAR inspection example:
jar tf webapp/target/*.war | rg '(^|/)index.html$|assets/|static/|WEB-INF/classes'. - Local smoke when needed:
mvn -pl webapp -am jetty:run -Dsecurity.rememberme.key="$(openssl rand -base64 48)".
When not to use it
- →When working on SPA source code under `frontend/`
- →When the task involves SQL, `java.sql`, business orchestration, or domain ownership decisions in controllers
- →When using scriptlets or Java code in JSPs
Limitations
- →No SQL, `java.sql`, business orchestration, or domain ownership decisions in controllers
- →No scriptlets or Java code in JSPs
- →No raw `${...}` for dynamic user content; use `<c:out>` or escaping helpers
How it compares
This skill provides a structured workflow and enforces specific rules for webapp development, ensuring architectural consistency and security, unlike ad-hoc development.
Compared to similar skills
paw-webapp-layer side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| paw-webapp-layer (this skill) | 0 | 3mo | No flags | Advanced |
| java-pro | 34 | 4mo | No flags | Advanced |
| java-coding-standards | 16 | 4mo | No flags | Intermediate |
| jpa-patterns | 3 | 5mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
java-pro
sickn33
Master Java 21+ with modern features like virtual threads, pattern matching, and Spring Boot 3.x. Expert in the latest Java ecosystem including GraalVM, Project Loom, and cloud-native patterns. Use PROACTIVELY for Java development, microservices architecture, or performance optimization.
java-coding-standards
affaan-m
Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.
jpa-patterns
affaan-m
JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.
backend-microservice-development
TencentBlueKing
后端微服务开发规范,涵盖目录结构、分层架构(API/Service/DAO)、依赖注入、配置管理、Spring Boot 最佳实践。当用户进行后端开发、创建新微服务、编写 Kotlin/Java 代码或设计服务架构时使用。
microservice-infrastructure
TencentBlueKing
微服务基础设施指南,涵盖条件配置、事件驱动架构、服务间通信、国际化与日志等微服务架构的核心基础设施。当用户实现服务间调用、配置多环境、实现异步通信、处理国际化或规范日志输出时使用。
common-technical-practices
TencentBlueKing
通用技术实践指南,涵盖 AOP 切面、分布式锁、重试机制、参数校验、性能监控、定时任务、审计日志等后端开发中的常见技术实践。当用户需要实现横切关注点、处理并发控制、配置重试策略、添加性能监控或实现审计功能时使用。