Imported from xiaomu120413/ho-llm-cli-refactor (packages/ho-cli/vendor/opencode-workspace/packages/opencode/AGENTS.md). Install upstream with npx skills add xiaomu120413/ho-llm-cli-refactor --skill opencode. Copyright stays with the author.
opencode database guide
Database
Schema: Drizzle schema lives in src/**/*.sql.ts.
Naming: tables and columns use snake*case; join columns are <entity>_id; indexes are <table>*<column>\_idx.
Migrations: generated by Drizzle Kit using drizzle.config.ts (schema: ./src/**/*.sql.ts, output: ./migration).
Command: bun run db generate --name <slug>.
Output: creates migration/<timestamp>_<slug>/migration.sql and snapshot.json.
Tests: migration tests should read the per-folder layout (no _journal.json).
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
yaml
targets:
- https://api.opensmartroute.ai/api/v1/registry/xiaomu120413-ho-llm-cli-refactor-opencode/manifest # or paste the manifest below
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.