Skip to content

DigitalPebble/spruce-sql-advisor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPRUCE SQL Advisor

A Claude skill that grounds Claude in accurate knowledge for writing and optimising SQL queries against AWS CUR 2.0 data enriched with SPRUCE greenops columns.

When loaded, the skill makes Claude reliably accurate on:

  • CUR 2.0 schema details (column naming, nested arrays, conditional columns)
  • BILLING_PERIOD partitioning semantics
  • Engine-specific syntax for Athena and DuckDB
  • All SPRUCE column meanings and units (carbon, electricity, water)

Install

  1. Download the latest spruce-sql-advisor.skill from the Releases page.
  2. In Claude.ai, go to Settings → Customize → Skills, click on +, Create skills and Upload a skill.
  3. Start a new chat and ask a CUR 2.0 SQL question — Claude will load the skill automatically. Alternatively, call it explicitely by typing /spruce-sql-advisor in a new chat window.

Documentation

Full documentation, including example prompts and screenshots, is at digitalpebble.github.io/spruce-sql-advisor.

Repository layout

spruce-sql-advisor/             ← repo root
├── spruce-sql-advisor/         ← the skill itself (gets packaged into .skill)
│   ├── SKILL.md
│   ├── LICENSE, NOTICE
│   └── references/
├── docs/                       ← GitHub Pages site
├── .github/workflows/          ← CI: validate + release
├── README.md, LICENSE, NOTICE

The skill folder name is repeated by design: package_skill.py uses the folder name both as the artefact name (spruce-sql-advisor.skill) and as the top-level path inside the zip, and that name must match the skill's name frontmatter field.

Building from source

git clone https://github.com/DigitalPebble/spruce-sql-advisor
cd spruce-sql-advisor

# Fetch Anthropic's packaging script
git clone --depth 1 --filter=blob:none --sparse \
  https://github.com/anthropics/skills _anthropic_skills
git -C _anthropic_skills sparse-checkout set skills/skill-creator/scripts

PYTHONPATH=_anthropic_skills/skills/skill-creator \
  python3 -m scripts.package_skill ./spruce-sql-advisor .

Licence

Apache License 2.0 — see LICENSE and NOTICE.

Related

  • SPRUCE — the open-source GreenOps platform this skill is designed to work with.
  • DigitalPebble — green software consultancy.

About

A Claude skill that grounds Claude in accurate knowledge for writing and optimising SQL queries against AWS CUR 2.0 data enriched with SPRUCE. Works for FinOps as well as GreenOps.

Topics

Resources

License

Stars

Watchers

Forks

Contributors