entity
Skill1 starsChanged 56 days agoApache-2.0View on GitHub
Scaffold a new JPA entity following project conventions (schema-qualified @Table, composite @EmbeddedId keys, Persistable for JDBC upsert, read-only mirror entities). Use when adding a persisted entity.
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Follow the module's API visibility convention (e.g.
- Very specific: line 46
Auditing: only where needed: @EntityListeners(AuditingEntityListener::class) + @CreatedDate/@LastModifiedDate var.
- Very specific: line 49
When generated Kotlin contains a single-parameter lambda, use it unless the lambda is nested.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
entity — JPA entity scaffold
Generate a JPA entity that matches the project's domain conventions. The generator's job is to bake the hard constraints in so a new entity cannot drift from the house style.
Authority: the project conventions (e.g.
AGENTS.md) are binding. This skill scaffolds; review with a Kotlin/Spring reviewer, tests with your test-authoring flow.
reference
원칙: reference/principles.md, 지식: reference/kb/INDEX.md.
Where it goes
- The domain module (
<domain-module>), package<base-package>.<domain>.entity(e.g.com.example.order.entity). - Follow the module's API visibility convention (e.g. no
publickeyword when the module runsexplicitApi = Disabled). - Class name
<Name>Entity. Composite-key id class<Name>EntityId.
Skeleton
@Entity
@Table(schema = "<schema>", name = "<table>")
class OrderEntity(
@Id
@Column(name = "order_id", length = 126, nullable = false, updatable = false)
val id: String,
@Enumerated(EnumType.STRING)
@Column(name = "status", length = 50, nullable = false)
val status: OrderStatus,
@Column(name = "created_at", nullable = false, updatable = false)
val createdAt: Instant = Instant.now(),
@Column(name = "updated_at", nullable = false)
val updatedAt: Instant = Instant.now(),
)Rules (MUST)
@TableMUST set bothschemaandname. Enums persist via@Enumerated(EnumType.STRING).- Fields are
val; only auditing fields arevar. DefaultInstant.now()for ingestion timestamps. - Composite PK:
@EmbeddedId val id: <Name>EntityId = <Name>EntityId()+@Embeddable data class <Name>EntityId(... @Column(updatable = false) ...) : Serializable. - Auditing only where needed:
@EntityListeners(AuditingEntityListener::class)+@CreatedDate/@LastModifiedDate var. - Read-only mirror entities (synced from an external system) are read-only: keep source timestamps as
val, omit auditing. - JDBC bulk-upsert targets implement
Persistable<String>:@Transient private var _persisted+isNew()+@PostLoad @PostPersist markPersisted()(soON CONFLICTupsert viarepositoryworks). KDoc in Korean, matching surrounding density. - When generated Kotlin contains a single-parameter lambda, use
itunless the lambda is nested; name the inner parameter only to disambiguate nested scopes. Multi-parameter lambdas keep the API-required parameters.
Hard constraints (build/ArchUnit fail otherwise)
- The entity MUST stay inside
..<domain>..entity... Code outside the domain module MUST use the domain model, never the entity (enforced by an entity-leakage ArchUnit test). Always pair an entity with a model +mapper. - A persistence change MUST ship a matching DB migration in the same change.
Verify
도메인 모듈 컴파일 — 빌드시스템 자동감지(gradle/maven 등). 예: Gradle compileKotlin, Maven compile (warnings-as-errors).
Related
[[repository]] · [[mapper]] · [[enum]]
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- gabriellst/codm★ 4same name
- abouchard11/midnight-seo-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository65 other files it gives its agents.
- agent-evalSkill
- architecture-review-workflowSkill
- backend-code-review-workflowSkill
- code-authoring-routerSkill
- code-diagram-extractSkill
- codex-agent-runtimeSkill
- design-pattern-applySkill
- diagram-stylerSkill
- document-designerSkill
- e2e-evidence-reportSkill
- e2e-report-rendererSkill
- e2e-runnerSkill
- e2e-scenario-authorSkill
- e2e-test-workflowSkill
- enumSkill
- explore-dead-codeSkill
- flywaySkill
- git-flowSkill
- harness-proposeSkill
- harness-refineSkill
- java-spring-review-workflowSkill
- knowledge-auditSkill
- korean-dev-writerSkill
- kotlin-code-authoringSkill
- kotlin-spring-reviewSkill
- kotlin-spring-review-workflowSkill
- learnSkill
- mapperSkill
- markdown-publisherSkill
- mermaid-diagramsSkill
- mssql-code-authoringSkill
- nl-sql-querySkill
- notion-domain-contextSkill
- oop-design-reviewSkill
- opensearch-code-authoringSkill
- opensearch-optimizationSkill
- opensearch-query-reviewSkill
- opensearch-review-workflowSkill
- opensearch-schema-reviewSkill
- pdf-qaSkill
- playwright-e2eSkill
- postgres-code-authoringSkill
- postgres-query-reviewSkill
- postgres-review-workflowSkill
- postgres-risk-checkSkill
- postgres-schema-designSkill
- product-requirementsSkill
- product-ui-designSkill
- refactoring-catalogSkill
- repositorySkill
- requestSkill
- responseSkill
- retroSkill
- schema-doc-extractSkill
- security-scan-workflowSkill
- serviceSkill
- skill-updaterSkill
- start-taskSkill
- test-authoringSkill
- test-quality-refactoring-workflowSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

