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.5 | $0.00034 | $0.00603 |
| Sonnet 5.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 2mo 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.
- 2mo 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 2mo ago), licensed MIT. It adds 85 tokens to every session and 1,507 once invoked, about $0.0003 per session on Opus 5.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.
data-access compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| data-accessmexmarv/ai-genie-factory | Skill | 5 | 2mo ago | MIT | A | 85 | Claude Code, Codex |
| sql-diagramandre-salvati/databricks-template | Skill | 87 | 1mo ago | Apache-2.0 | A | 121 | Claude Code |
| data-divergenceandre-salvati/databricks-template | Skill | 87 | 1mo ago | Apache-2.0 | A | 123 | Claude Code |
| data-engineerbuiphucminhtam/forgewright | Skill | 49 | 6d ago | none | A | 85 | Claude Code |
| rag-pineconedavila7/claude-code-templates | Skill | 33k | today | MIT | A | 65 | Claude Code, Codex |
| data-engineerdavila7/claude-code-templates | Skill | 33k | today | MIT | A | 35 | Claude Code, Codex |
| similarity-search-patternsforyourhealth111-pixel/Vibe-Skills | Skill | 3.8k | today | Apache-2.0 | A | 30 | Claude Code, Codex |