Agent skill

Database Marchat

by Cod-e-Codes in Cod-e-Codes/marchat

Changes marchat SQL schema and queries across SQLite, PostgreSQL, and MySQL using dialect helpers.

MITAuto-check passedDatabases

Install Database Marchat

skills CLI
$ npx skills add Cod-e-Codes/marchat --skill database-marchat -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Cod-e-Codes/marchat database-marchat --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Cod-e-Codes/marchat.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/database-marchat .claude/skills/database-marchat && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
database-marchat
GitHub stars
137
Token cost
~985 tokens
SKILL.md length
419 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Changes marchat SQL schema and queries across SQLite, PostgreSQL, and MySQL using dialect helpers.

  • Works in 5 steps: Add a new migration step in… → MigrateSchema runs ordered migrations,… → Add or extend db_dialect_test.go for new… → …
  • Editing server/db.go
  • SKILL.md covers Rules, Durable tables, Testing and Schema change workflow, plus 2 more sections
  • Calls go

What it does

Database Marchat is an agent skill from Cod-e-Codes/marchat. Changes marchat SQL schema and queries across SQLite, PostgreSQL, and MySQL using dialect helpers. Use when editing server/db.go, dbdialect.go, schema migrations, MARCHATDBPATH, or multi-database behavior.

Its SKILL.md is about 990 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Database migrations and SQL. It works with MySQL, PostgreSQL, SQLite and SQL. The repository describes itself as: Terminal chat for developers: Go WebSocket server + Bubble Tea TUI client, optional E2E, reactions, DMs, channels, plugins, files, code snippets, admin UI. Backends: SQLite… The licence is MIT.

When your agent uses it

  • Editing server/db.go
  • Schema migrations
  • Multi-database behavior

Example prompts

  • “Use the database-marchat skill to change marchat SQL schema and queries across SQLite, PostgreSQL, and MySQL using dialect helpers”
  • “/database-marchat”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Add a new migration step in server/migrate.go (applyMigrationV2, etc.) and bump currentSchemaVersion; extend verifySchema when new…
  2. MigrateSchema runs ordered migrations, records schema_version, and verifies required tables (including ban_history.expires_at)…
  3. Add or extend db_dialect_test.go for new SQL fragments.
  4. Run go test ./server/....
  5. Document env or migration notes in ARCHITECTURE.md / CHANGELOG.md if user-visible.

What it can do on your machine

Read from SKILL.md and the folder at commit 3440f09. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Database Marchat loads about 985 tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 419 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~985

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Cod-e-Codes/marchat at commit 3440f09, republished under its MIT licence (© Cod-e-Codes). 419 words, ~985 tokens.

