ci-patterns

ci-patterns is a cursor rule for Cursor from brendadeeznuts1111/betting-brain-v3. It costs 7 tokens per session (1,840 once invoked), scanned A, original, MIT.

Rules for continuous integration and delivery, the automated checks that test and build code before release.

In plain words
What is it for?
Use them when creating or updating CI scripts, local CI commands, GitHub Actions workflows, or required pipeline steps.
Why use it?
They define repeatable local and GitHub Actions checks, so security scans, migrations, tests, type checks, and builds are handled consistently.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use them when creating or updating CI scripts, local CI commands, GitHub Actions workflows, or required pipeline steps.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/brendadeeznuts1111/betting-brain-v3/ci-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/brendadeeznuts1111/betting-brain-v3

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

README.md
[![agentmods](https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/ci-patterns.svg)](https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/ci-patterns)
Your own site
<a href="https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/ci-patterns"><img src="https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/ci-patterns.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,840 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.00007 $0.01840
Opus 5 $0.00003 $0.00920
Sonnet 5 $0.00001 $0.00368
Haiku 4.5 $0.00001 $0.00184

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

Security

Grade A, and why

ci-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 7d 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/ci-patterns.mdc · 321 lines

How it starts

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

CI/CD Patterns

Local CI Execution

One-Click Commands

# Full CI pipeline
bun run ci

# Quick CI (skip slow checks)
bun run ci:quick

# Interactive CI with reporting
bun run ci:local

# Just tests
bun test

CI Script Structure

Standard CI Pipeline

const steps = [
  {
    name: 'Security Scan',
    command: ['sg', 'scan', 'src/'],
    timeout: 30000,
    required: true
  },
  {
    name: 'SQL Migration Validation',
    command: ['bun', 'run', 'scripts/validate-migrations.ts'],
    timeout: 10000,
    required: true
  },
  {
    name: 'Lint Code',
    command: ['bun', 'run', 'lint'],
    timeout: 30000,
    required: false
  },
  {
    name: 'Type Check',
    command: ['bun', 'x', 'tsc', '--noEmit'],
    timeout: 60000,
    required: false
  },
  {
    name: 'Unit Tests',
    command: ['bun', 'test', 'tests/unit'],
    timeout: 120000,
    required: true
  },
  {
    name: 'Integration Tests',
    command: ['bun', 'test', 'tests/integration'],
    timeout: 180000,
    required: true
  },
  {
    name: 'Build',
    command: ['bun', 'run', 'build:worker'],
    timeout: 60000,
    required: true
  }
];

GitHub Actions Patterns

Workflow Structure

name: CI Pipeline

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

# Cancel outdated runs
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  security:
    name: Security Gate
    runs-on: ubuntu-latest
    timeout-minutes: 5
    steps:
      - uses: actions/checkout@v4
      - uses: oven-sh/setup-bun@v2
        with:
          bun-version: 1.2.23
      - run: sg scan src/

  test:
    name: Tests
    needs: security  # Block on security
    runs-on: ubuntu-latest
    timeout-minutes: 15
    steps:
      - uses: actions/checkout@v4
      - uses: oven-sh/setup-bun@v2
      - run: bun install
      - run: bun test

  build:
    name: Build
    needs: [security, test]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: oven-sh/setup-bun@v2
      - run: bun install
      - run: bun run build:worker

Read the full file on GitHub · 321 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. 7d ago First seen · 321 lines · 7 tokens per session scan A cee83ffe007e

Subscribe to this mod's changes

ci-patterns is a cursor rule published in the GitHub repository brendadeeznuts1111/betting-brain-v3 (8 stars, last pushed 11mo ago), licensed MIT. It adds 7 tokens to every session and 1,840 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-08-31.