Dust Test logo

Dust Test

OrganizationPopular
dust-tt
dust-test

Step-by-step guide for writing focused, practical tests for Dust codebases following the 80/20 principle.

Overview

Publisherdust-tt
Repositorydust
Skill namedust-test
Stars
1.5K
Forks
370
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dust-tt on GitHub. Read the source before you install it.

Installation

Install the Dust Test AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dust-tt/dust/tree/main/.claude/skills/dust-test
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dust-tt/dust.git /tmp/dust
mkdir -p .claude/skills
cp -r /tmp/dust/.claude/skills/dust-test .claude/skills/dust-test
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Dust Test in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Dust Test on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Dust Test is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Creating automated tests for Dust codebases

Write focused, practical tests for the current file following the 80/20 principle.

Instructions

When writing tests for a file:

  1. Identify the core functionality: Focus on the most important paths and edge cases that provide 80% of the value
  2. Keep it simple: Write straightforward tests that are easy to understand and maintain
  3. Minimal mocking:
    • DO NOT mock the database
    • Only mock external services (APIs, third-party services)
    • Prefer real implementations when possible
  4. Use shared factories: Set up data with the existing factories, never by hand (see below)
  5. Focus on behavior: Test what the code does, not how it does it

For Front and Front-api (TypeScript)

Front-api tests import the same helpers from @app/tests/utils/....

Setup

Every test runs inside a database transaction that is rolled back afterwards, so tests can create real records freely without cleanup.

Before writing any helper, look in front/tests/utils/ for one that already exists:

NeedUse
Workspace + user + membership + AuthenticatorcreateResourceTest({ role }) from generic_resource_tests
Request/response for an API route handlercreatePrivateApiMockRequest, createPublicApiMockRequest, createPokeApiMockRequest
A single database recordThe matching <Name>Factory (e.g. WorkspaceFactory.basic(), UserFactory.basic(), SpaceFactory.regular(...), AgentConfigurationFactory.createTestAgent(...), ConversationFactory.create(...))
A plain object for a component or pure-logic testLightWorkspaceFactory.build(), LightUserFactory.build(), LightPlanFactory, LightSubscriptionFactory
A mocked service (Redis, file storage, WorkOS...)front/tests/utils/mocks/. Redis, cache, file storage and Temporal are already mocked globally in front/vite.setup.ts; do not mock them again

Rules (backed by the testing contracts in front/CONTRACTS and no-unsafe-type-assertions in the root CONTRACTS):

  • Set up data through factories, not SomeResource.makeNew(...) or SomeModel.create(...) in the test (test-setup-through-factories, tests-use-resources). Direct model access is allowed only when no Resource API can express the fixture.
  • If a factory exists but does not support what you need (a status, a date, a relation), add an option to the factory instead of working around it in the test. If no factory exists, add a new <Name>Factory.ts in front/tests/utils/ rather than a local helper in the test file (shared-test-fixtures).
  • Do not hand-write typed objects or cast partial ones ({ sId: "w_1" } as LightWorkspaceType). Use the matching Light*Factory.build({ ...overrides }) (shared-test-fixtures, no-unsafe-type-assertions).
  • Do not vi.mock a module that front/vite.setup.ts already mocks (no-duplicate-global-mocks).

Structure

typescript
import { describe, expect, it } from "vitest";

import { createResourceTest } from "@app/tests/utils/generic_resource_tests";
import { AgentConfigurationFactory } from "@app/tests/utils/AgentConfigurationFactory";

describe("functionUnderTest", () => {
  it("handles the main happy path", async () => {
    // Arrange: set up with shared helpers and factories.
    const { authenticator } = await createResourceTest({ role: "admin" });
    const agent = await AgentConfigurationFactory.createTestAgent(authenticator);

    // Act.
    const result = await functionUnderTest(authenticator, agent.sId);

    // Assert.
    expect(result.isOk()).toBe(true);
  });

  it("rejects callers without permission", async () => {
    const { authenticator } = await createResourceTest({ role: "user" });
    // ...
  });
});

What to test (80/20 focus)

  • Main success paths
  • Most common error conditions
  • Critical edge cases (null/undefined, empty arrays, etc.)
  • Permission checks (if applicable)

What to skip (diminishing returns)

  • Exhaustive parameter combinations
  • Unlikely edge cases
  • Internal implementation details
  • UI component rendering (unless critical)

For Connectors/Core

Follow similar principles:

  • Use factories appropriate to the service
  • Focus on integration points
  • Mock external APIs only (Slack, Notion, GitHub, etc.)
  • Test the database interactions directly

Execution Steps

  1. Read the file to understand its purpose and main exports
  2. Check if a test file already exists (e.g., file.test.ts)
  3. Identify the 2-4 most important functions/behaviors to test
  4. Check front/tests/utils/ for the factories and helpers you need; extend or add a factory there if one is missing
  5. Write concise, focused tests
  6. Run tests from front/ with npm run test -- path/to/file.test.ts to verify they pass

Frequently asked questions

What does the Dust Test AI skill do?

Step-by-step guide for writing focused, practical tests for Dust codebases following the 80/20 principle.

Why use Dust Test on TypingMind?

Because you install it once and use it with any model. Dust Test is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Dust Test in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dust-tt/dust/tree/main/.claude/skills/dust-test. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Dust Test?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Dust Test?

As many as you like. As long as a model supports skills, you can use Dust Test with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Dust Test AI skill free?

Yes. It is published on GitHub by dust-tt under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