Download SKILL.mdSave it as .claude/skills/database-marchat/SKILL.md (or your agent's skills folder).
name
database-marchat
description
Changes marchat SQL schema and queries across SQLite, PostgreSQL, and MySQL using dialect helpers. Use when editing server/db.go, db_dialect.go, schema migrations, MARCHAT_DB_PATH, or multi-database behavior.
paths
server/db.go, server/db_dialect.go, server/migrate.go, server/db_*_test.go, server/migrate_test.go, server/handlers.go, server/message_state.go

Database (marchat)

Runtime backend via MARCHAT_DB_PATH: SQLite (default), PostgreSQL, or MySQL. Detection and DSN parsing: server/db_dialect.go, InitDB in server/db.go.

Rules

  • Parameterized queries only; no string-concatenated user input.
  • Every schema or query change must work on all three dialects (or use db_dialect.go helpers).
  • SQLite (InitDB only):
    • Put connection pragmas in the DSN so every pooled connection gets them (_busy_timeout=5000, _journal_mode=WAL, _synchronous=NORMAL, _txlock=immediate on the writer, plus _pragma for cache/temp). Join with ? or & if the path already has a query (appendSQLiteDSNPragmas).
    • After Ping, set writer SetMaxOpenConns(1) and SetMaxIdleConns(1). For file-backed SQLite, open a sibling reader pool (MaxOpenConns(4), _query_only=1, same busy_timeout; no _journal_mode, no mode=ro, no cache=shared). Route SELECTs through dbRead(db). Close with CloseDB. Do not leave the default unbounded database/sql pool on the writer.
    • Do not split :memory: (each connection is a different database).
    • Do not rely on one-shot Exec("PRAGMA ...") after open for settings that must stick on every connection (that was the #118 SQLITE_BUSY failure mode).
    • Verify after open: busy_timeout > 0; for file-backed DBs, journal_mode is wal. In-memory (:memory: / mode=memory) requires busy_timeout only.
    • Quote paths safely in VACUUM INTO and similar.
  • Postgres/MySQL: leave pool defaults alone (do not force MaxOpenConns(1)).
  • MySQL: DSN via mysql: or mysql://; mysql.Config with parseTime=true; indexed text rules for search.
  • Postgres: boolean columns need dialect boolean literals, not = 0 / = 1.

Durable tables

Include messages plus durable state: reactions, read receipts, user_message_state, channel preferences. Not message rows alone.

Show full SKILL.md (189 more words)Show less

Testing

LevelWhere
Unit / integrationIn-memory or temp SQLite in server/*_test.go (db_test.go covers DSN join, file WAL, :memory:, concurrent inserts)
CI smokeserver/db_ci_smoke_test.go with MARCHAT_CI_POSTGRES_URL, MARCHAT_CI_MYSQL_URL (also asserts pool is not forced to 1)
HandlersVisible replay SQL (GetRecentMessagesForUser), search, pin toggle

Locally, CI smoke tests skip without env vars. See testing-marchat skill.

Schema change workflow

  1. Add a new migration step in server/migrate.go (applyMigrationV2, etc.) and bump currentSchemaVersion; extend verifySchema when new required tables or columns ship. Prefer deterministic DDL for versions after the v1 baseline (avoid inspect-and-reconcile).
  2. MigrateSchema runs ordered migrations, records schema_version, and verifies required tables (including ban_history.expires_at). SQLite/Postgres wrap each version in a transaction; MySQL cannot (DDL implicit commit) - document that when changing migrator behavior. CreateSchema in the same file is a thin log.Fatal wrapper for tests.
  3. Add or extend db_dialect_test.go for new SQL fragments.
  4. Run go test ./server/....
  5. Document env or migration notes in ARCHITECTURE.md / CHANGELOG.md if user-visible.

Backup

In-process :backup supports SQLite only. Postgres and MySQL require native backup tools; BackupDatabase returns an error when dialect is not SQLite.

References

  • ARCHITECTURE.md database section
  • internal/doctor DB probes for -doctor output

© Cod-e-Codes, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .cursor/skills/database-marchat of Cod-e-Codes/marchat.

Open the folder on GitHubat commit 3440f09

Compare with similar skills

Database Marchat next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Database Marchat compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Database Marchat this skillCod-e-Codes/marchat137—~985Automated safety check: PassMIT
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Squixeduardofuncao/squix273—~784Automated safety check: PassMIT
Golang Databaseunxed/f42402 repos~2.9kAutomated safety check: PassMIT
Database Migrations SQL Migrationsrmyndharis/antigravity-skills1.7k2 repos~577Automated safety check: NotesMIT
Database MigrationRain-kl/OpenFlare288—~1.3kAutomated safety check: PassApache-2.0

Similar skills

  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Squix

    eduardofuncao/squix

    Run SQL queries across databases (Postgres, MySQL, SQLite, etc.) via the squix CLI.

    273 GitHub stars~784 tokensUpdated 15 days ago
    DatabasesAuto-check passed
  • Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context…

    240 GitHub starsUsed in 2 repos~2.9k tokens
    DatabasesAuto-check passed
  • Database Migrations SQL Migrations

    rmyndharis/antigravity-skills

    SQL database migrations with zero-downtime strategies for PostgreSQL, MySQL, SQL Server

    1.7k GitHub starsUsed in 2 repos~577 tokens
    DatabasesAuto-check: notes
  • Database Migration

    Rain-kl/OpenFlare

    Wavelet 项目专用:当新增或修改数据库表结构、索引、初始化数据、系统配置 seed、模板 seed、默认管理员、goose SQL 迁移、internal/infra/persistence/migrator、ClickHouse 分析库 DDL 或数据库升级流程时必须使用。本技能指导在 internal/infra/persistence/migrator/goose 下编写…

    288 GitHub stars~1.3k tokensUpdated today
    DatabasesAuto-check passed
  • Database

    iii-hq/workers

    Run SQL against PostgreSQL, MySQL, or SQLite from the iii engine — reads, writes, transactions, and prepared statements over managed connection pools.

    113 GitHub stars~1.9k tokensUpdated yesterday
    DatabasesAuto-check passed

More from Cod-e-Codes/marchat

All 11 skills in this repo
  • Debugging Marchat

    Cod-e-Codes/marchat

    Diagnoses marchat client and server issues using -doctor, env configuration, and logs.

    137 GitHub stars~668 tokensUpdated 5 days ago
    Auto-check: notes
  • Developing Marchat

    Cod-e-Codes/marchat

    Implements and refactors marchat Go code with project toolchain and quality gates.

    137 GitHub stars~870 tokensUpdated 5 days ago
    Auto-check passed
  • Git Workflow Marchat

    Cod-e-Codes/marchat

    Drafts conventional commit messages and pull request bodies for marchat without committing or pushing unless explicitly requested.

    137 GitHub stars~482 tokensUpdated 5 days ago
    Auto-check: notes
  • Testing Marchat

    Cod-e-Codes/marchat

    Writes and runs marchat tests with race detection, coverage, and dialect smoke patterns.

    137 GitHub stars~802 tokensUpdated 5 days ago
    Auto-check passed
  • Client Marchat

    Cod-e-Codes/marchat

    Implements marchat terminal client TUI, commands, keystore, and WebSocket client behavior.

    137 GitHub stars~1.5k tokensUpdated 5 days ago
    Auto-check passed
  • Plugins Marchat

    Cod-e-Codes/marchat

    Develops and maintains marchat plugins: SDK, host IPC, manager install path, store downloads, and Ed25519 licenses.

    137 GitHub stars~558 tokensUpdated 5 days ago
    Auto-check passed

Categories

Questions about Database Marchat

What does Database Marchat do?

Changes marchat SQL schema and queries across SQLite, PostgreSQL, and MySQL using dialect helpers. Database Marchat is an agent skill from Cod-e-Codes/marchat. Changes marchat SQL schema and queries across SQLite, PostgreSQL, and MySQL using dialect helpers.

When should I use Database Marchat?

Database Marchat fits situations like: editing server/db.go; schema migrations; multi-database behavior.

How do I install Database Marchat in Claude Code?

Run `npx skills add Cod-e-Codes/marchat --skill database-marchat -a claude-code`. Or copy the skill folder (.cursor/skills/database-marchat in Cod-e-Codes/marchat) into .claude/skills/database-marchat in your project. Claude Code loads it when a task matches its description.

How do I install Database Marchat in Codex?

Run `npx skills add Cod-e-Codes/marchat --skill database-marchat -a codex`. Or copy the skill folder (.cursor/skills/database-marchat in Cod-e-Codes/marchat) into .agents/skills/database-marchat in your project. Codex loads it when a task matches its description.

Can I use Database Marchat in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Cod-e-Codes/marchat --skill database-marchat -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/database-marchat, .gemini/skills/database-marchat, .github/skills/database-marchat and .opencode/skills/database-marchat in your project.

What does Database Marchat need to run?

Going by SKILL.md and its folder, Database Marchat needs the command-line tools its instructions call (go).

Does Database Marchat access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Database Marchat safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Database Marchat use?

Database Marchat is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Database Marchat use?

About 985 tokens (SKILL.md is roughly 3.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Database Marchat?

Skills that share tags, products or a category with Database Marchat: SQL Database Support for pREST (prest/prest, 4.6k stars), Squix (eduardofuncao/squix, 273 stars), Golang Database (unxed/f4, 240 stars) and Database Migrations SQL Migrations (rmyndharis/antigravity-skills, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Database Marchat?

Cod-e-Codes (a GitHub user) maintains it in Cod-e-Codes/marchat, which has 137 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 3, 2026.

Source: Cod-e-Codes/marchat on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.