typescript-patterns

typescript-patterns is a cursor rule for Cursor from fmflurry/harness-manifesto. It costs 0 tokens per session (279 once invoked), scanned A, original, MIT.

A set of TypeScript and JavaScript design patterns. It defines a common shape for API responses, shows how to write reusable React hooks such as a debounce hook, and describes a repository interface for data operations.

In plain words
What is it for?
Use it when designing API response objects, writing reusable hooks, or defining repositories that find, create, update, and delete records.
Why use it?
It gives related code a predictable shape, making API results and data-access code easier to understand and reuse. It also provides a shared place for common application patterns.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when designing API response objects, writing reusable hooks, or defining repositories that find, create, update, and delete records.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/fmflurry/harness-manifesto/typescript-patterns
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.

Clone the repo
git clone --depth 1 https://github.com/fmflurry/harness-manifesto

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 typescript-patterns

README.md
[![agentmods](https://agentmods.dev/badge/rules/fmflurry/harness-manifesto/typescript-patterns/github.svg)](https://agentmods.dev/rules/fmflurry/harness-manifesto/typescript-patterns)
Your own site
<a href="https://agentmods.dev/rules/fmflurry/harness-manifesto/typescript-patterns"><img src="https://agentmods.dev/badge/rules/fmflurry/harness-manifesto/typescript-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for typescript-patterns

Your own site · 80×15
<a href="https://agentmods.dev/rules/fmflurry/harness-manifesto/typescript-patterns"><img src="https://agentmods.dev/badge/rules/fmflurry/harness-manifesto/typescript-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 279 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.00279
Opus 5.5 $0.00000 $0.00112
Sonnet 5.5 $0.00000 $0.00056
Haiku 4.5 $0.00000 $0.00028

Measured 15d ago against content hash b3f886afbce0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

typescript-patterns 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 15d 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.

plugins/fmflurry-harness/rules/typescript-patterns.mdc · 51 lines

What it actually says

TypeScript/JavaScript Patterns

Load the patterns skill for the shared patterns. This file is the TypeScript addition.

API Response Format

interface ApiResponse<T> {
  success: boolean
  data?: T
  error?: string
  meta?: {
    total: number
    page: number
    limit: number
  }
}

Custom Hooks Pattern

export function useDebounce<T>(value: T, delay: number): T {
  const [debouncedValue, setDebouncedValue] = useState<T>(value)

  useEffect(() => {
    const handler = setTimeout(() => setDebouncedValue(value), delay)
    return () => clearTimeout(handler)
  }, [value, delay])

  return debouncedValue
}

Repository Pattern

interface Repository<T> {
  findAll(filters?: Filters): Promise<T[]>
  findById(id: string): Promise<T | null>
  create(data: CreateDto): Promise<T>
  update(id: string, data: UpdateDto): Promise<T>
  delete(id: string): Promise<void>
}
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. 15d ago First seen · 51 lines · 0 tokens per session scan A b3f886afbce0

Subscribe to this mod's changes

typescript-patterns is a cursor rule published in the GitHub repository fmflurry/harness-manifesto (173 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 279 tokens. 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-11-15.

Related

typescript-patterns compared with cursor rules from other repositories

typescript-patterns next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
typescript-patternsfmflurry/harness-manifestoCursor rule17311d agoMITA0Cursor
nestjssanjeed5/awesome-cursor-rules-mdcCursor rule3.6k7d agoCC0-1.0A2,058Cursor
django-pythonPostHog/posthogCursor rule41ktodaynoneA1,586Cursor
nestjs-best-practicesepam/ai-dial-chatCursor rule501todayApache-2.0A14Cursor
python--typescript-guide-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A226Cursor
typescript-patternsfmflurry/settings-opencodeCursor rule17024d agoMITA0Cursor
standard-nestjs-module-hierarchyPackmindHub/packmindCursor rule32720d agoApache-2.0A314Cursor