jawn

jawn is a cursor rule for Cursor from Helicone/helicone. It costs 543 tokens per session, scanned A, original, Apache-2.0.

Coding rules for Helicone’s Jawn backend and frontend, covering REST API controllers, database managers, and TanStack Query hooks for fetching and changing data.

In plain words
What is it for?
Use them when adding Jawn API endpoints, connecting controllers to database managers, implementing frontend data requests or updates, and defining the related types.
Why use it?
They keep related backend and frontend code organized in the same patterns, making new work easier to review and maintain. TanStack Query is a library for managing data loaded from APIs in user interfaces.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them when adding Jawn API endpoints, connecting controllers to database managers, implementing frontend data requests or updates, and defining the related types.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/helicone/helicone/jawn
About the project

Helicone is an open-source platform for monitoring and routing requests to large language models. AI engineers use it to inspect agent and application traces, track cost and latency, evaluate quality, manage prompts, and access multiple models through an API gateway. Catalogue add-ons support observability and LLM workflow tasks.

Helicone/helicone · 6,226 stars · on GitHub · helicone.ai

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/Helicone/helicone

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 jawn

README.md
[![agentmods](https://agentmods.dev/badge/rules/helicone/helicone/jawn/github.svg)](https://agentmods.dev/rules/helicone/helicone/jawn)
Your own site
<a href="https://agentmods.dev/rules/helicone/helicone/jawn"><img src="https://agentmods.dev/badge/rules/helicone/helicone/jawn/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 jawn

Your own site · 80×15
<a href="https://agentmods.dev/rules/helicone/helicone/jawn"><img src="https://agentmods.dev/badge/rules/helicone/helicone/jawn.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 543 This file is loaded in full into every session.
When invoked 543 The same file — it is already loaded in full.
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.00543 $0.00543
Opus 5.5 $0.00217 $0.00217
Sonnet 5.5 $0.00109 $0.00109
Haiku 4.5 $0.00054 $0.00054

Measured 1mo ago against content hash 691a78ad487b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

jawn 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 1mo 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.

.cursor/rules/jawn.mdc · 73 lines

How it starts

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

Helicone Jawn Controller and TanStack Query Integration

Controller Pattern

  • Jawn controllers (valhalla/jawn/src/controllers/) follow a RESTful design with standard HTTP methods
  • Controllers use decorators like @Route, @Get, @Post, etc. from TSOA
  • Controllers accept JawnAuthenticatedRequest and return Result<T, string>
  • Required parameters should come before optional parameters in controller methods

Manager Pattern

  • Each controller has a corresponding manager (valhalla/jawn/src/managers/)
  • Managers extend BaseManager and handle database operations
  • Managers receive authParams from the controller request
  • Use dbExecute for database operations and wrap results in Result<T, string>

Frontend Hooks with TanStack Query

  • Use useJawnClient() to interact with Jawn controllers

  • Implement custom hooks with TanStack Query for data fetching and mutations

  • For GET requests:

    const query = useQuery({
      queryKey: ['resource', id],
      queryFn: async () => {
        const response = await jawn.GET('/v1/resource/{id}', {
          params: { path: { id } }
        });
        if (response.error) throw response.error;
        return response.data;
      }
    });
    
  • For mutations:

    const mutation = useMutation({
      mutationFn: async (input) => {
        const response = await jawn.POST('/v1/resource', {
          body: input
        });
        if (response.error) throw response.error;
        return response.data;
      },
      onSuccess: (data) => {
        // Invalidate queries
        queryClient.invalidateQueries({ queryKey: ['resource'] });
      }
    });
    

Type Definitions

  • Define request and response interfaces in the controller file
  • Use proper typing with TanStack Query
  • Handle Jawn response structure properly with error checking

URL State Management

  • Use URL parameters for persisting filter state between pages
  • Update URL when filter changes with useSearchParams from Next.js

Database Schema

  • Tables follow snake_case naming
  • Use proper indexes for performance
  • Implement proper RLS policies for security
  • Create functions for specialized operations (e.g., incrementing versions)

Read the full file on GitHub · 73 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. 1mo ago First seen · 73 lines · 543 tokens per session scan A 691a78ad487b

Subscribe to this mod's changes

jawn is a cursor rule published in the GitHub repository Helicone/helicone (6,226 stars, last pushed 7d ago), licensed Apache-2.0. It adds 543 tokens to every session, about $0.0022 per session on Opus 5.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.