skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
softinter-chiangrai/up-ai-skill-training46 installs

d1-04-db-config

Configures the up-api .NET project's PostgreSQL connection (Npgsql, EF Core DbContext). No redeploy — config/code only. Use when the user asks for Day 1 step 4 of the CRUD drill, or asks to connect up-api to the database.

How do I install this agent skill?

npx skills add https://github.com/softinter-chiangrai/up-ai-skill-training --skill d1-04-db-config
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill configures a .NET project for a local PostgreSQL database as part of a development drill, including package installation and configuration files.

  • Socketpass

    No alerts

  • Snykfail

    Risk: HIGH · 1 issue

What does this agent skill do?

Day 1 · Step 4 — Configure the DB connection (no redeploy)

cd up-api
dotnet add package Npgsql.EntityFrameworkCore.PostgreSQL
dotnet add package Microsoft.EntityFrameworkCore.Design

appsettings.Development.json:

{
  "ConnectionStrings": {
    "Default": "Host=localhost;Port=5432;Database=up_db;Username=upadmin;Password=uppass"
  }
}

Use localhost here because EF CLI commands (next steps) run from the host. Inside the up-api container the connection string instead uses the compose service name db — that's already set in the container's environment from the docker-deploy step, don't change it.

Data/AppDbContext.cs:

public class AppDbContext : DbContext
{
    public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }
    // DbSet<Entity> properties are added in the entity-migration step
}

Program.cs:

builder.Services.AddDbContext<AppDbContext>(opt =>
    opt.UseNpgsql(builder.Configuration.GetConnectionString("Default")));

This step is code + config only — do not redeploy.

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/softinter-chiangrai/up-ai-skill-training/d1-04-db-config">View d1-04-db-config on skillZs</a>