neo4j-spring-data-skill
БесплатноБез исполняемых скриптовНе проверенUse when building Spring Boot applications with Neo4j using Spring Data Neo4j (SDN 7.x/8.x) — @Node entity mapping, @Relationship, @RelationshipProperties…
от neo4j★ 126 звёзд на GitHubОб этом скилле
Neo4j Spring Data Skill
When to Use
- Configuring Spring Boot with Neo4j (
spring-boot-starter-data-neo4j) - Writing
@Nodeentity classes and@Relationship/@RelationshipPropertiesmappings - Defining
Neo4jRepositoryorReactiveNeo4jRepositoryinterfaces - Writing
@Queryannotations with Cypher on repository methods - Using Spring projections (interface-based, DTO, dynamic) with Neo4j
- Configuring
application.ymlfor Neo4j connection - Custom queries via
Neo4jClientorNeo4jTemplate - Spring AI
Neo4jVectorStorefor vector search in Spring apps - Transaction management, auditing, optimistic locking
When NOT to Use
- Raw Java driver without Spring →
neo4j-driver-java-skill - Cypher query authoring →
neo4j-cypher-skill - Driver version upgrades →
neo4j-migration-skill - GDS algorithms →
neo4j-gds-skill
Version Matrix
| SDN | Spring Boot | Spring Framework | Java | Neo4j |
|---|---|---|---|---|
| 8.1.x | 4.1.x | 7.0.x | 17+ | 5.15+ |
| 8.0.x | 4.0.x | 7.0.x | 17+ | 5.15+ |
| 7.5.x | 3.5.x | 6.2.x | 17+ | 4.4+ |
Older: Boot 3.4 → SDN 7.4, Boot 3.3 → 7.3, Boot 3.2 → 7.2. SDN version comes from Boot's spring-data-bom — let Boot pick it.
Use spring-boot-starter-data-neo4j — it pulls SDN + driver. No explicit SDN version needed when using Spring Boot BOM.
Setup
Maven
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-neo4j</artifactId>
</dependency>
Gradle
implementation 'org.springframework.boot:spring-boot-starter-data-neo4j'
Reactive stack (add alongside above)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
Boot does NOT auto-configure a reactive transaction manager. Without this bean, ReactiveNeo4jRepository calls fail: NoSuchBeanDefinitionException: No bean named 'reactiveTransactionManager'.
import org.neo4j.driver.Driver;
import org.springframework.data.neo4j.core.ReactiveDatabaseSelectionProvider;
import org.springframework.data.neo4j.core.transaction.ReactiveNeo4jTransactionManager;
@Bean
ReactiveNeo4jTransactionManager reactiveTransactionManager(Driver driver, ReactiveDatabaseSelectionProvider dsp) {
return new ReactiveNeo4jTransactionManager(driver, dsp);
}
Configuration
application.yml — imperative (standard)
spring:
neo4j:
uri: ${NEO4J_URI:bolt://localhost:7687}
authentication:
username: ${NEO4J_USERNAME:neo4j}
password: ${NEO4J_PASSWORD}
data:
neo4j:
database: ${NEO4J_DATABASE:neo4j}
application.yml — Aura (TLS required)
spring:
neo4j:
uri: ${NEO4J_URI} # neo4j+s://xxxx.databases.neo4j.io
authentication:
username: ${NEO4J_USERNAME:neo4j}
password: ${NEO4J_PASSWORD}
data:
neo4j:
database: ${NEO4J_DATABASE:neo4j}
Credentials: store in .env; never hardcode. Verify .env is in .gitignore.
Entity Mapping
import org.springframework.data.neo4j.core.schema.*;
import org.springframework.data.neo4j.core.support.UUIDStringGenerator; // not GeneratedValue.UUIDStringGenerator
import org.springframework.data.annotation.Version; // not in core.schema
// Internal generated ID (default for most cases)
@Node("Person")
public class PersonEntity {
@Id @GeneratedValue private Long id; // element ID (Long)
private String name;
@Property("birth_year") private Integer birthYear; // custom property name
@Relationship(type = "KNOWS", direction = Relationship.Direction.OUTGOING)
private List<PersonEntity> friends = new ArrayList<>();
}
// UUID business key
@Node("Product")
public class ProductEntity {
@Id @GeneratedValue(generatorClass = UUIDStringGenerator.class)
private String id;
@Version private Long version; // optimistic locking; required with business key
}
// User-assigned key (caller sets value; no @GeneratedValue)
@Node("Country")
public class CountryEntity {
@Id private String isoCode;
private String name;
}
// Multiple static labels
@Node(primaryLabel = "Vehicle", labels = {"Car", "Auditable"})
public class CarEntity { ... }
// Runtime labels
@Node("Content")
public class ContentEntity {
@Id @GeneratedValue private Long id;
@DynamicLabels private Set<String> tags = new HashSet<>(); // labels added at runtime
}
Relationship Properties
Use @RelationshipProperties when the relationship itself carries data.
@RelationshipProperties
public class RolesRelationship {
@RelationshipId // internal relationship ID; required
private Long id;
private List<String> roles;
@TargetNode // marks the other end of the relation
Установить neo4j-spring-data-skill в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashWebFetchВложенные файлы
FAQ
Что делает скилл neo4j-spring-data-skill?
Use when building Spring Boot applications with Neo4j using Spring Data Neo4j (SDN 7.x/8.x) — @Node entity mapping, @Relationship, @RelationshipProperties, Neo4jRepository, ReactiveNeo4jRepository, @Query annotations, application.yml configuration, projections, Neo4jClient, Neo4jTemplate, transactions, auditing, or Spring AI Neo4jVectorStore vector search. Does NOT handle raw Java driver code without Spring — use neo4j-driver-java-skill. Does NOT handle Cypher query authoring — use neo4j-cypher-skill. Does NOT handle driver version upgrades — use neo4j-migration-skill.
Как установить скилл neo4j-spring-data-skill?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл neo4j-spring-data-skill запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic