Agent skill

Rust SQL Test

by shencangsheng in shencangsheng/easydb_app

Enforces unit test requirements for the Rust data-processing modules in src-tauri/src/sql/ (generator.rs, parse.rs) and src-tauri/src/reader/ (excel.rs and other readers).

MITAuto-check passedDocuments & Office

Install Rust SQL Test

skills CLI
$ npx skills add shencangsheng/easydb_app --skill rust-sql-test -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install shencangsheng/easydb_app rust-sql-test --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/shencangsheng/easydb_app.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/rust-sql-test .claude/skills/rust-sql-test && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
rust-sql-test
GitHub stars
590
Token cost
~1.2k tokens
SKILL.md length
313 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Enforces unit test requirements for the Rust data-processing modules in src-tauri/src/sql/ (generator.rs, parse.rs) and src-tauri/src/reader/ (excel.rs and other readers).

  • Works in 2 steps: Stability Tests → Performance Tests
  • Reviewing Rust code in these modules
  • SKILL.md covers Rule, Test Structure, Two Test Categories Required and Exposing Internals for Testing, plus 2 more sections
  • Calls cargo

What it does

Rust SQL Test is an agent skill from shencangsheng/easydb_app. Enforces unit test requirements for the Rust data-processing modules in src-tauri/src/sql/ (generator.rs, parse.rs) and src-tauri/src/reader/ (excel.rs and other readers). Use when writing, editing, or reviewing Rust code in these modules. Ensures stability tests (and performance tests for hot-path code) are added for any change, and that tests follow the shared <moduletest.rs convention.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering SQL, Unit testing and Excel spreadsheets. It works with Rust, SQL, Tauri and Microsoft Excel. The repository describes itself as: EasyDB is a lightweight desktop app built with Tauri + Rust, powered by Apache DataFusion. Query local CSV, TSV, Text, NdJson, Excel, Parquet files and MySQL databases directly…. The licence is MIT.

When your agent uses it

  • Reviewing Rust code in these modules
  • Tasks that involve SQL
  • Tasks that involve Unit testing

Example prompts

  • “Use the rust-sql-test skill to enforce unit test requirements for the Rust data-processing modules in src-tauri/src/sql/ (generator.rs, parse.rs)…”
  • “/rust-sql-test”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Stability Tests
  2. Performance Tests

What it can do on your machine

Read from SKILL.md and the folder at commit 1c461a3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Rust SQL Test loads about 1.2k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 313 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from shencangsheng/easydb_app at commit 1c461a3, republished under its MIT licence (© shencangsheng). 313 words, ~1,178 tokens.

