hs-sql-agent AGENTS.md

A repository guide for an SQL agent with an ASP.NET Core backend, a Nuxt frontend, a SQLite database, and a git submodule. A git submodule is a separate repository included inside another one.

In plain words
What is it for?
Running the backend and frontend locally, initializing the submodule, using the SQLite data store, building the frontend, and running unit tests.
Why use it?
It gives agents the layout, setup commands, runtime details, and test commands needed to work on the project.

Instructions file for CodexOpenCode

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 instructions/tse-wei-chen/hs-sql-agent/agents-md
Clone the repo
git clone --depth 1 https://github.com/tse-wei-chen/hs-sql-agent

Made for: Codex, OpenCode.

Per session 855 This file is loaded in full into every session.
When invoked 855 The same file — it is already loaded in full.
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.00855 $0.00855
Opus 5 $0.00428 $0.00428
Sonnet 5 $0.00171 $0.00171
Haiku 4.5 $0.00085 $0.00085

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

Security

Grade A, and why

hs-sql-agent 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 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.

AGENTS.md · 65 lines

How it starts

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

AGENTS.md

Repo Structure

  • Backend: ASP.NET Core (net10.0) in backend/src/. Main entrypoint: ToolBox/ToolBox.csproj.
  • Frontend: Nuxt 4 (pnpm) in frontend/. Source dir is app/ (not default app.vue root).
  • Submodule: backend/src/Modules/SqlKata.Service is a git submodule. Run git submodule update --init --recursive after clone.
  • Storage: SQLite at runtime in data/hsqlagent.db (mounted via Docker volume).

Commands

Backend

# Run locally
cp backend/src/ToolBox/appsettings.Example.json backend/src/ToolBox/appsettings.json
dotnet run --project backend/src/ToolBox

# Run all tests (requires Docker for Testcontainers)
dotnet test backend/src/UnitTest/SqlAgent.Test/SqlAgent.Test.csproj
dotnet test backend/src/UnitTest/Admin.Test/Admin.Test.csproj

# Run single test
dotnet test backend/src/UnitTest/SqlAgent.Test/SqlAgent.Test.csproj --filter "FullyQualifiedName~SqliteStrategyTests"

Frontend

cd frontend
pnpm install   # uses [email protected] (enforced via packageManager field)
pnpm dev       # http://localhost:3000, proxies /api to :8080
pnpm test      # vitest with happy-dom
pnpm generate  # static build to dist/ (used in Docker)

Docker

cp .env.example .env   # set HMAC_KEY and JWT_KEY (32+ bytes each)
docker-compose up -d

Frontend is pre-built and served as static files from ToolBox.dll's wwwroot/.

Gotchas

  • Solution file: backend/hs-sql-agent.slnx (slnx format, not classic .sln). Backend uses central package management via Directory.Packages.props.
  • Frontend aliases: @ and ~ both resolve to frontend/app/ (see vitest.config.ts).
  • Testcontainers tests: SqlAgent.Test spins up real DB containers (Sqlite, Postgres, MySql, SqlServer, Oracle, Firebird). Docker must be running.
  • Nuxt config: ssr: false, dev proxy /api/**http://localhost:8080/api/**.
  • Env vars: Backend reads from both appsettings.json and environment variables (Docker Compose overrides).
  • execute_dml_sql tool signature: Takes string sql from the caller. McpServer server and CancellationToken cancellationToken are injected by the MCP framework automatically (not caller-provided).

Read the full file on GitHub · 65 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 · 65 lines · 855 tokens per session scan A 9feb532171ea

Subscribe to this mod's changes

hs-sql-agent AGENTS.md is an instructions file published in the GitHub repository tse-wei-chen/hs-sql-agent (11 stars, last pushed 2d ago), licensed Apache-2.0. It adds 855 tokens to every session, about $0.0043 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-30.