# AI Skills

The [earthly/skills](https://github.com/earthly/skills) repository provides AI agent skills for building Lunar collectors and policies. These skills enable AI assistants to help you create custom plugins using the Bash and Python SDKs.

## Available Skills

| Skill                                                                                 | Description                                                                      |
| ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| [lunar-collector](https://github.com/earthly/skills/tree/main/skills/lunar-collector) | Create Lunar collector plugins (Bash scripts) that gather SDLC metadata          |
| [lunar-policy](https://github.com/earthly/skills/tree/main/skills/lunar-policy)       | Create Lunar policy plugins (Python scripts) that enforce engineering standards  |
| [lunar-sql](https://github.com/earthly/skills/tree/main/skills/lunar-sql)             | Craft SQL queries against Lunar's data model (components, checks, policies, PRs) |

## Installation

{% tabs %}
{% tab title="Manual" %}
Clone the repository and copy the skill folders to your agent's skills directory:

```bash
git clone https://github.com/earthly/skills.git
cp -r skills/skills/lunar-{collector,policy,sql} ~/.codex/skills/
```

{% endtab %}

{% tab title="Earthly" %}
If you have [Earthly](https://github.com/earthly/earthly) installed:

```bash
earthly github.com/earthly/skills+install-skills
```

{% endtab %}
{% endtabs %}

## Usage

These skills are designed to be used with AI agents that support the Claude/Codex skill format. Each skill contains:

* `SKILL.md` - Main instructions and quick-start guide
* `references/` - Summarized documentation for the AI to consult as needed
* `docs/` - A full copy of the documentation for the skill

Once installed, your AI assistant will automatically detect and use these skills when you ask it to create Lunar collectors or policies.

## Related Resources

* [Bash SDK](/plugin-sdks/bash-sdk.md) - Manual reference for building collectors
* [Python SDK](/plugin-sdks/python-sdk.md) - Manual reference for building policies
* [SQL API](/sql-api/sql-api.md) - Manual reference for querying Lunar data
* [lunar-lib Repository](https://github.com/earthly/lunar-lib) - Reference collectors and policies


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-lunar.earthly.dev/install/skills.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
