Skip to content

feat: ship builtin skills to customers via postinstall#279

Merged
suryaiyer95 merged 6 commits intomainfrom
feat/bundle-builtin-skills
Mar 18, 2026
Merged

feat: ship builtin skills to customers via postinstall#279
suryaiyer95 merged 6 commits intomainfrom
feat/bundle-builtin-skills

Conversation

@suryaiyer95
Copy link
Contributor

Summary

  • Postinstall copies skills/ from npm package to ~/.altimate/builtin/ on every install/upgrade (full wipe-and-replace so each release is the single source of truth)
  • Skill loader adds a dedicated home-only scan for ~/.altimate/builtin/ — separate from user-editable skill dirs so users never accidentally modify builtins
  • 22 builtin skills now ship with the package: dbt-develop, dbt-test, dbt-analyze, dbt-docs, dbt-troubleshoot, train, teach, generate-tests, model-scaffold, yaml-config, medallion-patterns, incremental-logic, impact-analysis, sql-review, sql-translate, query-optimize, cost-report, lineage-diff, data-viz, pii-audit, schema-migration, training-status
  • 6 new skills created that were referenced in agent prompts but didn't exist as SKILL.md files: generate-tests, model-scaffold, yaml-config, medallion-patterns, incremental-logic, impact-analysis
  • Zero user setup required — skills are available automatically after install

Design

~/.altimate/builtin/ is fully owned by postinstall (wipe-and-replace on every release). This is intentionally separate from ~/.altimate/skills/ which users own. The skill loader loads builtins first (before user/project skills), so project-level skills can override builtins by name.

Test plan

  • npm install @altimateai/altimate-code → verify ~/.altimate/builtin/ is populated with all 22 skill directories
  • Start altimate-code in a dbt project → verify skills like /dbt-develop, /train, /teach appear in the skill list with no user setup
  • Upgrade to a new version → verify ~/.altimate/builtin/ is fully replaced (old skills removed, new skills present)
  • Verify ~/.altimate/skills/ (user dir) is untouched by install

🤖 Generated with Claude Code

## What

All skills (dbt, SQL, training, compliance) are now available to customers
with zero setup. On every `npm install`/upgrade:

- `postinstall.mjs` copies skills from the package to `~/.altimate/builtin/`
- The directory is fully wiped and replaced — each release owns it entirely
- Skill discovery adds a dedicated scan of `~/.altimate/builtin/` in `skill.ts`

## Skills shipped (22 total)

**dbt:** dbt-develop, dbt-test, dbt-docs, dbt-troubleshoot, dbt-analyze,
generate-tests, model-scaffold, yaml-config, incremental-logic,
medallion-patterns, impact-analysis

**SQL:** sql-review, sql-translate, query-optimize, lineage-diff,
schema-migration, pii-audit, cost-report

**Training:** teach, train, training-status

**Viz:** data-viz

## Design

- `~/.altimate/builtin/` — release-managed, never user-edited
- `~/.altimate/skills/` — user-owned, never touched by installs
- `.opencode/skills/` (project) — highest priority, overrides everything
- Reference files (layer-patterns.md, etc.) ship alongside SKILL.md and
  are read on-demand by the agent — same as user-installed skills

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 18, 2026 22:32
Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review.

suryaiyer95 and others added 2 commits March 18, 2026 15:36
Skills already live in .opencode/skills/ — no need to duplicate them into
src/. publish.ts now copies from ../../.opencode/skills (repo root) into
the dist package. src/skill/builtin/ removed entirely.

Add 6 new skills to .opencode/skills/ that were missing:
generate-tests, model-scaffold, yaml-config, medallion-patterns,
incremental-logic, impact-analysis

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-config, medallion-patterns, incremental-logic, impact-analysis)
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a release-managed “builtin skills” distribution path so end users get a curated skill set automatically after installing/upgrading the npm package.

Changes:

  • Add a postinstall step that wipes and copies packaged skills into ~/.altimate/builtin/.
  • Extend the skill loader to additionally scan ~/.altimate/builtin/ for SKILL.md files (separate from user-owned dirs).
  • Package a set of builtin skills (and reference docs) into the published artifact.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/opencode/src/tool/skill.ts Minor comment marker placement change around Altimate imports.
