generate-test

A frontend testing tool that reads source code, Figma designs, and requirements to create tests based on behavior scenarios. It can also run the generated tests.

In plain words
What is it for?
Use it to create or update tests for React components and hooks, optionally using Figma links and requirements as context. It can also detect recently changed files when no file is specified.
Why use it?
It reduces the manual work of deciding what a component or hook should test and writing those tests. It can also create failing tests first when using TDD, a practice of writing tests before implementation.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/ggombee/code-forge/generate-test
Any agent
npx skills add ggombee/code-forge --skill generate-test
Clone the repo
git clone --depth 1 https://github.com/ggombee/code-forge

Made for: Claude Code, Codex.

Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,303 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00046 $0.01303
Opus 5 $0.00023 $0.00651
Sonnet 5 $0.00009 $0.00261
Haiku 4.5 $0.00005 $0.00130

Measured 2d ago against content hash bba0a50e7347, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

generate-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/generate-test/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/generate-test

참조: 테스트 설계 시 rules/build-guide.md (React/TS 패턴)

프론트엔드 컴포넌트/훅의 테스트 코드를 자동 생성합니다.

사용법

# 파일 경로 지정
/generate-test src/pages/product/components/ProductCard/index.tsx

# 파일 경로 + Figma 디자인 URL
/generate-test src/pages/product/components/ProductCard/index.tsx --figma https://www.figma.com/design/xxx?node-id=123

# 파일 경로 + Figma + 요구사항 URL (여러 개 가능)
/generate-test src/pages/product/components/ProductCard/index.tsx --figma https://www.figma.com/design/xxx?node-id=123 --req https://www.figma.com/design/xxx?node-id=456 --req https://www.figma.com/design/xxx?node-id=789

# TDD 모드 -- 구현 전에 실패하는 테스트 먼저 생성
/generate-test src/pages/product/components/ProductCard/index.tsx --tdd

# 인자 없이 -- 최근 변경 파일 자동 감지
/generate-test

실행 워크플로우

Arguments: $ARGUMENTS

인자가 있는 경우:

  1. 인자를 파싱합니다:

    • 첫 번째 인자: 대상 파일 경로
    • --figma [URL]: Figma 디자인 URL
    • --req [URL]: 요구사항 URL (여러 개 가능)
    • --tdd: TDD 모드 강제 적용 (구현 전에 실패하는 테스트 먼저 생성)
  2. 대상 파일이 존재하는지 확인합니다.

  3. mode를 결정합니다:

    • --tdd 옵션 있음 -> tdd 모드
    • --tdd 없으면 -> assayer 에이전트가 소스 파일 상태를 보고 자동 결정 (파일 미존재/스켈레톤 -> tdd, 구현됨+테스트 없음 -> create, 구현됨+테스트 있음 -> update)
  4. assayer 에이전트에게 Task tool로 위임합니다:

    Task(subagent_type: "assayer", prompt: "
      targetPath: [대상 파일 경로]
      mode: [create | update | tdd] (--tdd 시 tdd, 아니면 미지정하여 에이전트가 자동 감지)
      figmaUrl: [Figma URL 또는 없음]
      requirementUrls: [요구사항 URL 목록 또는 없음]
    ")
    
  5. 에이전트 결과를 요약하여 사용자에게 보고합니다.

인자가 없는 경우 (자동 감지 모드):

@see JSDoc 태그가 있는 파일만 자동 감지 대상으로 합니다. 기획서/디자인 링크가 연결된 파일이 테스트 생성 효과가 가장 높기 때문입니다.

  1. git diff --name-onlygit diff --cached --name-only로 최근 변경 파일 목록을 확인합니다.

  2. 기본 필터링:

    • .ts, .tsx, .js, .jsx 파일만
    • 제외: *.test.*, *.spec.*, *.stories.*, *.mock.*, styled.*, constants.*, types.*
    • 제외 디렉토리: node_modules, dist, .next, __mocks__, __tests__
  3. @see 태그 필터링: 각 파일을 Grep하여 @see JSDoc 태그가 포함된 파일만 대상으로 선정합니다.

    • @see 태그가 없는 파일은 자동 감지 대상에서 제외
    • @see 태그가 없는 파일에 테스트를 생성하려면 경로를 직접 지정: /generate-test src/path/to/file.tsx

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 119 lines · 46 tokens per session scan A bba0a50e7347

Subscribe to this mod's changes

generate-test is a skill published in the GitHub repository ggombee/code-forge (13 stars, last pushed 2mo ago), licensed MIT. It adds 46 tokens to every session and 1,303 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.