lunar-sql

Query the Lunar SQL API using standard SQL syntax for engineering data analysis.

4|1|Updated Jan 19, 2026
One-click install
npx skills add https://github.com/earthly/skills --skill lunar-sql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lunar-sql
Source: https://github.com/earthly/skills/tree/main/skills/lunar-sql
Command: npx skills add https://github.com/earthly/skills --skill lunar-sql

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows you to query Lunar's rich engineering data directly using SQL, enabling powerful analysis of your software development lifecycle without needing to write complex scripts.

Core Features & Use Cases

  • Direct SQL Access: Run SQL queries against Lunar's PostgreSQL API to retrieve data on components, checks, policies, domains, and PRs.
  • Data Analysis: Analyze engineering standards, track component health over time, and identify trends in your codebase.
  • Use Case: You need to find all components that failed a specific security check in the last week. You can use this Skill to write a SQL query that joins the checks and components tables, filters by status and date, and returns the relevant component IDs.

Quick Start

Use the lunar-sql skill to get the connection string for the Lunar SQL API.

Frequently Asked Questions about lunar-sql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query engineering metrics using SQL for SDLC data analysis?

You can query engineering metrics for SDLC data analysis by running standard SQL queries against the Lunar PostgreSQL API to retrieve data on components, checks, policies, domains, and PRs. This allows direct analysis of software development lifecycle trends.

What engineering data views are available to query for component health and compliance?

Available engineering data views include components, checks, policies, domains, and PRs. Querying these views with SQL allows you to analyze engineering standards, track component health over time, and identify compliance trends in your codebase.

How do I get the connection string to start querying the Lunar SQL API?

To get the connection string for the Lunar SQL API, you use the lunar-sql skill. Once retrieved, you can use this connection string to connect your SQL client and begin querying the available engineering data views directly.

Do I need to know SQL to analyze SDLC metrics with this approach?

Yes, you need an understanding of standard SQL syntax and the Lunar data model to analyze SDLC metrics. This approach requires writing SQL queries to join tables, filter by status and date, and retrieve specific engineering insights.

Can I find components that failed a specific security check using SQL queries?

Yes, you can find components that failed a security check by writing a SQL query that joins the checks and components tables, filters by status and date, and returns the relevant component IDs for your engineering data analysis.

What are the limitations of using SQL for engineering data analysis?

Limitations include the requirement to understand both standard SQL syntax and the specific Lunar data model. Without knowledge of the available views and table relationships, you cannot effectively query for SDLC metrics or compliance data.