packages/opencode/src/skill/skill.ts Adds scan for release-managed builtin skills under ~/.altimate/builtin/.
packages/opencode/script/publish.ts Copies builtin skills into the published wrapper package under skills/.
packages/opencode/script/postinstall.mjs Implements wipe-and-replace copy of packaged skills into ~/.altimate/builtin/ during install/upgrade.
packages/opencode/src/skill/builtin/yaml-config/SKILL.md Adds builtin skill documentation for YAML config generation.
packages/opencode/src/skill/builtin/training-status/SKILL.md Adds builtin skill documentation for training status dashboard.
packages/opencode/src/skill/builtin/train/SKILL.md Adds builtin skill documentation for training from documents.
packages/opencode/src/skill/builtin/teach/SKILL.md Adds builtin skill documentation for learning patterns from examples.
packages/opencode/src/skill/builtin/sql-translate/SKILL.md Adds builtin skill documentation for SQL dialect translation.
packages/opencode/src/skill/builtin/sql-review/SKILL.md Adds builtin skill documentation for SQL lint/grade/safety review workflows.
packages/opencode/src/skill/builtin/schema-migration/SKILL.md Adds builtin skill documentation for schema migration risk analysis.
packages/opencode/src/skill/builtin/query-optimize/SKILL.md Adds builtin skill documentation for SQL optimization workflows.
packages/opencode/src/skill/builtin/pii-audit/SKILL.md Adds builtin skill documentation for PII classification and exposure checks.
packages/opencode/src/skill/builtin/model-scaffold/SKILL.md Adds builtin skill documentation for scaffolding dbt model + YAML artifacts.
packages/opencode/src/skill/builtin/medallion-patterns/SKILL.md Adds builtin skill documentation for medallion architecture guidance.
packages/opencode/src/skill/builtin/lineage-diff/SKILL.md Adds builtin skill documentation for column-level lineage diffs.
packages/opencode/src/skill/builtin/incremental-logic/SKILL.md Adds builtin skill documentation for incremental model conversion.
packages/opencode/src/skill/builtin/impact-analysis/SKILL.md Adds builtin skill documentation for downstream impact analysis.
packages/opencode/src/skill/builtin/generate-tests/SKILL.md Adds builtin skill documentation for generating dbt tests.
packages/opencode/src/skill/builtin/dbt-troubleshoot/references/test-failures.md Adds reference doc for troubleshooting dbt test failures.
packages/opencode/src/skill/builtin/dbt-troubleshoot/references/runtime-errors.md Adds reference doc for dbt runtime/database errors.
packages/opencode/src/skill/builtin/dbt-troubleshoot/references/compilation-errors.md Adds reference doc for dbt compilation/Jinja/YAML errors.
packages/opencode/src/skill/builtin/dbt-troubleshoot/references/altimate-dbt-commands.md Adds reference doc for altimate-dbt CLI command usage.
packages/opencode/src/skill/builtin/dbt-troubleshoot/SKILL.md Adds builtin skill documentation for dbt troubleshooting workflows.
packages/opencode/src/skill/builtin/dbt-test/references/unit-test-guide.md Adds reference doc for dbt unit test authoring.
packages/opencode/src/skill/builtin/dbt-test/references/schema-test-patterns.md Adds reference doc for schema test patterns/heuristics.
packages/opencode/src/skill/builtin/dbt-test/references/custom-tests.md Adds reference doc for custom dbt tests (generic/singular).
packages/opencode/src/skill/builtin/dbt-test/references/altimate-dbt-commands.md Adds reference doc for altimate-dbt commands in the dbt-test skill.
packages/opencode/src/skill/builtin/dbt-test/SKILL.md Adds builtin skill documentation for dbt testing workflows.
packages/opencode/src/skill/builtin/dbt-docs/references/documentation-standards.md Adds reference doc for dbt documentation standards.
packages/opencode/src/skill/builtin/dbt-docs/references/altimate-dbt-commands.md Adds reference doc for altimate-dbt commands in the dbt-docs skill.
packages/opencode/src/skill/builtin/dbt-docs/SKILL.md Adds builtin skill documentation for dbt docs authoring.
packages/opencode/src/skill/builtin/dbt-develop/references/yaml-generation.md Adds reference doc for YAML generation patterns.
packages/opencode/src/skill/builtin/dbt-develop/references/medallion-architecture.md Adds reference doc for medallion architecture patterns.
packages/opencode/src/skill/builtin/dbt-develop/references/layer-patterns.md Adds reference doc for dbt layer patterns (staging/intermediate/marts).
packages/opencode/src/skill/builtin/dbt-develop/references/incremental-strategies.md Adds reference doc for incremental strategies.
packages/opencode/src/skill/builtin/dbt-develop/references/common-mistakes.md Adds reference doc for common dbt development pitfalls.
packages/opencode/src/skill/builtin/dbt-develop/references/altimate-dbt-commands.md Adds reference doc for altimate-dbt commands in the dbt-develop skill.
packages/opencode/src/skill/builtin/dbt-develop/SKILL.md Adds builtin skill documentation for dbt model development workflows.
packages/opencode/src/skill/builtin/dbt-analyze/references/lineage-interpretation.md Adds reference doc for interpreting lineage outputs.
packages/opencode/src/skill/builtin/dbt-analyze/references/altimate-dbt-commands.md Adds reference doc for altimate-dbt commands in the dbt-analyze skill.
packages/opencode/src/skill/builtin/dbt-analyze/SKILL.md Adds builtin skill documentation for dbt impact analysis workflows.
packages/opencode/src/skill/builtin/data-viz/references/component-guide.md Adds extensive reference doc for UI/charting component patterns.
packages/opencode/src/skill/builtin/data-viz/SKILL.md Adds builtin skill documentation for building dashboards/visualizations.
packages/opencode/src/skill/builtin/cost-report/SKILL.md Adds builtin skill documentation for Snowflake cost reporting workflows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@anandgupta42
Copy link
Contributor

@Cluade review

@suryaiyer95 suryaiyer95 merged commit bf5541c into main Mar 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants