Skip to content

feat: ship builtin skills to customers via postinstall - #279

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

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

Conversation

@suryaiyer95

Copy link
Copy Markdown
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>
CopilotAI review requested due to automatic review settings March 18, 2026 22:32

@claudeclaudeBot left a comment

Copy link
Copy Markdown

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.

suryaiyer95and 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)

CopilotAI left a comment

Copy link
Copy Markdown

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

Comment threadpackages/opencode/src/skill/skill.ts
Comment threadpackages/opencode/script/publish.ts
@anandgupta42

Copy link
Copy Markdown
Contributor

@Cluade review

@suryaiyer95
suryaiyer95 merged commit bf5541c into mainMar 18, 2026
8 checks passed
@anandgupta42
anandgupta42 deleted the feat/bundle-builtin-skills branch March 25, 2026 02:14
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@suryaiyer95@anandgupta42