test-guide

test-guide is a cursor rule for Cursor from first-fluke/fullstack-starter. It costs 7 tokens per session (1,420 once invoked), scanned A, original, MIT.

A project testing guide covering web, API, worker, and mobile code. It explains which test tools and file patterns are used and gives commands for running tests and coverage checks.

In plain words
What is it for?
Use it to run all tests or tests for one app, start watch mode, check coverage, and identify web unit and integration test files.
Why use it?
It puts the project's testing commands and conventions in one place, so developers do not need to discover them separately for each application.

Cursor rule for Cursor

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 rules/first-fluke/fullstack-starter/test-guide
Clone the repo
git clone --depth 1 https://github.com/first-fluke/fullstack-starter

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for test-guide

README.md
[![agentmods](https://agentmods.dev/badge/rules/first-fluke/fullstack-starter/test-guide.svg)](https://agentmods.dev/rules/first-fluke/fullstack-starter/test-guide)
Your own site
<a href="https://agentmods.dev/rules/first-fluke/fullstack-starter/test-guide"><img src="https://agentmods.dev/badge/rules/first-fluke/fullstack-starter/test-guide.svg" alt="Measured on agentmods" height="20"></a>
Per session 7 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,420 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.00007 $0.01420
Opus 5 $0.00003 $0.00710
Sonnet 5 $0.00001 $0.00284
Haiku 4.5 $0.00001 $0.00142

Measured today against content hash 450b5bd77ab2, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-guide 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 today.

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.

.cursor/rules/test-guide.mdc · 288 lines

How it starts

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

Test Guide

Overview

Testing stack:

  • Web: Vitest (unit/integration)
  • API: pytest + pytest-asyncio
  • Worker: pytest + pytest-asyncio
  • Mobile: flutter_test

Quick Commands

Run All Tests

# All tests
mise test

# Or individually
mise //apps/api:test
mise //apps/web:test
mise //apps/worker:test
mise //apps/mobile:test

Watch Mode

# Web
cd apps/web && bun test:watch

# API (use pytest-watch)
cd apps/api && uv run ptw

Coverage

# Web
cd apps/web && bun test:coverage

# API
cd apps/api && uv run poe test:cov

# Flutter
cd apps/mobile && flutter test --coverage

Web Testing (Vitest)

Configuration

See apps/web/vitest.config.mts.

File Patterns

  • Unit tests: **/*.test.{ts,tsx}
  • Integration tests: **/*.spec.{ts,tsx}

Example Unit Test

// src/lib/utils.test.ts
import { describe, it, expect } from 'vitest';
import { cn } from './utils';

describe('cn', () => {
  it('should merge class names', () => {
    expect(cn('foo', 'bar')).toBe('foo bar');
  });

  it('should handle conditional classes', () => {
    expect(cn('foo', false && 'bar', 'baz')).toBe('foo baz');
  });
});

Example Component Test

// src/components/button.test.tsx
import { describe, it, expect } from 'vitest';
import { render, screen } from '@testing-library/react';
import { Button } from './button';

describe('Button', () => {
  it('should render children', () => {
    render(<Button>Click me</Button>);
    expect(screen.getByRole('button')).toHaveTextContent('Click me');
  });
});

Mocking

import { vi } from 'vitest';

// Mock module
vi.mock('@/lib/api-client', () => ({
  apiClient: {
    get: vi.fn(),
    post: vi.fn(),
  },
}));

// Mock function
const mockFn = vi.fn().mockResolvedValue({ data: 'test' });

API Testing (pytest)

Configuration

See apps/api/pyproject.toml [tool.pytest.ini_options].

Read the full file on GitHub · 288 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. today First seen · 288 lines · 7 tokens per session scan A 450b5bd77ab2

Subscribe to this mod's changes

test-guide is a cursor rule published in the GitHub repository first-fluke/fullstack-starter (222 stars, last pushed today), licensed MIT. It adds 7 tokens to every session and 1,420 once invoked, about $0.0000 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-09-03.