Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add mexmarv/ai-genie-factory --skill data-accessgit clone --depth 1 https://github.com/mexmarv/ai-genie-factoryWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mexmarv/ai-genie-factory/data-access)<a href="https://agentmods.dev/skills/mexmarv/ai-genie-factory/data-access"><img src="https://agentmods.dev/badge/skills/mexmarv/ai-genie-factory/data-access/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/mexmarv/ai-genie-factory/data-access"><img src="https://agentmods.dev/badge/skills/mexmarv/ai-genie-factory/data-access.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00085 | $0.01507 |
| Opus 5 | $0.00043 | $0.00754 |
| Sonnet 5 | $0.00017 | $0.00301 |
| Haiku 4.5 | $0.00009 | $0.00151 |
Grade A, and why
data-access scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Governed Data Access
Apply this skill whenever code reads Databricks data. AGENTS.md and workspace instructions
have higher priority than examples in this skill.
Runtime decision
| Runtime | Required API | Forbidden |
|---|---|---|
| Databricks Apps | databricks.sdk.WorkspaceClient + Statement Execution API |
Spark sessions, JDBC, SQL in UI/logic modules |
| Notebook | spark.table("catalog.schema.table") |
Two-part or unqualified names |
| Lakeflow/DLT pipeline | spark.table("catalog.schema.table") and declarative pipeline APIs |
UI-facing reads from Bronze/Silver |
Non-negotiable rules
- UI-facing apps read Gold Unity Catalog tables only.
- Every table reference is
catalog.schema.tableand comes from configuration. - SQL exists only in
data.py; logic and UI modules never contain SQL. - Never concatenate user-provided values into SQL. Bind Statement Execution parameters.
- Validate catalog, schema, table, and column identifiers against configuration allowlists.
- Catch
Exception as e, log it, and raiseDataAccessErrorwith a safe message. - Preserve Unity Catalog authorization. Never elevate or bypass the app identity.
- Do not fetch an unbounded table for client-side filtering. Push filters and limits to SQL.
Databricks Apps standard pattern
"""Data layer — governed SQL reads only; no business transformations."""
import re
from typing import Any
import pandas as pd
from databricks.sdk import WorkspaceClient
from databricks.sdk.service.sql import StatementParameterListItem
from _logger import get_logger
logger = get_logger(__name__)
class DataAccessError(Exception):
pass
class LogicError(Exception):
pass
_IDENTIFIER = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$")
def _identifier(value: str, allowed: set[str] | None = None) -> str:
if not _IDENTIFIER.fullmatch(value) or (allowed is not None and value not in allowed):
raise DataAccessError("Invalid configured identifier")
return value
def _full_name(config: dict[str, Any]) -> str:
parts = config["table_name"].split(".")
if len(parts) != 3:
raise DataAccessError("A three-part table name is required")
catalog, schema, table = (_identifier(part) for part in parts)
if schema.lower() != "gold":
raise DataAccessError("UI applications may read only from the Gold schema")
return f"{catalog}.{schema}.{table}"
def _execute(
warehouse_id: str,
statement: str,
parameters: list[StatementParameterListItem] | None = None,
) -> pd.DataFrame:
try:
client = WorkspaceClient()
result = client.statement_execution.execute_statement(
warehouse_id=warehouse_id,
statement=statement,
parameters=parameters,
wait_timeout="30s",
)
state = result.status.state.value
if state != "SUCCEEDED":
message = result.status.error.message if result.status.error else state
raise DataAccessError(f"Query failed: {message}")
columns = [column.name for column in result.manifest.schema.columns]
rows = result.result.data_array or []
frame = pd.DataFrame(rows, columns=columns)
logger.info(f"Statement returned {len(frame)} rows")
return frame
except DataAccessError:
raise
except Exception as e:
logger.error(f"Data access failed: {e}")
raise DataAccessError("The requested data is unavailable") from e
def load_orders(config: dict[str, Any], start_date: str, end_date: str) -> pd.DataFrame:
full_name = _full_name(config)
warehouse_id = config["warehouse_id"]
statement = f"""
SELECT order_date, region, amount, order_id, customer_id
FROM {full_name}
WHERE order_date BETWEEN :start_date AND :end_date
ORDER BY order_date
LIMIT :row_limit
"""
parameters = [
StatementParameterListItem(name="start_date", value=start_date, type="DATE"),
StatementParameterListItem(name="end_date", value=end_date, type="DATE"),
StatementParameterListItem(name="row_limit", value=str(config["row_limit"]), type="INT"),
]
logger.info(f"Loading: {full_name}")
try:
frame = _execute(warehouse_id, statement, parameters)
logger.info(f"Loaded {len(frame)} rows from {full_name}")
return frame
except Exception as e:
logger.error(f"Failed to load {full_name}: {e}")
if isinstance(e, DataAccessError):
raise
raise DataAccessError(f"Table unavailable: {full_name}") from e
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 10d ago First seen · 184 lines · 85 tokens per session scan A 0968f13385dd
data-access is a skill published in the GitHub repository mexmarv/ai-genie-factory (5 stars, last pushed 1mo ago), licensed MIT. It adds 85 tokens to every session and 1,507 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
sql-diagram
Diagram a SQL query and explain what it shows — either its execution steps (mode=plan) or its column lineage (mode=lineage) — then trace it through small data so the defects the picture cannot show become visible. Use when asked to visualize, diagram, explain or review what a query does, how it joins its tables, or…
data-divergence
Investigate why two datasets that should agree don't — two pipelines writing the same logical table, a rollup vs the detail it aggregates, a dashboard vs its source, one environment vs another. Use when row counts, totals, or date ranges disagree and the question is what happened rather than just what differs. Covers…
data-engineer
Builds data infrastructure — ETL/ELT pipelines, data warehousing, stream processing, data quality, orchestration (Airflow/Dagster), and analytics engineering (dbt). Use when the user asks to build data pipelines, set up ETL/ELT workflows, design a data warehouse, configure stream processing, or implement analytics…
pinecone
Managed vector DB for production RAG and search.
data-engineer
Build scalable data pipelines, modern data warehouses, and real-time streaming architectures. Implements Apache Spark, dbt, Airflow, and cloud-native data platforms.
graphjin-env
Use when setting up a training or evaluation loop against a GraphJin agent environment — running the container, reading /health, driving episodes hosted or step-by-step or with your own agent over MCP, splitting train from eval, exporting trajectories, and deciding whether two rewards can be compared.