Help us improve
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
Share bugs, ideas, or general feedback.
By apache
Manage Apache Cayenne ORM projects by reverse-engineering database schemas, designing and editing DataMaps, generating entity Java classes, writing Cayenne queries, and bootstrapping runtime configuration – all through MCP tool integrations.
npx claudepluginhub apache/cayenne --plugin apache-cayenneUse this skill whenever the user wants to (re)generate Cayenne entity Java classes from a DataMap. Trigger on phrases like 'generate Java classes', 'regenerate entities', 'run cgen', 'create the entity classes', 'why is the Artist class missing fields', 'where did the `_Abstract*` classes come from', 'sync the entity classes with the model', or any request to materialize Java from the DataMap. Also trigger as a follow-up after modeling changes (someone added an entity, attribute, or relationship and now the Java side is stale). This skill exclusively uses the `mcp__cayenne__cgen_run` MCP tool — it does NOT use `mvn cayenne:cgen` or the Gradle cgen task.
Use this skill when the user explicitly wants to open CayenneModeler (the GUI) on a Cayenne project, or when the modeling task is inherently visual — reverse engineering (delegated to cayenne-reverse-engineer), bulk relationship layout, multi-entity visual refactoring. Trigger on phrases like 'open the Modeler', 'open in CayenneModeler', 'launch the GUI', 'edit visually', 'show me the project in the Modeler'. Do NOT trigger as a fallback for ordinary a-la-carte XML edits — those belong in the cayenne-modeling skill, which is faster and doesn't require the user to context-switch.
Use this skill whenever the user wants to edit, inspect, or extend the Cayenne ORM model in a project — adding or modifying entities, attributes, relationships, embeddables, named queries, stored procedures, or DataNodes. Trigger on phrases like 'add an ObjEntity', 'add a DbEntity', 'add a relationship', 'expose this column as an attribute', 'create a new DataMap', 'add a named query', 'create an embeddable', 'add a stored procedure', 'change the attribute type', 'mark this column as nullable', 'rename this entity', or any mention of a Cayenne `*.map.xml` or `cayenne-*.xml` file. Also trigger when the user references modeling concepts (ObjEntity, DbEntity, ObjAttribute, DbAttribute, ObjRelationship, DbRelationship, Embeddable, dbEntityName, deleteRule, db-attribute-path, db-relationship-path, defaultPackage) in the context of a Cayenne-using app. This is the *primary* skill for a-la-carte ORM model manipulation — direct XML edits, not the Modeler GUI.
Use this skill whenever the user wants to write or modify a Cayenne query — fetching entities by criteria, joining, prefetching to avoid N+1, ordering, paginating, aggregating, or running raw SQL through Cayenne. Trigger on phrases like 'query for X', 'fetch all artists where ...', 'write an ObjectSelect', 'use SQLSelect', 'use SelectById', 'add a prefetch', 'get distinct values', 'count rows', 'find by ID', 'load by primary key', 'build a Cayenne expression', 'why am I getting N+1', 'how do I paginate', 'select a single column', 'select columns into a DTO', 'named query in the DataMap'. Do NOT trigger for modeling changes (use cayenne-modeling) or runtime bootstrap (use cayenne-runtime).
Use this skill whenever the user wants to import database schema metadata into a Cayenne DataMap — full-schema sync from a live DB. Trigger on phrases like 'reverse engineer the database', 'import the schema', 'generate a DataMap from my DB', 'sync the model with the database', 'add the new tables from the DB', 'import the customer table', 'pick up the latest schema changes', 'create entities from these tables', or any request that involves reading database metadata to populate or update a DataMap. This is for *full schema* or *bulk table* import; one-off a-la-carte entity additions belong in the cayenne-modeling skill. The skill drives this through CayenneModeler's reverse-engineering wizard via the `mcp__cayenne__open_project` MCP tool — it does NOT use Maven `cdbimport` or any Gradle equivalent.
Share bugs, ideas, or general feedback.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Generate ORM models from database schemas or create database schemas from models for TypeORM, Prisma, Sequelize, SQLAlchemy, and more
DevsForge Enterprise Database Schema Generator delivering comprehensive schema design methodologies, migration automation, and ORM integration excellence that transforms database architecture from manual specification into intelligent, optimized data persistence solutions across PostgreSQL, MySQL, MongoDB, and major database platforms
Model Context Protocol (MCP) server for AI-assisted development of CAP applications.
Database schema design and ERD generation
Neon database development skills including authentication, Drizzle ORM, serverless drivers, and toolkit utilities
Comprehensive skill pack with 66 specialized skills for full-stack developers: 12 language experts (Python, TypeScript, Go, Rust, C++, Swift, Kotlin, C#, PHP, Java, SQL, JavaScript), 10 backend frameworks, 6 frontend/mobile, plus infrastructure, DevOps, security, and testing. Features progressive disclosure architecture for 50% faster loading.
Apache Cayenne is an open source persistence framework licensed under the Apache License, providing object-relational mapping (ORM) and remoting services.
You can use Cayenne Modeler to manually create Cayenne project without DB. Binary distributions can be downloaded from https://cayenne.apache.org/download/
See tutorial https://cayenne.apache.org/docs/4.2/getting-started-guide/
Additionally, you can use Cayenne Maven (or Gradle) plugin to create model based on existing DB structure. Here is example of Cayenne Maven plugin setup that will do it:
<plugin>
<groupId>org.apache.cayenne.plugins</groupId>
<artifactId>cayenne-maven-plugin</artifactId>
<version>4.2.1</version>
<dependencies>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.4.0</version>
</dependency>
</dependencies>
<configuration>
<map>${project.basedir}/src/main/resources/demo.map.xml</map>
<cayenneProject>${project.basedir}/src/main/resources/cayenne-demo.xml</cayenneProject>
<dataSource>
<url>jdbc:mysql://localhost:3306/cayenne_demo?nullNamePatternMatchesAll=true</url>
<driver>com.mysql.cj.jdbc.Driver</driver>
<username>user</username>
<password>password</password>
</dataSource>
<dbImport>
<defaultPackage>org.apache.cayenne.demo.model</defaultPackage>
</dbImport>
</configuration>
</plugin>
Run it:
mvn cayenne:cdbimport
mvn cayenne:cgen
See tutorial https://cayenne.apache.org/docs/4.2/getting-started-db-first/
And here is example of Cayenne Gradle plugin setup:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.apache.cayenne.plugins:cayenne-gradle-plugin:4.2.1'
classpath 'com.mysql:mysql-connector-j:8.4.0'
}
}
apply plugin: 'org.apache.cayenne'
cayenne.defaultDataMap 'demo.map.xml'
cdbimport {
cayenneProject 'cayenne-demo.xml'
dataSource {
driver 'com.mysql.cj.jdbc.Driver'
url 'jdbc:mysql://127.0.0.1:3306/cayenne_demo?nullNamePatternMatchesAll=true'
username 'user'
password 'password'
}
dbImport {
defaultPackage = 'org.apache.cayenne.demo.model'
}
}
cgen.dependsOn cdbimport
compileJava.dependsOn cgen
Run it:
gradlew build