feat: add cortex_skill materialization for agent skills (#7) - #8
Merged
Conversation
#7) Adds a new `cortex_skill` materialization that uploads a skill directory (SKILL.md + optional companion scripts) to a Snowflake named stage via PUT, creating the stage automatically if it does not exist. A new `cortex_skill_path(ref(...))` macro wires skill models to agent specs with correct DAG ordering and automatic stage path resolution — no hard-coded paths or vars needed. Adds integration test models (forecaster_skill, agent_with_skill) and extends the compile test script to cover skill models. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cortex_skillmaterialization that uploads a skill directory (SKILL.md + optional companion scripts) to a Snowflake named stage viaPUT, creating the stage automatically if it does not existcortex_skill_path(ref(...))macro that wires a skill model into acortex_agentspec with correct DAG ordering and automatic stage path resolution — no hard-coded paths or vars neededforecaster_skill,agent_with_skill) and extends the compile test script to cover skill modelsTest plan
cortex_skill_path(ref('forecaster_skill'))resolves stage path correctly at compile timePUTis detected correctly even with dbt's prepended query comment (remove_starting_comments()in_sql_util.py)PUT 'file://dir/*' @stage/wildcard upload via dbt's execution layer still needed before merge🤖 Generated with Claude Code