PA

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.zip

Installs 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.
261 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Advanced

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

You give it
request to create, change, audit, or review webapp components
You get back
modified or new webapp controllers, views, security configurations, or REST resources

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

  1. Inspect CLAUDE.md, affected controller/form/JSP/tests, and DESIGN.md for UI changes; for TP final also read resumen-final-paw-2026 and checklist-tp-final-rest-spa.
  2. Resolve stage: TP1 uses MVC/JSP; TP final may use REST resources plus SPA assets.
  3. Keep controllers/resources thin: bind/deserialize, validate, delegate once, return view/redirect or HTTP response/status/header/body.
  4. Put validation in form annotations/custom JSR380 validators for MVC; keep REST input validation and API errors explicit for final.
  5. Keep authorization declarative in WebAuthConfig plus AccessHelper expressions; update JSP visibility with Spring Security taglib when JSP remains.
  6. Render JSP safely with <c:out>, <c:url>, <spring:message>, and private views under WEB-INF.
  7. Preserve GET state and inline validation behavior already expected by MVC flows.
  8. 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.
  9. Route SPA source code, API client, router, stores/composables, frontend i18n, and frontend tests to $paw-frontend-layer.
  10. 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 @PreAuthorize with URL rules unless the existing flow already chose that pattern.
  • Use shared JSP fragments/tags and forkd.css before adding local markup or inline styles.
  • For visual work, read DESIGN.md first.
  • For TP final SPA/API work, use $paw-tp-final-migration first; 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 build Location, relation links, Link, and ETag with request-aware URI helpers.
  • API errors are JSON Problem Details (type, title, status, detail, instance); /api/* 404 stays JSON, while SPA fallback serves index.html only for non-API deep links.
  • If the SPA reads Location, Link, ETag, X-Access-Token, or X-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-lived immutable; keep index.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 before webapp.
  • 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 MultipartRequestSizeFilter and ErrorHandlingAdvice.

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 for index.html, JS/CSS/assets, and WEB-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.

SkillInstallsUpdatedSafetyDifficulty
paw-webapp-layer (this skill)03moNo flagsAdvanced
java-pro344moNo flagsAdvanced
java-coding-standards164moNo flagsIntermediate
jpa-patterns35moNo flagsIntermediate

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.

3492

java-coding-standards

affaan-m

Java coding standards for Spring Boot services: naming, immutability, Optional usage, streams, exceptions, generics, and project layout.

1669

jpa-patterns

affaan-m

JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

322

backend-microservice-development

TencentBlueKing

后端微服务开发规范,涵盖目录结构、分层架构(API/Service/DAO)、依赖注入、配置管理、Spring Boot 最佳实践。当用户进行后端开发、创建新微服务、编写 Kotlin/Java 代码或设计服务架构时使用。

213

microservice-infrastructure

TencentBlueKing

微服务基础设施指南,涵盖条件配置、事件驱动架构、服务间通信、国际化与日志等微服务架构的核心基础设施。当用户实现服务间调用、配置多环境、实现异步通信、处理国际化或规范日志输出时使用。

411

common-technical-practices

TencentBlueKing

通用技术实践指南,涵盖 AOP 切面、分布式锁、重试机制、参数校验、性能监控、定时任务、审计日志等后端开发中的常见技术实践。当用户需要实现横切关注点、处理并发控制、配置重试策略、添加性能监控或实现审计功能时使用。

26

Search skills

Search the agent skills registry