本文へ移動
cccskills
無料GitHub で公開

principle-test-behavior-not-implementation

Apply when you write, change, or keep a test. Call the code as its users do and assert the exact result they see. Rewrite or delete a test that would pass if every imported function returned undefined.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md1.4 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Test Behavior, Not Implementation

A test calls the code as its users do and asserts the exact result they see. Rewrite or delete any test that would still pass if every imported function returned undefined or a wrong value.

These shapes fail that check:

  • Loose or no assertion: toBeDefined, toBeTruthy, not.toThrow, toBeGreaterThan(0).
  • Call or absence only: toHaveBeenCalled, not.toHaveBeenCalled, toBeUndefined, toEqual([]).
  • Expected value computed by the code under test: expect(f(a)).toBe(f(a)).
  • Restated constant, config default, table row, or prompt string.
  • Assertions on data the test built, with no call to the subject.

Fix: call the subject in the test body with one concrete input and assert the literal output or effect. For a mock, assert the payload it received. For an absence, also assert the presence on another input. For a constant, test the mechanism that reads it with one input instead of restating the value.

Keep relation checks across table rows (a key in two tables, a parent that exists) and *.test-d.ts type checks.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

architect

無料

Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape.

日本語の概要は準備中です。原文の説明を表示しています。

backnotprop/pstack1,7102026年10月12日 更新

arena

無料

Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape.

日本語の概要は準備中です。原文の説明を表示しています。

backnotprop/pstack1,7102026年10月12日 更新

Use for "automate me", "create/update/refresh my -mode skill", "turn/capture my preferences or working style into a skill", or wanting agents to follow how the user works. Drafts or revises a personal -mode skill via create-skill + unslop, optionally pulling fresh evidence from recent transcripts.

日本語の概要は準備中です。原文の説明を表示しています。

backnotprop/pstack1,7102026年10月12日 更新

Vet a perf measurement (limiter, tuning, limits, errors, repeatability, relevance, and whether the work happened) before you report or act on it. Use when you run a benchmark or report a speedup or regression you measured.

日本語の概要は準備中です。原文の説明を表示しています。

backnotprop/pstack1,7102026年10月12日 更新

Find what a change could break somewhere else before it ships, beyond the diff, and prove the one fact it's safe because of by running real code instead of writing it up. Use for 'blast radius of X', 'what could this break', or reviewing a small diff you don't trust.

日本語の概要は準備中です。原文の説明を表示しています。

backnotprop/pstack1,7102026年10月12日 更新

bro

無料

Restate the last message in plain human language, with no jargon.

日本語の概要は準備中です。原文の説明を表示しています。

backnotprop/pstack1,7102026年10月12日 更新

backnotprop のスキルをすべて見る

このスキルの問題を報告する