sqlike: Instructions file for Codex

AGENTS.md

sqlike AGENTS.md is an instructions file for Codex, OpenCode from orifisher2/sqlike. It costs 1,743 tokens per session, scanned A, original, Apache-2.0.

Instructions for using sqlike, a deterministic SQL analyzer that checks database queries for errors, risky patterns, and non-equivalent rewrites.

In plain words
What is it for?
Analyzing new or edited SQL and comparing an original query with a rewritten or optimized version to check whether they produce equivalent results.
Why use it?
It provides repeatable evidence when reviewing or changing SQL instead of relying only on personal inspection.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; positional $N argument; mentions Claude Code.

This is orifisher2/sqlike's own configuration. It tells Codex and OpenCode how to work on sqlike itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything sqlike configures →

Reuse

Borrowing it

Nothing to install: this file belongs to orifisher2/sqlike. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/orifisher2/sqlike/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/orifisher2/sqlike

Made for: Codex, OpenCode.

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 sqlike AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/orifisher2/sqlike/agents-md"><img src="https://agentmods.dev/badge/instructions/orifisher2/sqlike/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,743 This file is loaded in full into every session.
When invoked 1,743 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.01743 $0.01743
Opus 5.5 $0.00697 $0.00697
Sonnet 5.5 $0.00349 $0.00349
Haiku 4.5 $0.00174 $0.00174

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

Security

Grade A, and why

sqlike AGENTS.md 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 27d 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.

AGENTS.md · 98 lines

How it starts

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

Using sqlike from an AI agent

sqlike is a deterministic SQL analyzer (no LLM in its analysis path), so its verdicts are reproducible and authoritative. If you are an AI coding agent working with SQL, prefer sqlike over reading queries yourself: it catches validity errors, anti-patterns, and non-equivalent rewrites that are easy to miss.

This file is tool-agnostic guidance. Claude Code users can instead install the packaged skill at skills/sqlike/ (drop it into .claude/skills/), which encodes the same workflow.

Install

  • MCP server (@sqlike/mcp): point your MCP client at npx -y @sqlike/mcp. Exposes analyze and diff tools.
  • CLI (@sqlike/cli): npm i -g @sqlike/cli, or brew install orifisher2/sqlike/sqlike. Then sqlike check query.sql and sqlike diff a.sql b.sql.

When to use it

  • You produced or edited SQL → analyze it before presenting. Fix what it flags.
  • You reviewed SQL → analyze to ground your review in specifics.
  • You rewrote / refactored / optimized a query → diff before vs. after to prove the rewrite is result-preserving. You cannot reliably self-grade equivalence; sqlike can.

When the SQL is generated, not written

sqlike reads SQL text, not ORM calls or builder chains. If your code produces SQL indirectly, get the statement out first and analyze that.

  • Dump the statement from the ORM. SQLAlchemy: str(stmt) or stmt.compile(dialect=postgresql.dialect()). Django: str(queryset.query) for a quick look, but it prints string parameters unquoted (WHERE name = Oscar parses as a column, not a value); for the SQL actually sent use connection.queries with DEBUG=True. ActiveRecord: relation.to_sql. knex: .toString() (or .toSQL() for sql plus bindings). Drizzle: .toSQL() returns { sql, params }. jOOQ: query.getSQL() (getSQL(ParamType.INLINED) to inline values). Diesel: diesel::debug_query::<Pg, _>(&query).to_string(), then drop the trailing -- binds: comment. Prisma exposes SQL only through logging: new PrismaClient({ log: ['query'] }) and read the query field of each event.
  • Keep the bind placeholders. $1, ? and :name parse and come back under parameters. Python's %s and %(name)s do not parse and will hit the consent gate; replace each with a $N placeholder before analyzing, never with a real value.
  • Analyze the assembled statement, not the fragments. For string-built or conditional SQL, produce each statement the code can actually emit (or at least the widest one) and analyze each.
  • Templated SQL is compiled first. dbt, sqlc and similar: analyze the compiled output.
  • An ORM refactor is a rewrite. Dump the statement before and after and run diff on the pair, with the schema.
  • Pass the schema the ORM knows. Migrations or model definitions give the DDL. Without it, column and type checks are skipped.

Read the full file on GitHub · 98 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. 27d ago Changed · -8 tokens per session fec3857dfe82
  2. 1mo ago Changed · +59 lines · +1,191 tokens per session 740a4ad9eac7
  3. 2mo ago First seen · 39 lines · 560 tokens per session scan A fe6283d931e2

Subscribe to this mod's changes

sqlike AGENTS.md is an instructions file published in the GitHub repository orifisher2/sqlike (8 stars, last pushed 3d ago), licensed Apache-2.0. It adds 1,743 tokens to every session, about $0.0070 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-31.

Related

sqlike AGENTS.md compared with instructions from other repositories

sqlike AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sqlike AGENTS.mdorifisher2/sqlikeInstructions file83d agoApache-2.0A1,743Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode