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
13 changes: 13 additions & 0 deletions skills/altimate-code/hooks-handlers/session-start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash
# SessionStart hook for the altimate-code skill. Injects a one-shot directive
# into the session's system prompt telling the agent to consult Skills before
# reading files when the task is data-engineering shaped.
cat <<'EOF'
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"additionalContext": "You have access to data-engineering skills via plugins: dbt-skills (refactoring, creating, testing, debugging, documenting, migrating dbt models, incremental models), snowflake-skills (finding expensive queries, optimizing query by id, optimizing query text), and altimate-code (warehouse access, column-level lineage, dbt builds against real warehouses, cross-database operations, multi-warehouse data parity). When the user's task involves dbt models, SQL refactoring, data warehouse work, query optimization, or cross-database operations, INVOKE THE Skill TOOL FIRST — before reading files, writing code, or starting work directly. Prefer altimate-code:altimate-code when the task needs live warehouse access, column-level lineage, dbt builds against a real warehouse, profiling, cost attribution, or cross-database migration. Use Skill consultation as your first action on every data-engineering task; the skill's body will tell you how to proceed."
Comment on lines +1 to +9

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

When and how does it get called?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

there needs to be some installation which adds to the skills right

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When/how it's called: It's a Claude Code SessionStart hook. skills/altimate-code/hooks/hooks.json registers it, so Claude Code's harness runs bash ${CLAUDE_PLUGIN_ROOT}/hooks-handlers/session-start.sh automatically on every session start (new chat, /clear, /resume). The script prints a JSON envelope on stdout; Claude Code parses hookSpecificOutput.additionalContext and injects that string into the session's system prompt for that one session. Nothing in this repo invokes it directly — the harness does, on the user's machine, once the plugin is installed.

Installation: Yes — .claude-plugin/marketplace.json declares three plugins (dbt-skills, snowflake-skills, altimate-code). A user installs the altimate-code plugin via:

/plugin marketplace add AltimateAI/data-engineering-skills
/plugin install altimate-code@data-engineering-skills

That registers the SessionStart hook and makes the altimate-code skill discoverable via the Skill tool — no manual wiring needed.

One caveat: this is a two-layered install. The plugin install adds the skill + hook. The actual altimate-code CLI binary that the skill delegates to is a separate npm package (npm install -g altimate-code) — the skill body gates on command -v altimate-code and surfaces the install command if missing (see SKILL.md lines 10-30). We intentionally don't auto-install the CLI because users may want a specific version, a different package manager, or to opt out.

Did you mean the CLI should be installed as part of the plugin install? Happy to wire that up if so — though it'd mean shipping a PostInstall-style hook that runs npm on the user's machine, which is a bigger behavior change worth discussing first.

}
}
EOF
exit 0
15 changes: 15 additions & 0 deletions skills/altimate-code/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"description": "Nudges the agent to consult Skills before reading files on data-engineering tasks, with explicit mention of altimate-code for warehouse/lineage/cross-DB work.",
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks-handlers/session-start.sh\""
}
]
}
]
}
}