AgentSkillsCN

dct

DCT(数据检查工具)的路由技能。当用户希望处理扁平化数据文件(CSV、JSON、NDJSON、Parquet),进行检查、比较、转换或生成时,此技能将为您提供有力支持。主要的 dct 技能会分析用户的意图,并将请求路由至相应的子技能。触发条件包括任何提及数据文件、预览数据、比较数据集、生成测试数据、展平 JSON、创建 SQL 架构、对数据进行概要分析,或可视化分布情况。

SKILL.md
--- frontmatter
name: dct
description: Router skill for DCT (Data Check Tool). Use this skill whenever the user wants to work with flat data files (CSV, JSON, NDJSON, Parquet) for inspection, comparison, transformation, or generation. The main dct skill analyzes user intent and routes to appropriate sub-skills. Triggers include any mention of data files, previewing data, comparing datasets, generating test data, flattening JSON, creating SQL schemas, profiling data, or visualizing distributions.
tools:
  - dct-peek
  - dct-infer
  - dct-diff
  - dct-generate
  - dct-flattify
  - dct-profile
  - dct-js2sql
  - dct-chart

DCT (Data Check Tool) - Skill Router

DCT is a Swiss army knife CLI tool for working with flat data files. This skill routes to appropriate sub-skills based on user intent.

Quick Command Reference

User IntentRoute ToCommand Pattern
Preview/inspect datadct-peekdct peek <file>
Generate SQL schemadct-inferdct infer <file>
Compare two datasetsdct-diffdct diff <keys> <file1> <file2>
Generate synthetic datadct-generatedct gen <schema>
Flatten nested JSONdct-flattifydct flattify <json>
Analyze data qualitydct-profiledct prof <file>
JSON Schema to SQLdct-js2sqldct js2sql <schema>
Visualize datadct-chartdct chart <file> <col>

Routing Logic

Analyze the user's request and route to the appropriate sub-skill:

Route to dct-peek when:

  • User wants to preview data files
  • Keywords: "peek", "preview", "show me", "look at", "first rows", "sample"
  • Example: "Show me the first 10 rows of data.csv"

Route to dct-infer when:

  • User wants to generate SQL schemas
  • Keywords: "infer", "schema", "create table", "sql from data", "ddl"
  • Example: "Generate a CREATE TABLE statement from this CSV"

Route to dct-diff when:

  • User wants to compare two files
  • Keywords: "diff", "compare", "differences", "match", "reconcile", "validate"
  • Example: "Compare these two CSV files by the ID column"

Route to dct-generate when:

  • User wants to create synthetic test data
  • Keywords: "generate", "synthetic", "mock", "fake data", "test data"
  • Example: "Generate 1000 fake user records"

Route to dct-flattify when:

  • User wants to flatten nested JSON
  • Keywords: "flatten", "unnest", "nested json", "make flat"
  • Example: "Flatten this nested JSON from the API response"

Route to dct-profile when:

  • User wants to analyze data quality
  • Keywords: "profile", "analyze", "data quality", "statistics", "distribution"
  • Example: "Profile this data file for quality issues"

Route to dct-js2sql when:

  • User wants to convert JSON Schema to SQL
  • Keywords: "json schema", "convert schema", "schema to sql"
  • Example: "Convert this JSON Schema to a CREATE TABLE statement"

Route to dct-chart when:

  • User wants to visualize data
  • Keywords: "chart", "visualize", "histogram", "plot", "graph"
  • Example: "Create a chart of the sales column"

Common Patterns

Data Validation Workflow

  1. dct-peek: Preview to understand structure
  2. dct-profile: Check data quality
  3. dct-infer: Generate schema for downstream use

Data Comparison Workflow

  1. dct-peek: Preview both files
  2. dct-diff: Compare with appropriate keys

Test Data Generation Workflow

  1. dct-generate: Create synthetic data
  2. dct-peek: Verify generated data
  3. dct-diff: Compare with production sample

Installation

All sub-skills require DCT to be installed:

bash
which dct || go build -o dct && chmod +x ./dct

Supported File Formats

All DCT sub-skills support:

  • CSV (.csv)
  • JSON (.json)
  • NDJSON (.ndjson) - newline-delimited JSON
  • Parquet (.parquet)

Error Handling

If a sub-skill encounters errors:

  • Verify the file exists and is readable
  • Check file extension matches content format
  • Ensure DCT binary is built and executable