Agent skill

Build And Test

by dtprj in dtprj/dongting

Build/test commands, and unit testing key points including BugLog handling guidelines.

Apache-2.0Auto-check passedTesting & QA

Install Build And Test

skills CLI
$ npx skills add dtprj/dongting --skill build-and-test -a claude-code

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

GitHub CLI
$ gh skill install dtprj/dongting build-and-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/dtprj/dongting.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/build-and-test .claude/skills/build-and-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
build-and-test
GitHub stars
208
Token cost
~1.1k tokens
SKILL.md length
498 words
Files
2 (incl. references)
Skills in repo
3
Repo updated
First seen
Licence
Apache-2.0

At a glance

Build/test commands, and unit testing key points including BugLog handling guidelines.

  • Works in 2 steps: If IntelliJ-IDEA MCP is available… → Otherwise (e.g., IDEA not running): Use…
  • Tasks that involve Unit testing
  • SKILL.md covers Quick Reference, Compilation Notes, BugLog in Unit Tests and Build Requirements
  • Calls mvn

What it does

Build And Test is an agent skill from dtprj/dongting. Build/test commands, and unit testing key points including BugLog handling guidelines.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/project-structure.md`).

It sits in Testing & QA, covering Unit testing and Integration testing. It works with Model Context Protocol. The repository describes itself as: Java raft/config/mq/rpc engine, zero dependencies, 10X faster. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Unit testing
  • Tasks that involve Integration testing

Example prompts

  • “/build-and-test”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. If IntelliJ-IDEA MCP is available (recommended): Use it for accurate code analysis and building. See the idea-mcp skill for usage…
  2. Otherwise (e.g., IDEA not running): Use Maven commands directly.

What it can do on your machine

Read from SKILL.md and the folder at commit 0d366e7. 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:

    • mvn

    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

Build And Test loads about 1.1k tokens when it runs, and up to ~1.3k if it reads all its reference files. Until then it costs about 25 tokens; SKILL.md has 498 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~1.3k

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 dtprj/dongting at commit 0d366e7, republished under its Apache-2.0 licence (© dtprj). 498 words, ~1,074 tokens.

Download SKILL.mdSave it as .claude/skills/build-and-test/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
build-and-test
description
Build/test commands, and unit testing key points including BugLog handling guidelines.

Build and Test

This skill provides commands and patterns for building and testing the Dongting project.

Quick Reference

Build Commands
CommandPurpose
mvn clean package -DskipUTsFull build (skips unit tests)
mvn clean package -DskipUTs -PminimalDistMinimal dist (no slf4j/logback)
mvn clean package -DskipUTs -PaddJREDist with trimmed JRE (jlink)
mvn clean package -DskipUTs -PminimalDist,addJREMinimal dist with trimmed JRE (no slf4j/logback/java.xml)
mvn clean compile test-compileCompile with protobuf
Unit Testing
CommandPurpose
mvn clean test -Dtick=3Run all unit tests, takes about 25 seconds to run. It is recommended to redirect to a temporary file, as the large amount of output will be truncated otherwise.
mvn -pl module -am test -Dtest=ClassName -Dtick=3 -Dsurefire.failIfNoSpecifiedTests=falseRun single test class
mvn -pl module -am test -Dtest=ClassName#method -Dtick=3 -Dsurefire.failIfNoSpecifiedTests=falseRun single test method

Tip: Use -Dtick=3 to increase test stability.

Integration Testing
CommandPurpose
mvn verify -DskipUTs -Dtick=3Run all integration tests, takes about 100 seconds to run. It is recommended to redirect to a temporary file, as the large amount of output will be truncated otherwise.
mvn -pl it-test -am verify -DskipUTs=true -Dit.test=ClassName -Dtick=3Run single integration test

Note: Package must be completed before running integration tests. After modifying code, always run mvn clean package -DskipUTs first.

Compilation Notes

Due to the project's complex build process (multiple compilation phases in pom.xml, protobuf compilation), Java LSP may frequently show compilation errors. Use the following approach:

  1. If IntelliJ-IDEA MCP is available (recommended): Use it for accurate code analysis and building. See the idea-mcp skill for usage instructions.
  2. Otherwise (e.g., IDEA not running): Use Maven commands directly.

BugLog in Unit Tests

The project uses BugLogExtension to check BugLog state after each test. If BugLog was triggered, the test fails with "BugLog count should be 0".

Show full SKILL.md (206 more words)Show less
Key Points
  1. BugLog state is global - One test not resetting BugLog causes ALL subsequent tests to fail
  2. Only fix the FIRST failing test - When multiple tests fail due to BugLog, find and fix only the first one; the others will pass automatically
  3. Not all time adjustments trigger BugLog - Only operations that cause "nanoTime go back" or other error conditions trigger BugLog
  4. Reset immediately after the triggering code - Don't wrap the entire test in try-finally; reset right after the code that triggers BugLog
When to Reset BugLog

Reset BugLog only in tests that intentionally trigger error conditions:

  • Tests that call TestUtil.updateTimestamp() to simulate time passage (may cause "nanoTime go back")
  • Tests that intentionally create invalid states to test error handling
  • Tests that throw mock exceptions to test retry logic
Example
java
@Test
void testLockExpiration() {
    // ... test code ...
    TestUtil.updateTimestamp(ts, ts.nanoTime + 100_000_000L, ts.wallClockMillis + 100);
    // ... operations that cause Timestamp.refresh() or update() to detect "nanoTime go back" ...
    // The time adjustment + subsequent operations trigger BugLog
    BugLog.reset();
    // ... more test code ...
}
Rules
  • DO reset immediately after the code that triggers BugLog
  • DO add a brief comment explaining why BugLog might be triggered
  • DO NOT reset in @BeforeEach/@AfterEach/@BeforeAll/@AfterAll - this hides problems
  • DO NOT reset in test base classes
  • DO NOT wrap entire test methods in try-finally just for BugLog.reset()

Build Requirements

  • Java version: Java 11 for server, Java 8 for client module
  • Build tool: Maven
  • Module structure: Multi-module Maven project

See project-structure.md for module details.

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

Files

SKILL.md and 1 other file (references) in .agents/skills/build-and-test of dtprj/dongting.

  • SKILL.md
  • references/project-structure.md

Open the folder on GitHubat commit 0d366e7

Compare with similar skills

Build And 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.

Build And Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Build And Test this skilldtprj/dongting208—~1.1kAutomated safety check: PassApache-2.0
Integration Testings-morgan-jeffries/apple-mail-fast-mcp104—~1.2kAutomated safety check: PassMIT
MCP Testingadeze/raindrop-mcp188—~1.6kAutomated safety check: PassMIT
Sapui5secondsky/sap-skills462—~4.1kAutomated safety check: PassGPL-3.0
Hilla TestAI-Unified-Process/marketplace142—~3.9kAutomated safety check: WarnApache-2.0
Clean PytestLeoYeAI/openclaw-master-skills2.2k—~4.2kAutomated safety check: PassMIT

Similar skills

  • Integration Testing

    s-morgan-jeffries/apple-mail-fast-mcp

    A skill your agent uses when setting up, running, or debugging integration tests against real Apple Mail.

    104 GitHub stars~1.2k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • MCP Testing

    adeze/raindrop-mcp

    MCP Testing Strategies with Vitest, Inspector, and Integration Tests

    188 GitHub stars~1.6k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • Sapui5

    secondsky/sap-skills

    This skill should be used when developing SAP UI5 applications, including creating freestyle apps, Fiori Elements apps, custom controls, testing, data binding, OData integration, routing, and…

    462 GitHub stars~4.1k tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Hilla Test

    AI-Unified-Process/marketplace

    Creates tests for Hilla use cases on both sides of the browser boundary: Vitest + React Testing Library tests for the React/TypeScript view (with the generated endpoint clients mocked) and Spring…

    142 GitHub stars~3.9k tokensUpdated 5 days ago
    Testing & QAAuto-check: warnings
  • Clean Pytest

    LeoYeAI/openclaw-master-skills

    Write clean, maintainable pytest tests using Fake-based testing, contract testing, and dependency injection patterns.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Testing & QAAuto-check passed
  • Test Writing Workflow

    iOfficeAI/AionUi

    Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.

    33k GitHub starsUsed in 1 repo~1.2k tokens
    Testing & QAAuto-check passed

More from dtprj/dongting

  • Idea MCP

    dtprj/dongting

    IntelliJ IDEA MCP for Java code analysis, testing, refactoring, and project navigation.

    208 GitHub stars~698 tokensUpdated today
    Auto-check passed
  • Run

    dtprj/dongting

    Used to start or stop the project's server in development mode via scripts, or run DtAdmin for test cluster O&M operations, or run benchmarks.

    208 GitHub stars~618 tokensUpdated today
    Auto-check passed

Categories

Questions about Build And Test

What does Build And Test do?

Build/test commands, and unit testing key points including BugLog handling guidelines. Build And Test is an agent skill from dtprj/dongting. Build/test commands, and unit testing key points including BugLog handling guidelines.

When should I use Build And Test?

Build And Test fits situations like: tasks that involve Unit testing; tasks that involve Integration testing.

How do I install Build And Test in Claude Code?

Run `npx skills add dtprj/dongting --skill build-and-test -a claude-code`. Or copy the skill folder (.agents/skills/build-and-test in dtprj/dongting) into .claude/skills/build-and-test in your project. Claude Code loads it when a task matches its description.

How do I install Build And Test in Codex?

Run `npx skills add dtprj/dongting --skill build-and-test -a codex`. Or copy the skill folder (.agents/skills/build-and-test in dtprj/dongting) into .agents/skills/build-and-test in your project. Codex loads it when a task matches its description.

Can I use Build And 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 dtprj/dongting --skill build-and-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/build-and-test, .gemini/skills/build-and-test, .github/skills/build-and-test and .opencode/skills/build-and-test in your project.

What does Build And Test need to run?

Going by SKILL.md and its folder, Build And Test needs the command-line tools its instructions call (mvn).

Does Build And 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 Build And 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 Build And Test use?

Build And Test is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Build And Test use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 230 tokens, read only when the agent opens those files.

What are the alternatives to Build And Test?

Skills that share tags, products or a category with Build And Test: Integration Testing (s-morgan-jeffries/apple-mail-fast-mcp, 104 stars), MCP Testing (adeze/raindrop-mcp, 188 stars), Sapui5 (secondsky/sap-skills, 462 stars) and Hilla Test (AI-Unified-Process/marketplace, 142 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Build And Test?

dtprj (a GitHub organization) maintains it in dtprj/dongting, which has 208 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 10, 2026.

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