yugabytedb-app-dev — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited yugabytedb-app-dev (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A reference skill for building applications on top of YugabyteDB, covering connection config, transaction retries, and language/framework-specific best practices.
YugabyteDB is a distributed SQL database compatible with PostgreSQL. Writing applications for it requires attention to three areas standard Postgres apps often skip:
jdbc-yugabytedb) or the standard Postgres driver.YB's driver adds cluster-aware load balancing and topology routing.
40001,deadlocks 40P01, connection resets). Applications MUST retry these rather than surface them to users.
| Runtime | Driver / Library | Retry Mechanism | |
|---|---|---|---|
| Java / Spring Boot | jdbc-yugabytedb + HikariCP | Spring core RetryPolicy + ExponentialBackOff (built-in, no extra dep) + AOP aspect | |
| Java / Spring Boot Reactive | r2dbc-postgresql + r2dbc-pool | Reactor .retryWhen(YbRetry.spec()) inline in pipeline | |
| Java / Quarkus | jdbc-yugabytedb + Agroal | SmallRye @Retry + CDI interceptor for exception translation | |
| Python | psycopg2 / asyncpg | Custom decorator wrapping psycopg2.errors.SerializationFailure | Two connection pools |
| Node.js | @yugabytedb/pg (smart driver) | withRetry loop catching 40001/40P01/XX000 | EndpointPoolManager (multi-endpoint probe + failover) |
| Go | pgx | pgx retry loop | Two pgxpool.Pool instances |
| .NET / ASP.NET Core | Npgsql + EF Core | Polly AsyncRetryPolicy | Two DbContext registrations (rw + ro) |
40001 — serialization_failure (optimistic concurrency)
40P01 — deadlock_detected
57P01 — admin_shutdown (node restart / kill -15)
08006 — connection_failure (socket timeout, kill -9)
XX000 — internal_error — ONLY retry conditionallyAlso retry on these Java exception types for JPA/JDBC:
SQLRecoverableExceptionSQLTransientConnectionExceptionTransientDataAccessExceptionTransactionException (begin/commit/rollback failures)For full details read → references/java-spring.md
Key files in the reference implementation:
| File | Purpose |
|---|---|
KVRetryPolicy.java | Implements RetryPolicy — classifies retryable exceptions; owns ExponentialBackOff |
DataSourceAspect.java | AOP aspect wrapping all @Service methods with RetryTemplate |
YbDataApplication.java | Wires RetryTemplate with exponential backoff from config |
KVService.java | Service using @Transactional and @Transactional(readOnly = true) |
application.yaml | Full driver + pool + retry config |
For full details read → references/java-spring-reactive.md
Key differences from Spring Boot (blocking):
| Topic | Reactive behaviour |
|---|---|
| Driver | com.yugabyte:r2dbc-postgresql (YugabyteDB fork) — URL scheme r2dbc:postgresql:// |
| Retry | RetryConfigSpec bean provides Retry; controller applies .retryWhen(retrySpec) on each pipeline |
| Transactions | @Transactional in service; retry wraps outside via controller pipeline |
| Migrations | Flyway still runs over JDBC at startup (add jdbc-yugabytedb as a side-car dep) |
For full details read → references/java-quarkus.md
Key differences from Spring Boot:
| Topic | Quarkus behaviour |
|---|---|
| Connection pool | Agroal (not HikariCP); config via quarkus.datasource.jdbc.* |
| Retry mechanism | SmallRye Fault Tolerance @Retry + custom CDI interceptor for SQL-state translation |
| Interceptor ordering | CRITICAL: set mp.fault.tolerance.interceptor.priority=100 so @Retry wraps outside @Transactional, giving each retry a fresh transaction |
| Native image | YugabyteDB driver is JVM-mode only — not compatible with GraalVM native compilation |
For full details read → references/python.md
For full details read → references/nodejs.md
For full details read → references/go.md
For full details read → references/dotnet.md
Maven (Java):
<dependency>
<groupId>com.yugabyte</groupId>
<artifactId>jdbc-yugabytedb</artifactId>
<version>42.7.3-yb-4</version>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
<version>2.0.12</version>
</dependency>Python:
pip install psycopg2-binary # or asyncpg for asyncNode.js:
npm install @yugabytedb/pg # YugabyteDB smart driver (fork of node-postgres)Go:
go get github.com/jackc/pgx/v5Always set:
auto-commit: false — YugabyteDB works best with explicit transaction managementconnection-init-sql with prepare warmup; execute warmup; commit; — validates and warms the connectionsocketTimeout — prevents hanging connections on node failureyb-servers-refresh-interval — refreshes cluster topology periodicallyNever skip retries. YugabyteDB distributed transactions can fail with 40001 under normal operation (two concurrent writers hitting the same row). Without retries, these surface as errors to end users.
Use the reference KVRetryPolicy pattern — read references/java-spring.md for the full annotated implementation with all retry-worthy SQL states.
Use Flyway (Java) or Alembic (Python) for schema management. YugabyteDB supports all standard PostgreSQL DDL.
-- Example migration: V1_0_0__create.sql
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE TABLE IF NOT EXISTS kvinfo (
key uuid PRIMARY KEY,
value text
); -- tune tablet count to expected data size| Pitfall | Fix |
|---|---|
Not retrying 40001 | Always wrap service layer with retry |
auto-commit: true | Set to false; manage transactions explicitly |
Using standard org.postgresql driver | Use com.yugabyte driver for topology-aware load balancing |
Missing socketTimeout | Connections can hang indefinitely on node failure without it |
Forgetting @Transactional on service methods | Without it, each repo call is its own transaction; retries won't help multi-step operations |
These are example prompts that should trigger this skill.
Java / Spring Boot
Java / Spring Boot Reactive
Java / Quarkus
Python
Node.js
Go
.NET
General / Cross-runtime
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.