struts CLAUDE.md

struts CLAUDE.md is an instructions file for coding agents from apache/struts. It costs 1,334 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Claude Code when working on Apache Struts, a Java web application framework that uses model-view-controller architecture.

In plain words
What is it for?
Running tests, building modules, understanding the repository layout, and working with Struts-specific code.
Why use it?
They explain the project structure and correct build and test commands, reducing mistakes during development.

Instructions file

About the project

Apache Struts is an open-source Java web framework that helps developers build applications using the Model-View-Controller pattern, separating data and business logic from page presentation and request handling. Java developers use it to create dynamic web applications with interactive forms and database-backed behavior. The catalogue's skills, instructions, and setting support work with Struts projects.

apache/struts · 1,366 stars · on GitHub

Install

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.

agentmods
npx agentmods add instructions/apache/struts/claude-md
Clone the repo
git clone --depth 1 https://github.com/apache/struts

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

agentmods badge for struts CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/apache/struts/claude-md.svg)](https://agentmods.dev/instructions/apache/struts/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/apache/struts/claude-md"><img src="https://agentmods.dev/badge/instructions/apache/struts/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,334 This file is loaded in full into every session.
When invoked 1,334 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.01334 $0.01334
Opus 5 $0.00667 $0.00667
Sonnet 5 $0.00267 $0.00267
Haiku 4.5 $0.00133 $0.00133

Measured yesterday against content hash 164c7844f73e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

struts CLAUDE.md 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 yesterday.

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.

CLAUDE.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

For detailed procedures, use the specialized skills in .claude/skills/.

Project Overview

Apache Struts is a mature MVC web application framework for Java (originally WebWork 2). Uses OGNL for value stack expressions and FreeMarker for UI tag templates.

Version: read it from the root pom.xml — it is 7.4.0-SNAPSHOT as of 2026-08-23. Do not treat the -SNAPSHOT value as the next release number: the release version is chosen at release time from the semver impact of the accumulated changes, so 7.4.0-SNAPSHOT may well ship as something else. Released versions are git tags like STRUTS_7_2_1.

Build Commands

# Run tests (skip assembly for speed)
mvn test -DskipAssembly

# Single test in specific module
mvn test -DskipAssembly -pl core -Dtest=MyClassTest#testMethodName

# Jakarta EE 11 / Spring 7 profile
mvn clean install -Pjakartaee11

Project Structure

struts/
├── core/           # struts2-core - main framework
├── plugins/        # Plugin modules (json, rest, spring, tiles, velocity, etc.)
├── apps/           # Sample applications (showcase, rest-showcase)
├── assembly/       # Distribution packaging
├── bom/            # Bill of Materials for dependency management
├── parent/         # Parent POM with shared configuration
└── jakarta/        # Jakarta EE compatibility modules

Core Architecture

Request Lifecycle: DispatcherActionProxyActionInvocation → Interceptor stack → Action → Result

Key packages in org.apache.struts2:

  • dispatcher - Request handling, Dispatcher, servlet integration
  • interceptor - Built-in interceptors (params, validation, fileUpload)
  • components - UI tag components (form, textfield, submit)
  • action - Action interfaces (UploadedFilesAware, SessionAware, etc.)
  • security - Security utilities and OGNL member access policies

Security-Critical Patterns

Read the full file on GitHub · 107 lines

Changes

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.

  1. yesterday First seen · 107 lines · 1,334 tokens per session scan A 164c7844f73e

Subscribe to this mod's changes

struts CLAUDE.md is an instructions file published in the GitHub repository apache/struts (1,366 stars, last pushed today), licensed Apache-2.0. It adds 1,334 tokens to every session, about $0.0067 per session on Opus 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-09-03.