agentleFS
MicrosoftKnown publishermicrosoft/FluidFramework/.agency/plugins/nori/skills/test-driven-development/SKILL.md

test-driven-development

Skill4.9k starsChanged 4 months agoMITView on GitHub

Use when implementing any feature or bugfix, before writing implementation code - write the test first, watch it fail, write minimal code to pass; ensures tests actually verify behavior by requiring failure first

191 other projects use a version of this, 92 of them edited.

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 2 mentionsMar 2026: 1 mentionApr 2026: 1 mentionMay 2026: 3 mentionsJun 2026: 21 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/FluidFramework repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about microsoft/FluidFramework

The biggest 5 of 46 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 46

Talked about on GitHub and Hacker News (46 times).

On GitHub · 42

37 more on GitHub

Used with

Projects with it also use diagnosing-superpowers, api-and-interface-design and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • obraSkill

    diagnosing-superpowers

    Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

    Also in 6 projects that use this

  • LLl0k0laDSkill

    api-and-interface-design

    Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

    Also in 32 projects that use this

  • MorningStar0709Skill

    workflow-runner

    Run an agency-orchestrator style YAML workflow inside the current Trae conversation by simulating or coordinating multiple roles. Use when the user provides a `.yaml` or `.yml` workflow, asks for multi-role collaboration, says things like “用多个角色一起评审这个 PRD”“多角色协作”“先生成工作流再执行”“让产品经理、架构师、QA 一起看一下”, or wants roles such as product manager, architect, reviewer, or QA to work together. Supports layered execution, role prompting, variable interpolation, document-backed inputs, and parallel steps only when the current environment has a clear subagent mapping. Do not use for ordinary implementation plans, simple code changes, or tasks already covered by `writing-plans`, `executing-plans`, `subagent-driven-development`, or single-purpose review/debug skills.

    Also in 5 projects that use this

  • LLl0k0laDSkill

    using-agent-skills

    Use when starting a session or when you need to discover which skill applies to the current task. This is the meta-skill that governs how all other skills are discovered and invoked.

    Also in 25 projects that use this

  • MorningStar0709Skill

    chinese-git-workflow

    Configure Git for domestic platforms and manage branching strategies suitable for Chinese teams. Use when the user asks to configure remotes, set up SSH, or manage Git workflows for Gitee, Coding, Jihu GitLab, or CNB, including requests like "配置国内 Git", "设置 Gitee 远程仓库", "推荐适合小团队的 Git 流程".

    Also in 4 projects that use this

  • vinvcnSkill

    constraint-driven-development

    把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。

    Also in 4 projects that use this

  • +5 more from LLl0k0laD

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. 0 are common, 15 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 177 edited versions we read keep these.

  • 15

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write failing tests (RED phase)

    line 9
  2. Distinctive:

    Create a subagent using the nori-task-runner to evaluate test quality.

    line 11
  3. Distinctive:

    Ensure that each test does not just test mocks.

    line 12
  4. Distinctive:

    Ensure each test does not test implementation detail.

    line 13
  5. Distinctive:

    Ensure each test does not test data structure format or types.

    line 14
  6. Distinctive:

    Ensure each test does not test for removed behavior.

    line 15
  7. Distinctive:

    Verify the test fails due to the behavior of the application, and NOT due to the test.

    line 18
  8. Distinctive:

    Write the minimal amount of code necessary to make the test pass (GREEN phase)

    line 20
  9. Distinctive:

    Verify the test now passes due to the behavior of the application.

    line 21
  10. Very specific:

    If you go through three loops without making progress, switch to running .claude/skills/creating-debug-tests-and-iterating

    line 22
  11. Distinctive:

    Verify tests still pass. </required>

    line 24
  12. Distinctive:

    Write one minimal test showing what should happen.

    line 29
  13. Distinctive:

    Test fails (not errors)

    line 79
  14. Distinctive:

    Write simplest code to pass the test.

    line 85
  15. Distinctive:

    Don't add features, refactor other code, or "improve" beyond the test.

    line 119
  16. Distinctive:

    Keep tests green. Do not add behavior.

    line 141

“Common” is measured: kept by at least 6 in 10 of the 177 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<required> *CRITICAL* Add the following steps to your Todo list using TodoWrite:
  1. Write failing tests (RED phase)
  2. Create a subagent using the nori-task-runner to evaluate test quality.
  • Ensure that each test does not just test mocks. If it does, remove the test and try again.
  • Ensure each test does not test implementation detail. If it does, rewrite the test so that it tests boundary behavior.
  • Ensure each test does not test data structure format or types. If it does, remove the test and try again.
  • Ensure each test does not test for removed behavior. For example, if some behavior has been deprecated, do not write a test that simply confirms the behavior no longer works.
  • Evaluate if the test treats the interior of the test boundary as a blackbox. You should not know anything about interior variables, function calls, or control flow.
  1. Verify the test fails due to the behavior of the application, and NOT due to the test. <system-reminder>If you have more than one test that you need to write, you should write all of them before moving to the GREEN phase.</system-reminder>
  2. Write the minimal amount of code necessary to make the test pass (GREEN phase)
  3. Verify the test now passes due to the behavior of the application.
    • If you go through three loops without making progress, switch to running .claude/skills/creating-debug-tests-and-iterating
  4. Refactor the code to clean it up.
  5. Verify tests still pass.</required>

RED - Write Failing Test

Write one minimal test showing what should happen.

<good-example>
test('retries failed operations 3 times', async () => {
  let attempts = 0;
  const operation = () => {
    attempts++;
    if (attempts < 3) throw new Error('fail');
    return 'success';
  };

  const result = await foobar.retryOperation(operation);

  expect(result).toBe('success');
  expect(attempts).toBe(3);
});

Clear name, tests real behavior, one thing. Note that the tested operation is imported -- this is a STRONG sign that this is testing something real.

</good-example><bad-example>
test('retry works', async () => {
  const mock = jest
    .fn()
    .mockRejectedValueOnce(new Error())
    .mockRejectedValueOnce(new Error())
    .mockResolvedValueOnce('success');
  await retryOperation(mock);
  expect(mock).toHaveBeenCalledTimes(3);
});

Vague name, tests mock not code </bad-example>

Verify RED - Watch It Fail

npm test path/to/test.test.ts

Confirm:

  • Test fails (not errors)
  • Failure message is expected
  • Fails because feature missing (not typos)

GREEN - Minimal Code

Write simplest code to pass the test.

<good-example> ```typescript async function retryOperation<T>(fn: () => Promise<T>): Promise<T> { for (let i = 0; i < 3; i++) { try { return await fn(); } catch (e) { if (i === 2) throw e; } } throw new Error('unreachable'); } ``` Just enough to pass </good-example><bad-example> ```typescript async function retryOperation<T>( fn: () => Promise<T>, options?: { maxRetries?: number; backoff?: 'linear' | 'exponential'; onRetry?: (attempt: number) => void; } ): Promise<T> { // YAGNI } ``` Over-engineered </bad-example>

Don't add features, refactor other code, or "improve" beyond the test.

Verify GREEN - Watch It Pass

npm test path/to/test.test.ts

Confirm:

  • Test passes
  • Other tests still pass
  • Output pristine (no errors, warnings)

REFACTOR - Clean Up

After green only:

  • Remove duplication
  • Improve names
  • Extract helpers

Keep tests green. Do not add behavior.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.