Download SKILL.mdSave it as .claude/skills/rust-sql-test/SKILL.md (or your agent's skills folder).
name
rust-sql-test
description
Enforces unit test requirements for the Rust data-processing modules in src-tauri/src/sql/ (generator.rs, parse.rs) and src-tauri/src/reader/ (excel.rs and other readers). Use when writing, editing, or reviewing Rust code in these modules. Ensures stability tests (and performance tests for hot-path code) are added for any change, and that tests follow the shared `<module>_test.rs` convention.

Rust Data Module: Unit Test Requirements

Rule

Any change to code under src-tauri/src/sql/ or src-tauri/src/reader/ MUST be accompanied by corresponding unit tests.

This applies to:

  • New functions or structs
  • Modified logic in existing functions
  • Performance optimizations (require performance tests)
  • Bug fixes (require regression tests)

Test Structure

Tests live in separate <module>_test.rs files within the same module directory (one test file per implementation file). Do NOT place #[cfg(test)] mod tests blocks inline inside the implementation file.

src-tauri/src/sql/
├── generator.rs          # implementation
├── generator_test.rs     # tests for generator
├── parse.rs              # implementation
├── parse_test.rs         # tests for parse (if needed)
└── mod.rs                # registers test modules with #[cfg(test)]

src-tauri/src/reader/
├── excel.rs              # implementation
├── excel_test.rs         # tests for excel
└── mod.rs                # registers test modules with #[cfg(test)]

Register each test module in mod.rs:

rust
pub mod excel;

#[cfg(test)]
mod excel_test;

Each test file imports the items under test from its sibling module:

rust
use super::excel::{excel_cell_to_timestamp_nanos, infer_cell_data_type};

Two Test Categories Required

1. Stability Tests

Every public or pub(crate) function must have stability tests covering:

AspectWhat to test
CorrectnessExpected output for valid inputs
Edge casesEmpty strings, NULL, large values, negative numbers
Error handlingInvalid inputs return appropriate errors
Type safetyEach SqlType variant produces correct SQL output
RegressionPreviously fixed bugs stay fixed

Naming convention: test_<function>_<scenario>()

Examples:

  • test_format_bool_for_sql_known_values()
  • test_resolve_export_specs_rejects_duplicate_export_names()
  • test_format_cell_bool_to_int()
  • test_converts_excel_datetime_cell()
  • test_non_datetime_cells_return_none()
2. Performance Tests

Any code in the hot formatting loop or called per-row must have performance tests:

AspectWhat to test
Time boundCompletes within a reasonable time for N iterations
ScalingDoes not degrade unexpectedly with more columns/rows
ComparisonEnum dispatch is not slower than string-based approach

Naming convention: test_perf_<function>_<scenario>()

Examples:

  • test_perf_format_cell_for_sql_enum_dispatch()
  • test_perf_resolve_export_specs_large_columns()
  • test_perf_parse_sql_type_enum_approach()

Performance test pattern:

rust
#[test]
fn test_perf_<name>() {
    use std::time::Instant;
    let iterations = 50_000;
    let start = Instant::now();
    for _ in 0..iterations {
        std::hint::black_box(/* call hot function */);
    }
    let duration = start.elapsed();
    assert!(
        duration.as_millis() < THRESHOLD_MS,
        "function too slow: {:?} for {} iterations",
        duration, iterations
    );
}

Exposing Internals for Testing

Functions and types needed by tests must be marked pub(crate):

rust
// In generator.rs:
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub(crate) enum SqlType { ... }

pub(crate) fn format_cell_for_sql(...) -> String { ... }

// In excel.rs:
pub(crate) fn excel_cell_to_timestamp_nanos(cell: &Data) -> Option<i64> { ... }
pub(crate) fn infer_cell_data_type(cell: &Data) -> DataType { ... }

CI Integration

Tests run automatically in GitHub Actions via .github/workflows/test.yml on:

  • Push to main or ai/* branches
  • Pull requests targeting main

Checklist

When modifying any file under src-tauri/src/sql/ or src-tauri/src/reader/:

  • Added/updated stability tests in the corresponding <module>_test.rs file (not inline)
  • Added/updated performance tests for hot-path changes
  • Test module is registered in mod.rs with #[cfg(test)]
  • Internal items are pub(crate) if tests need access
  • cargo test --lib <module>::<module>_test passes locally (e.g. sql::generator_test, reader::excel_test)
  • No test uses unwrap() on fallible operations (use ? or assert!)

© shencangsheng, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/rust-sql-test of shencangsheng/easydb_app.

Open the folder on GitHubat commit 1c461a3

Compare with similar skills

Rust SQL Test next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Rust SQL Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Rust SQL Test this skillshencangsheng/easydb_app590—~1.2kAutomated safety check: PassMIT
Data AnalysisHezaoHezao/poirot250—~997Automated safety check: PassMIT
Mindsdb MCP SkillLeoYeAI/openclaw-master-skills2.2k—~2.5kAutomated safety check: PassMIT
Excel and CSV Data Analysisbytedance/deer-flow83k4 repos~2.2kAutomated safety check: PassMIT
Forge Codegen Crudyaomindong1996/forge-admin125—~1.3kAutomated safety check: PassApache-2.0
Spreadsheet QAOneWave-AI/claude-skills322—~2.2kAutomated safety check: PassMIT

Similar skills

  • Data Analysis

    HezaoHezao/poirot

    Analyze Excel/CSV files with DuckDB SQL via bash. An agent skill from HezaoHezao/poirot.

    250 GitHub stars~997 tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Mindsdb MCP Skill

    LeoYeAI/openclaw-master-skills

    MindsDB MCP服务器交互技能,用于通过自然语言查询和操作200+企业级数据源。当用户需要查询数据库、分析数据、创建AI模型、连接数据源(MySQL、PostgreSQL、MongoDB、Excel、CSV、Gmail、Slack等)、执行SQL查询、进行数据预测、构建知识库(RAG)、智能问答、文档检索或任何与数据库交互的任务时使用此技能。即使没有明确提到MindsDB,只要涉及数据库操…

    2.2k GitHub stars~2.5k tokensUpdated 2 mo ago
    DatabasesAuto-check passed
  • Excel and CSV Data Analysis

    bytedance/deer-flow

    Analyzes uploaded Excel and CSV files with SQL through DuckDB, producing schema inspections, statistical summaries and exports to CSV, JSON or Markdown.

    83k GitHub starsUsed in 4 repos~2.2k tokens
    Data & AnalyticsAuto-check passed
  • Forge Codegen Crud

    yaomindong1996/forge-admin

    Generate or review Forge project code-generation output for CRUD modules.

    125 GitHub stars~1.3k tokensUpdated yesterday
    Documents & OfficeAuto-check passed
  • Spreadsheet QA

    OneWave-AI/claude-skills

    Answers business questions about the user's own spreadsheet or data export (CSV, TSV, XLSX from a CRM, Shopify, Stripe, QuickBooks, ad platforms, HR or payroll systems) correctly and auditably.

    322 GitHub stars~2.2k tokensUpdated 5 days ago
    Documents & OfficeAuto-check passed
  • Database Ops

    bkywksj/knowledge-base

    Tauri 本地数据库操作技能,使用 rusqlite 进行 SQLite 数据库操作. An agent skill from bkywksj/knowledge-base.

    330 GitHub stars~1.9k tokensUpdated 5 days ago
    DatabasesAuto-check passed

More from shencangsheng/easydb_app

  • Resolve PR Review

    shencangsheng/easydb_app

    Resolve pull request code review comments end-to-end. An agent skill from shencangsheng/easydb_app.

    590 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Rust No Unwrap

    shencangsheng/easydb_app

    Enforces strict avoidance of unwrap() in Rust code. An agent skill from shencangsheng/easydb_app.

    590 GitHub stars~802 tokensUpdated 1 mo ago
    Auto-check passed

Questions about Rust SQL Test

What does Rust SQL Test do?

Enforces unit test requirements for the Rust data-processing modules in src-tauri/src/sql/ (generator.rs, parse.rs) and src-tauri/src/reader/ (excel.rs and other readers). Rust SQL Test is an agent skill from shencangsheng/easydb_app.rs and other readers).

When should I use Rust SQL Test?

Rust SQL Test fits situations like: reviewing Rust code in these modules; tasks that involve SQL; tasks that involve Unit testing.

How do I install Rust SQL Test in Claude Code?

Run `npx skills add shencangsheng/easydb_app --skill rust-sql-test -a claude-code`. Or copy the skill folder (.cursor/skills/rust-sql-test in shencangsheng/easydb_app) into .claude/skills/rust-sql-test in your project. Claude Code loads it when a task matches its description.

How do I install Rust SQL Test in Codex?

Run `npx skills add shencangsheng/easydb_app --skill rust-sql-test -a codex`. Or copy the skill folder (.cursor/skills/rust-sql-test in shencangsheng/easydb_app) into .agents/skills/rust-sql-test in your project. Codex loads it when a task matches its description.

Can I use Rust SQL Test in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add shencangsheng/easydb_app --skill rust-sql-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rust-sql-test, .gemini/skills/rust-sql-test, .github/skills/rust-sql-test and .opencode/skills/rust-sql-test in your project.

What does Rust SQL Test need to run?

Going by SKILL.md and its folder, Rust SQL Test needs the command-line tools its instructions call (cargo).

Does Rust SQL Test access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Rust SQL Test safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Rust SQL Test use?

Rust SQL Test is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Rust SQL Test use?

About 1.2k tokens (SKILL.md is roughly 4.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Rust SQL Test?

Skills that share tags, products or a category with Rust SQL Test: Data Analysis (HezaoHezao/poirot, 250 stars), Mindsdb MCP Skill (LeoYeAI/openclaw-master-skills, 2.2k stars), Excel and CSV Data Analysis (bytedance/deer-flow, 83k stars) and Forge Codegen Crud (yaomindong1996/forge-admin, 125 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Rust SQL Test?

shencangsheng (a GitHub user) maintains it in shencangsheng/easydb_app, which has 590 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on August 14, 2026.

Source: shencangsheng/easydb_app on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.