thing

thing is a cursor rule for Cursor from WeatherPal-AI/MCP-handle. It costs 2,541 tokens per session, scanned A, a copy of thing, Apache-2.0.

A Go usage guide for Thing, an object-relational mapper (ORM) that lets Go programs read and change database records through typed code.

In plain words
What is it for?
Configuring database and cache adapters, creating model-specific data access, and implementing cached create, read, update, delete, and list operations.
Why use it?
It provides the project's preferred patterns for database access and optional caching across MySQL, PostgreSQL, and SQLite.

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/weatherpal-ai/mcp-handle/thing
Clone the repo
git clone --depth 1 https://github.com/WeatherPal-AI/MCP-handle

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 thing

README.md
[![agentmods](https://agentmods.dev/badge/rules/weatherpal-ai/mcp-handle/thing.svg)](https://agentmods.dev/rules/weatherpal-ai/mcp-handle/thing)
Your own site
<a href="https://agentmods.dev/rules/weatherpal-ai/mcp-handle/thing"><img src="https://agentmods.dev/badge/rules/weatherpal-ai/mcp-handle/thing.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,541 This file is loaded in full into every session.
When invoked 2,541 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.02541 $0.02541
Opus 5 $0.01270 $0.01270
Sonnet 5 $0.00508 $0.00508
Haiku 4.5 $0.00254 $0.00254

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

Security

Grade A, and why

thing 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 5d 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.

Origin

This is a copy

100% identical to thing — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

mcp_handle_status/.cursor/rules/thing.mdc · 237 lines

How it starts

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


description: globs: *.go alwaysApply: false


description: globs: *.go alwaysApply: false

Rule Name: Thing ORM Usage Guide

Description:

Quick reference for using the Thing ORM (github.com/burugo/thing).

Core Concept

  • High-performance Go ORM focusing on CRUD and list operations.
  • Built-in caching (Redis or in-memory) automatically handles single-entity and list query caching & invalidation.
  • Uses Go generics for type safety and a cleaner API.
  • Supports MySQL, PostgreSQL, SQLite.

Configuration

  1. Create DB Adapter:
    import "github.com/burugo/thing/drivers/db/sqlite" // Or mysql, postgres
    dbAdapter, err := sqlite.NewSQLiteAdapter(":memory:")
    
  2. Create Cache Client (Optional, defaults to in-memory):
    import (
        "github.com/redis/go-redis/v9"
        redisCache "github.com/burugo/thing/drivers/cache/redis"
        "github.com/burugo/thing"
    )
    // Use nil for default in-memory:
    // var cacheClient thing.CacheClient = nil
    // Or Redis:
    // rdb := redis.NewClient(...)
    // cacheClient = redisCache.NewClient(rdb)
    
  3. Get ORM Instance per Model:
    import "github.com/burugo/thing"
    // import your models package
    
    // For a specific model typels.User)
    userThing, err := thing.New[*models.User](mdc:db)
    
    Alternative Global Config (less flexible): thing.Configure(dbAdapter, cacheClient) then thing.Use[*Model]().

Basic Usage

  1. Model Definition: Embed thing.BaseModel and use db tags for columns.
    type User struct {
        thing.BaseModel // Includes ID, CreatedAt, UpdatedAt, DeletedAt
        Name string `db:"name"` // Explicitly maps Name field to 'name' column
        UserAge int // db tag omitted, defaults to 'user_age' column
    }
    // Optional: Define TableName() method if different from snake_case plural struct name.
    // func (u *User) TableName() string { return "custom_users_table" }
    
    Note: While using the db tag is recommended for clarity, it's technically optional. If omitted, Thing ORM defaults to converting the Go field name (CamelCase, e.g., UserAge) to its snake_case equivalent (user_age) as the database column name. Use db:"-" to explicitly ignore a field.

Read the full file on GitHub · 237 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. 5d ago First seen · 237 lines · 2,541 tokens per session scan A 915b023f6220

Subscribe to this mod's changes

thing is a cursor rule published in the GitHub repository WeatherPal-AI/MCP-handle (254 stars, last pushed 10mo ago), licensed Apache-2.0. It adds 2,541 tokens to every session, about $0.0127 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to thing, differing in 0 lines, and is treated as a copy.