Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .opencode/skills/sql-translate/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Translate SQL queries between database dialects (Snowflake, BigQuer

## Requirements
**Agent:** builder or migrator (may write translated SQL to files)
**Tools used:** sql_translate, read, write, sql_validate
**Tools used:** sql_translate, read, write, altimate_core_validate

Translate SQL queries from one database dialect to another using sqlglot's transpilation engine.

Expand Down Expand Up @@ -36,7 +36,7 @@ Translate SQL queries from one database dialect to another using sqlglot's trans
- Any warnings about lossy translations or features that need manual review

6. **Offer next steps** if applicable:
- Suggest running `sql_validate` on the translated SQL to verify syntax
- Suggest running `altimate_core_validate` on the translated SQL to verify syntax
- Offer to write the translated SQL to a file
- Offer to translate additional queries

Expand Down Expand Up @@ -65,4 +65,4 @@ The user invokes this skill with optional dialect and SQL arguments:
| Oracle | `oracle` |
| Trino/Presto | `trino` / `presto` |

Use the tools: `sql_translate`, `read`, `write`, `sql_validate`.
Use the tools: `sql_translate`, `read`, `write`, `altimate_core_validate`.
8 changes: 3 additions & 5 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/opencode/src/agent/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export namespace Agent {
PermissionNext.fromConfig({
"*": "deny",
// SQL read tools
sql_execute: "allow", sql_validate: "allow", sql_analyze: "allow",
sql_execute: "allow", altimate_core_validate: "allow", sql_analyze: "allow",
sql_translate: "allow", sql_optimize: "allow", lineage_check: "allow",
sql_explain: "allow", sql_format: "allow", sql_fix: "allow",
sql_autocomplete: "allow", sql_diff: "allow",
Expand All @@ -184,7 +184,7 @@ export namespace Agent {
finops_unused_resources: "allow", finops_role_grants: "allow",
finops_role_hierarchy: "allow", finops_user_roles: "allow",
// Core tools
altimate_core_validate: "allow", altimate_core_check: "allow",
altimate_core_check: "allow",
altimate_core_rewrite: "allow",
// Read-only file access
read: "allow", grep: "allow", glob: "allow",
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/src/altimate/prompts/analyst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ You are altimate-code in analyst mode — a read-only data exploration agent.

You CANNOT modify any files or execute destructive SQL. You can only:
- Execute SELECT queries (enforced by AltimateCore read-only mode) via `sql_execute`
- Validate and lint SQL via `sql_validate`
- Validate and lint SQL via `altimate_core_validate`
- Analyze SQL for anti-patterns and optimization opportunities via `sql_analyze`
- Inspect database schemas via `schema_inspect`
- Check column-level lineage via `lineage_check`
Expand Down Expand Up @@ -41,7 +41,7 @@ Remember: your users are hired to generate insights, not warehouse bills. Every
- /cost-report — Snowflake cost analysis with optimization suggestions
- /query-optimize — Query optimization with anti-pattern detection
- /sql-translate — Cross-dialect SQL translation with warnings (analysis only; writing translated files requires the builder agent)
- /impact-analysis — Downstream impact analysis using lineage + manifest
- /dbt-analyze — Downstream impact analysis using lineage + manifest
- /lineage-diff — Compare column lineage between SQL versions
- /data-viz — Build interactive data visualizations, dashboards, charts, and analytics views from query results
Note: Skills that write files (/generate-tests, /model-scaffold, /yaml-config, /dbt-docs, /medallion-patterns, /incremental-logic) require the builder agent.
Expand Down
4 changes: 2 additions & 2 deletions packages/opencode/src/altimate/prompts/builder.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You are altimate-code in builder mode — a data engineering agent specializing
You have full read/write access to the project. You can:
- Create and modify dbt models, SQL files, and YAML configs
- Execute SQL against connected warehouses via `sql_execute`
- Validate SQL with AltimateCore via `altimate_core_validate` (syntax + schema references)
- Validate SQL syntax and schema references via `altimate_core_validate`
- Analyze SQL for anti-patterns and performance issues via `sql_analyze`
- Inspect database schemas via `schema_inspect`
- Search schemas by natural language via `schema_search`
Expand Down Expand Up @@ -41,7 +41,7 @@ altimate-dbt info # Project metadata

When writing SQL:
- Always run `sql_analyze` to check for anti-patterns before finalizing queries
- Validate SQL with `sql_validate` before executing against a warehouse
- Validate SQL with `altimate_core_validate` before executing against a warehouse
- Use `schema_inspect` to understand table structures before writing queries
- Prefer CTEs over subqueries for readability
- Include column descriptions in dbt YAML files
Expand Down
Loading
Loading