Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

database-specialist

БесплатноБез исполняемых скриптовНе проверен

Data-pipeline implementation specialist — change-tracker/data-loader configurations, stored procedure integration, MongoDB repository code, DI registration…

gabrielmoreiraот gabrielmoreira★ 23 звезды на GitHub

Об этом скилле

Database Specialist — Data Pipeline

Implement and troubleshoot data-pipeline code: change-tracker jobs, data-loader configurations, SQL stored procedure integration, MongoDB repository patterns, and database tests.

Scope: data pipeline implementation only.

  • For MongoDB analysis, indexing strategy, and query optimization → delegate to MongoDB Expert agent.
  • For SQL Server query optimization, execution plans, and schema design → delegate to MS-SQL Expert agent.
  • For general backend patterns (GraphQL, MassTransit, Startup) → backend-developer skill.
  • For test conventions → tests.instructions.md.

Architecture Overview

The data pipeline is a system that synchronizes source data (MS SQL) into a MongoDB target database:

SQL Server (Stored Procedures)
  → SqlChangeTracker (Quartz job, Cron)
    → Extract keys
      → MongoDB (store keys, transactions)
        → DomainProcessor (transformation)
          → MongoDB (store snapshots, hashes)

Relevant Paths in the Repo

Area Path
SQL Client & Execution src/DataAccess/
SQL Configurations src/Abstractions/Configuration/
Change Tracker & Loader src/Core/ChangeTracker/, src/Core/Loader/
MongoDB Repositories src/Repository/
DI Registration src/Core/DataPipelineCoreCollectionExtensions.cs
Domain Configuration src/Repository/ConfigureDomainSettings.cs
Tests test/

MS SQL Server

SqlClient — Core SQL Execution

SqlClient.cs in src/DataAccess/ uses Microsoft.Data.SqlClient (not System.Data.SqlClient). Key properties:

  • CommandType.StoredProcedure — exclusively stored procedures, no inline SQL
  • CommandTimeout = 10 minutes
  • Polly WaitAndRetry(3, retryAttempt => TimeSpan.FromSeconds(5)) for transient errors
  • Streaming via IAsyncEnumerable<SqlTable> with optional batching
// Simplified pattern from SqlClient.cs
await using SqlConnection connection = new(context.ConnectionString);
await connection.OpenAsync(cancellationToken);

await using SqlCommand command = new(context.StoredProcedure, connection)
{
    CommandType = CommandType.StoredProcedure,
    CommandTimeout = (int)TimeSpan.FromMinutes(10).TotalSeconds
};

// Add parameters
foreach (SqlParameter parameter in context.Parameters)
{
    command.Parameters.Add(parameter);
}

await using SqlDataReader reader = await command.ExecuteReaderAsync(cancellationToken);

SqlExecutionContext

Internal context object for SQL calls:

internal class SqlExecutionContext
{
    public string ConnectionString { get; set; }
    public string StoredProcedure { get; set; }
    public IList<SqlParameter> Parameters { get; set; }
    public bool UseBatching { get; set; }
    public int BatchSize { get; set; }
}

Two SQL Client Types

Client Implements Batching Purpose
SqlChangeTrackerClient ISqlChangeTrackerClient Yes Periodic change detection via Cron
SqlDataLoaderClient ISqlDataLoaderClient No Full entity data loading

Both create a SqlExecutionContext from their respective configuration.

SQL Configurations

SqlChangeTrackerConfiguration

Implements IChangeTrackerConfiguration:

public class SqlChangeTrackerConfiguration : IChangeTrackerConfiguration
{
    public string StoredProcedure { get; set; }
    public string QueryParameterName { get; set; }
    public string QueryParameterType { get; set; }
    public long InitialTransactionId { get; set; }
    public string ResultPrimaryKeyColumnName { get; set; }
    public string ResultTransactionIdColumnName { get; set; }
    public string ConnectionString { get; set; }
    public string CronSchedule { get; set; } = "0 {0} * ? * * *";
    public EntityAction EntityAction { get; set; }

    public void Resolve(ConnectionsOptions options)
    {
        // Resolves ConnectionString via ConnectionsOptions
    }
}
  • CronSchedule default: "0 {0} * ? * * *" — placeholder {0} is replaced with minute value
  • Resolve(ConnectionsOptions) — resolve connection string from named configuration

SqlLoaderConfiguration

Implements ILoaderConfiguration:

public class SqlLoaderConfiguration : ILoaderConfiguration
{
    public string StoredProcedure { get; set; }
    public string ResultPrimaryKeyColumnName { get; set; }
    public string QueryParameterName { get; set; }
    public string QueryParameterType { get; set; }
    public string QueryParameterTypeName { get; set; }  // For TVP support
    public string ConnectionString { get; set; }

    public void Resolve(ConnectionsOptions options) { /* ... */ }
}

Connection Resolution

Connection strings are not stored directly in configurations but resolved via ConnectionsOptions:

Config section: Pipeline_Connections
  → ConnectionsOptions (name/value pairs)
    → Loader/Tracker call Resolve(ConnectionsOptions)

Change Tracker Pipeline

SqlCha

Полный SKILL.md на GitHub

Установить database-specialist в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл database-specialist?

Data-pipeline implementation specialist — change-tracker/data-loader configurations, stored procedure integration, MongoDB repository code, DI registration, and Squadron-based database tests. Triggers: SqlChangeTracker, SqlDataLoader, SqlExecutionContext, IMongoCollection, MongoConventions, DomainEntityRepository, SourceRepository, Pipeline_Database, Pipeline_Connections, Squadron, new data pipeline entity setup.

Как установить скилл database-specialist?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл database-specialist запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить database-specialist с