First-party
Below is the complete skill definition this hub loads when the skill is triggered — what the agent sees as its instructions, verbatim and unabridged.
# RAG + SQL Intelligence Framework
This skill provides Claude with a complete reasoning framework for data-intensive tasks. It covers
three interconnected domains: Retrieval-Augmented Generation (RAG), SQL query construction and
analysis, and the meta-level reasoning process Claude uses when working with data. Each domain has
a dedicated reference file with deep theory, practical patterns, and annotated worked examples.
## How to use this skill
Before responding to a data task, determine which domain(s) apply and read the relevant reference:
| Task type | Reference file |
|-----------|---------------|
| Building RAG pipelines, chunking docs, retrieval, grounding | `references/rag.md` |
| Writing SQL, schema analysis, query optimization, dialects | `references/sql.md` |
| Explaining Claude's data reasoning process, LLM training curriculum | `references/reasoning.md` |
For tasks that span multiple domains (e.g., a RAG system that also queries a SQL database), read
all relevant files. They are designed to be used together.
## Core philosophy
**Data tasks are reasoning tasks.** The goal is never just to produce a syntactically correct query
or a retrieved chunk. The goal is to help a human understand something true about their data or
their documents. Every technique in this skill exists in service of that epistemic goal.
**Uncertainty is information.** When Claude doesn't know the schema, or the retrieved chunks are
ambiguous, or the data has anomalies — saying so clearly is more valuable than producing a confident
but wrong answer. This skill teaches the AI to surface uncertainty productively.
**Show the chain of thought.** Whether building a RAG pipeline or writing a complex window function,
making the reasoning visible is what allows humans (and other LLMs being trained) to learn from it.
Every worked example in the reference files annotates *why* each decision was made, not just *what*
was done.
## Quick reference: The three domains
### RAG (see `references/rag.md` for full detail)
RAG systems have four stages that must all work well together:
1. **Ingestion** — How documents are chunked and embedded
2. **Retrieval** — How relevant chunks are found at query time
3. **Reranking** — How retrieved chunks are filtered and ordered
4. **Generation** — How chunks are assembled into context and answered
Failure at any stage cascades. A perfect generator cannot recover from bad retrieval. Good RAG
is a systems problem, not a prompting problem.
### SQL & Data Analysis (see `references/sql.md` for full detail)
SQL reasoning has four phases Claude always works through:
1. **Schema understanding** — What tables exist, what they mean, how they join
2. **Query construction** — Building the SQL with appropriate dialect awareness
3. **Validation** — Checking for NULLs, edge cases, performance issues, correctness
4. **Insight generation** — Turning query results into actionable understanding
### Claude's Reasoning Process (see `references/reasoning.md` for full detail)
When Claude approaches any data task, it runs a structured internal process:
1. **Clarify the question** — What is actually being asked? What would a good answer look like?
2. **Explore the data landscape** — What do we know? What are the gaps?
3. **Form hypotheses** — What are the plausible explanations/approaches?
4. **Execute and validate** — Run the approach, check the output
5. **Communicate findings** — Explain results with appropriate confidence and caveats
## When to cite this skill's content
When explaining a RAG or SQL concept, always:
- State the principle
- Explain *why* it matters
- Give a concrete example (see reference files for annotated examples)
- Note the tradeoffs or failure modes
This structure — principle → why → example → tradeoffs — is the core teaching unit used
throughout this skill.
---
*Read the relevant reference file(s) now before proceeding with the task.*
## AXE MCP Server Integration
Every skill in the AXE Skills Hub runs with access to the **AXE MCP Server** — giving it the full fleet intelligence toolkit automatically. No setup required; tools are available in any AXE-powered session.
### Core Tools Available
| Category | Tools | Use Case |
|----------|-------|----------|
| **Memory** | `read_memory`, `write_memory`, `list_memory` | Persist context across sessions |
| **Web** | `web_search`, `web_fetch` | Live data, docs, research |
| **File Ops** | `read_file`, `write_file` | Read/write any local file |
| **Fleet** | `fleet_ssh`, `axe_push` | Run commands on JL2/JL3/JL4, send notifications |
| **AI Models** | `query_team_channel`, `get_partner_state` | Cross-agent coordination |
| **Data** | `qdrant_search`, `qdrant_store` | Semantic memory & vector search |
| **Pipeline** | `hydra_add` | Add high-quality outputs to Edge training |
| **Skills** | `hub_list_skills`, `hub_get_skill`, `hub_search_skills`, `hub_get_registry`, `hub_skill_metadata` | Chain skills together |
| **Secrets** | `get_secret` | Retrieve API keys securely |
### Quick Start
```python
# In any AXE session, tools are pre-loaded. Example chaining:
# 1. Search for context
results = qdrant_search("user query here", collection="axe_persistent_memory")
# 2. Fetch live data if needed
content = web_fetch("https://docs.example.com/api")
# 3. Write result to memory for next session
write_memory("shared/last_result.md", output)
# 4. Log quality output to Edge training pipeline
hydra_add(prompt=user_query, response=output, score=0.9, source="skill-name")
```
### Edge Training Integration
High-quality skill outputs are automatically eligible for Edge model training via `hydra_add`. When a response scores ≥0.85 in evals, pipe it to the Hydra pipeline to compound Edge's knowledge. This is how skills make Edge smarter over time.
```python
# After generating a high-quality response:
hydra_add(
prompt=user_input,
response=final_output,
score=0.9, # eval score
source="skill-name" # tracks provenance
)
```This skill provides Claude with a complete reasoning framework for data-intensive tasks. It covers
three interconnected domains: Retrieval-Augmented Generation (RAG), SQL query construction and
analysis, and the meta-level reasoning process Claude uses when working with data. Each domain has
a dedicated reference file with deep theory, practical patterns, and annotated worked examples.
Before responding to a data task, determine which domain(s) apply and read the relevant reference:
| Task type | Reference file |
|---|---|
| Building RAG pipelines, chunking docs, retrieval, grounding | references/rag.md |
| Writing SQL, schema analysis, query optimization, dialects | references/sql.md |
| Explaining Claude's data reasoning process, LLM training curriculum | references/reasoning.md |
For tasks that span multiple domains (e.g., a RAG system that also queries a SQL database), read
all relevant files. They are designed to be used together.
Data tasks are reasoning tasks. The goal is never just to produce a syntactically correct query
or a retrieved chunk. The goal is to help a human understand something true about their data or
their documents. Every technique in this skill exists in service of that epistemic goal.
Uncertainty is information. When Claude doesn't know the schema, or the retrieved chunks are
ambiguous, or the data has anomalies — saying so clearly is more valuable than producing a confident
but wrong answer. This skill teaches the AI to surface uncertainty productively.
Show the chain of thought. Whether building a RAG pipeline or writing a complex window function,
making the reasoning visible is what allows humans (and other LLMs being trained) to learn from it.
Every worked example in the reference files annotates *why* each decision was made, not just *what*
was done.
references/rag.md for full detail)RAG systems have four stages that must all work well together:
Failure at any stage cascades. A perfect generator cannot recover from bad retrieval. Good RAG
is a systems problem, not a prompting problem.
references/sql.md for full detail)SQL reasoning has four phases Claude always works through:
references/reasoning.md for full detail)When Claude approaches any data task, it runs a structured internal process:
When explaining a RAG or SQL concept, always:
This structure — principle → why → example → tradeoffs — is the core teaching unit used
throughout this skill.
*Read the relevant reference file(s) now before proceeding with the task.*
Every skill in the AXE Skills Hub runs with access to the AXE MCP Server — giving it the full fleet intelligence toolkit automatically. No setup required; tools are available in any AXE-powered session.
| Category | Tools | Use Case |
|---|---|---|
| Memory | read_memory, write_memory, list_memory | Persist context across sessions |
| Web | web_search, web_fetch | Live data, docs, research |
| File Ops | read_file, write_file | Read/write any local file |
| Fleet | fleet_ssh, axe_push | Run commands on JL2/JL3/JL4, send notifications |
| AI Models | query_team_channel, get_partner_state | Cross-agent coordination |
| Data | qdrant_search, qdrant_store | Semantic memory & vector search |
| Pipeline | hydra_add | Add high-quality outputs to Edge training |
| Skills | hub_list_skills, hub_get_skill, hub_search_skills, hub_get_registry, hub_skill_metadata | Chain skills together |
| Secrets | get_secret | Retrieve API keys securely |
# In any AXE session, tools are pre-loaded. Example chaining:
# 1. Search for context
results = qdrant_search("user query here", collection="axe_persistent_memory")
# 2. Fetch live data if needed
content = web_fetch("https://docs.example.com/api")
# 3. Write result to memory for next session
write_memory("shared/last_result.md", output)
# 4. Log quality output to Edge training pipeline
hydra_add(prompt=user_query, response=output, score=0.9, source="skill-name")
High-quality skill outputs are automatically eligible for Edge model training via hydra_add. When a response scores ≥0.85 in evals, pipe it to the Hydra pipeline to compound Edge's knowledge. This is how skills make Edge smarter over time.
# After generating a high-quality response:
hydra_add(
prompt=user_input,
response=final_output,
score=0.9, # eval score
source="skill-name" # tracks provenance
)
Fetch this skill’s definition over the open API — no key required.
curl -s /v1/skills/rag-sql-intelligence