igniter-procedures

igniter-procedures is a cursor rule for Cursor from felipebarcelospro/igniter-js. It costs 37 tokens per session (1,109 once invoked), scanned A, original, Apache-2.0.

A guide to Igniter.js procedures and the context system. Explains how to create middleware for reusable business logic, dependency injection, and extending the request context in a type-safe manner.

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/felipebarcelospro/igniter-js/igniter-procedures
Clone the repo
git clone --depth 1 https://github.com/felipebarcelospro/igniter-js

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 igniter-procedures

README.md
[![agentmods](https://agentmods.dev/badge/rules/felipebarcelospro/igniter-js/igniter-procedures.svg)](https://agentmods.dev/rules/felipebarcelospro/igniter-js/igniter-procedures)
Your own site
<a href="https://agentmods.dev/rules/felipebarcelospro/igniter-js/igniter-procedures"><img src="https://agentmods.dev/badge/rules/felipebarcelospro/igniter-js/igniter-procedures.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 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,109 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.00037 $0.01109
Opus 5 $0.00018 $0.00554
Sonnet 5 $0.00007 $0.00222
Haiku 4.5 $0.00004 $0.00111

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

Security

Grade A, and why

igniter-procedures 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.

apps/sample-realtime-chat/.cursor/rules/igniter-procedures.mdc · 141 lines

How it starts

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

Igniter.js: Procedures and Context

This guide covers two core concepts in Igniter.js: the Context system for dependency injection and Procedures for creating reusable middleware.

1. The Context System

The Context is a type-safe dependency injection mechanism that makes global services and request-specific data available throughout your API layer.

1.1. Base Context

The base context defines services that are available in every request handler. It is defined once when you initialize the Igniter instance.

  • File Location: src/igniter.context.ts
  • Purpose: To provide singleton services like database clients, loggers, and other providers to your actions and procedures.
// src/igniter.context.ts
export function createContext() {
  return {
    database: prisma, // Prisma client instance
    // ... other global services
  };
}

export type IgniterAppContext = ReturnType<typeof createContext>;

// src/igniter.ts
export const igniter = Igniter
  .context<IgniterAppContext>()
  // ... rest of the configuration
  .create();

Inside any action handler, you can now access context.database in a fully type-safe way.

1.2. Dynamic Context Extension

The real power of the context comes from its ability to be dynamically extended on a per-request basis. Procedures are the mechanism for this.

When a procedure returns a value, that value is deeply merged into the context object, making it available to all subsequent procedures and the final action handler. This process is fully type-safe.

2. Procedures (igniter.procedure)

A Procedure is a piece of reusable logic that runs before your main action handler. It is the Igniter.js equivalent of middleware. Procedures are ideal for handling cross-cutting concerns like authentication, logging, or data transformation.

2.1. Creating a Simple Procedure

A procedure is a function that receives the handler context and can perform actions. If it returns an object, that object is merged into the main context.

Read the full file on GitHub · 141 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 · 141 lines · 37 tokens per session scan A 8dd3b54aa68a

Subscribe to this mod's changes

igniter-procedures is a cursor rule published in the GitHub repository felipebarcelospro/igniter-js (242 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 37 tokens to every session and 1,109 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-09-01.