Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Phaedra-Solutions/cursor-rules --skill migrate-strutsgit clone --depth 1 https://github.com/Phaedra-Solutions/cursor-rulesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/phaedra-solutions/cursor-rules/migrate-struts)<a href="https://agentmods.dev/skills/phaedra-solutions/cursor-rules/migrate-struts"><img src="https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/migrate-struts/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/phaedra-solutions/cursor-rules/migrate-struts"><img src="https://agentmods.dev/badge/skills/phaedra-solutions/cursor-rules/migrate-struts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00120 | $0.01395 |
| Opus 5.5 | $0.00048 | $0.00558 |
| Sonnet 5.5 | $0.00024 | $0.00279 |
| Haiku 4.5 | $0.00012 | $0.00139 |
Grade A, and why
migrate-struts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Migrate off Apache Struts
When to use
- The project uses Struts 1 (EOL 2013) or an EOL Struts 2 line (2.3, 2.5), or the user wants to leave Struts.
- A Struts 2 security bulletin applies and the fix needs a newer line (7.4.0 or 6.12.0 as of Oct 2026).
Before you start
- Inventory (write it to
docs/struts-inventory.mdor the PR):- Struts version and plugins; Java version; servlet container;
- every action mapping (
struts.xml/struts-config.xml): URL, action class, form bean, validation, results/forwards, interceptors; - views (JSP, Tiles, FreeMarker), custom tags, file uploads, session attributes, filters and authentication.
- Ask the user:
- upgrade Struts 2 to a supported line, or replace the web tier (required for Struts 1; default target Spring MVC on Spring Boot 4.1, Java 21);
- whether a gateway or reverse proxy can route by path (for the strangler approach);
- whether new dependencies may be installed (
core/supply-chain).
- Contain the old app first if it's internet-facing (see the containment section of
legacy/struts): isolation, WAF rules,devModeoff. - Working tree clean; new branch.
Steps
A. Upgrade Struts 2 (2.5 → 6.x → 7.x)
- Bump
struts2-coreand allstruts2-*plugins together to 6.12.0; follow the 2.5 → 6 notes: Action File Upload interceptor for uploads (S2-066/067),@StrutsParameteroracceptParamNameswhere parameter annotations are required, removed deprecated tags and constants; keepdevMode=falseand Strict Method Invocation. - Run the tests and the security regression tests; deploy to staging.
- Then 7.4.0: Java 17+, Jakarta Servlet 6 container (Tomcat 10.1+),
com.opensymphony.xwork2→org.apache.struts2package renames,javax.servlet→jakarta.servlet(OpenRewriteorg.openrewrite.java.migrate.jakarta.JavaxMigrationToJakartahelps with the namespace). - Stop after each step for review.
B. Replace the web tier (Struts 1, or leaving Struts 2)
- Characterization tests: HTTP-level tests per action (request → status, redirect/forward, key page content, validation messages) that can run against either implementation.
- Extract services: move business logic out of
Action.execute()andActionForms into plain service classes with unit tests; the old actions call them. - New app: a Spring Boot 4.1 app with Spring Security; same database and services (shared module or a copied library); views in Thymeleaf or JSP to keep markup close.
- Gateway routing: the gateway (or the old app's front controller) routes migrated paths to the new app; everything else stays on Struts. Share authentication through the gateway, an SSO/OIDC provider or a signed token; avoid sharing HTTP sessions between JVMs unless you already use an external session store.
- Port route by route: each action becomes a
@Controllermethod;ActionForm→ a validated form object (@Validwith Bean Validation);ActionMessages→BindingResult; forwards → view names or redirects; Tiles → Thymeleaf layouts. Run the characterization tests against the new route, then switch it in the gateway. - Uploads and downloads:
MultipartFilewith size limits, type allowlists and storage outside the web root. - Retire: when no routes remain, remove the Struts app, its WAF exceptions and its deployment.
- Show each route's diff and test results; wait for approval before switching traffic. Commit only when asked (
git-commitskill).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 68 lines · 120 tokens per session scan A 6fa3d458716e
migrate-struts is a skill published in the GitHub repository Phaedra-Solutions/cursor-rules (4 stars, last pushed 2d ago), licensed MIT. It adds 120 tokens to every session and 1,395 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-01.
Other skills, from other repositories
x-api
X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.
nextjs-fullstack
Use for Next.js App Router, React Server Components, server actions, API routes, auth, database integration, caching, deployment, or full-stack product features.
flask
Skill "flask" from rishapgandhi/python-skills, covering flask skill, stack, project structure, app factory and app/init.py.
django
Skill "django" from rishapgandhi/python-skills, covering django skill, stack, project structure, settings pattern (split by environment) and config/settings/base.py.
drf
Skill "drf" from rishapgandhi/python-skills, covering django rest framework (drf) skill, stack additions (on top of django), settings, config/settings/base.py and serializer standards.
fastapi
Skill "fastapi" from rishapgandhi/python-skills, covering fastapi skill, stack, project structure (fastapi-specific additions), app factory pattern and app/main.py.