Speech-To-Text-With-Databricks: Skill for Claude Code

.claude/skills/spark-python-data-source/SKILL.md

spark-python-data-source is a skill for Claude Code from alessandro9110/Speech-To-Text-With-Databricks. It costs 80 tokens per session (2,354 once invoked), scanned A, original, MIT.

A Python guide for creating Apache Spark connectors that read from and write to outside systems such as databases, APIs, and message queues. It covers both scheduled batches and continuous data streams.

In plain words
What is it for?
Use it to build custom Spark data sources, support batch or streaming reads and writes, and connect Spark to systems with specialised authentication or protocols.
Why use it?
It helps when Spark has no built-in connector for the system or protocol you need. It provides patterns for implementing the required readers and writers instead of designing them from scratch.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is alessandro9110/Speech-To-Text-With-Databricks's own configuration. It tells Claude Code how to work on Speech-To-Text-With-Databricks itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Speech-To-Text-With-Databricks configures →

Reuse

Borrowing it

Nothing to install: this file belongs to alessandro9110/Speech-To-Text-With-Databricks. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/alessandro9110/Speech-To-Text-With-Databricks/main/.claude/skills/spark-python-data-source/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/alessandro9110/Speech-To-Text-With-Databricks

Made for: Claude Code.

Wrote 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.

agentmods badge for spark-python-data-source

README.md
[![agentmods](https://agentmods.dev/badge/skills/alessandro9110/speech-to-text-with-databricks/spark-python-data-source/github.svg)](https://agentmods.dev/skills/alessandro9110/speech-to-text-with-databricks/spark-python-data-source)
Your own site
<a href="https://agentmods.dev/skills/alessandro9110/speech-to-text-with-databricks/spark-python-data-source"><img src="https://agentmods.dev/badge/skills/alessandro9110/speech-to-text-with-databricks/spark-python-data-source/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.

agentmods 80×15 button for spark-python-data-source

Your own site · 80×15
<a href="https://agentmods.dev/skills/alessandro9110/speech-to-text-with-databricks/spark-python-data-source"><img src="https://agentmods.dev/badge/skills/alessandro9110/speech-to-text-with-databricks/spark-python-data-source.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,354 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00080 $0.02354
Opus 5.5 $0.00032 $0.00942
Sonnet 5.5 $0.00016 $0.00471
Haiku 4.5 $0.00008 $0.00235

Measured 1mo ago against content hash 2999b4fcc7e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spark-python-data-source scanned grade A with 1 finding 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

response = requests.get(f"{self.url}?start={partition.start}")
.claude/skills/spark-python-data-source/SKILL.md · 312 lines

How it starts

The opening of the file, as written. The whole thing — 312 lines — stays where its author put it; the contents beside it link to each section on GitHub.

spark-python-data-source

Build custom Python data sources for Apache Spark 4.0+ to read from and write to external systems in batch and streaming modes.

When to use

Use when building Spark connectors for external systems that lack native support:

  • External databases, APIs, message queues
  • Custom file formats or protocols
  • Real-time streaming data sources
  • Systems requiring specialized authentication or protocols

Triggers: "build Spark data source", "create Spark connector", "implement Spark reader/writer", "connect Spark to [system]", "streaming data source"

Instructions

You are an experienced Spark developer building custom Python data sources following the PySpark DataSource API. Follow these principles and patterns:

Core Architecture

Each data source follows a flat, single-level inheritance structure:

  1. DataSource class - Entry point returning readers/writers
  2. Base Reader/Writer classes - Shared logic for options and data processing
  3. Batch classes - Inherit from base + DataSourceReader/DataSourceWriter
  4. Stream classes - Inherit from base + DataSourceStreamReader/DataSourceStreamWriter

Critical Design Principles

SIMPLE over CLEVER - These are non-negotiable:

✅ REQUIRED:

  • Flat single-level inheritance only
  • Direct implementations, no abstractions
  • Explicit imports, explicit control flow
  • Standard library first, minimal dependencies
  • Simple classes with single responsibilities

❌ FORBIDDEN:

  • Abstract base classes or complex inheritance
  • Factory patterns or dependency injection
  • Decorators for cross-cutting concerns
  • Complex configuration classes
  • Async/await (unless absolutely necessary)
  • Connection pooling or caching (unless critical)
  • Generic "framework" code
  • Premature optimization

Implementation Pattern

from pyspark.sql.datasource import (
    DataSource, DataSourceReader, DataSourceWriter,
    DataSourceStreamReader, DataSourceStreamWriter
)

# 1. DataSource class
class YourDataSource(DataSource):
    @classmethod
    def name(cls):
        return "your-format"

    def __init__(self, options):
        self.options = options

    def schema(self):
        return self._infer_or_return_schema()

    def reader(self, schema):
        return YourBatchReader(self.options, schema)

    def streamReader(self, schema):
        return YourStreamReader(self.options, schema)

    def writer(self, schema, overwrite):
        return YourBatchWriter(self.options, schema)

    def streamWriter(self, schema, overwrite):
        return YourStreamWriter(self.options, schema)

# 2. Base Writer with shared logic
class YourWriter:
    def __init__(self, options, schema=None):
        # Validate required options
        self.url = options.get("url")
        assert self.url, "url is required"
        self.batch_size = int(options.get("batch_size", "50"))
        self.schema = schema

    def write(self, iterator):
        # Import libraries here for partition execution
        import requests
        from pyspark import TaskContext

        context = TaskContext.get()
        partition_id = context.partitionId()

        msgs = []
        cnt = 0

        for row in iterator:
            cnt += 1
            msgs.append(row.asDict())

            if len(msgs) >= self.batch_size:
                self._send_batch(msgs)
                msgs = []

        if msgs:
            self._send_batch(msgs)

        return SimpleCommitMessage(partition_id=partition_id, count=cnt)

    def _send_batch(self, msgs):
        # Implement send logic
        pass

# 3. Batch Writer
class YourBatchWriter(YourWriter, DataSourceWriter):
    pass

# 4. Stream Writer
class YourStreamWriter(YourWriter, DataSourceStreamWriter):
    def commit(self, messages, batchId):
        pass

    def abort(self, messages, batchId):
        pass

# 5. Base Reader with partitioning
class YourReader:
    def __init__(self, options, schema):
        self.url = options.get("url")
        assert self.url, "url is required"
        self.schema = schema

    def partitions(self):
        # Return list of partitions for parallel reading
        return [YourPartition(0, start, end)]

    def read(self, partition):
        # Import here for executor execution
        import requests

        response = requests.get(f"{self.url}?start={partition.start}")
        for item in response.json():
            yield tuple(item.values())

# 6. Batch Reader
class YourBatchReader(YourReader, DataSourceReader):
    pass

# 7. Stream Reader
class YourStreamReader(YourReader, DataSourceStreamReader):
    def initialOffset(self):
        return {"offset": "0"}

    def latestOffset(self):
        return {"offset": str(self._get_latest())}

    def partitions(self, start, end):
        return [YourPartition(0, start["offset"], end["offset"])]

    def commit(self, end):
        pass

Read the full file on GitHub · 312 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 1mo ago First seen · 312 lines · 80 tokens per session scan A 2999b4fcc7e6

Subscribe to this mod's changes

spark-python-data-source is a skill published in the GitHub repository alessandro9110/Speech-To-Text-With-Databricks (4 stars, last pushed 8mo ago), licensed MIT. It adds 80 tokens to every session and 2,354 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.

Related

spark-python-data-source compared with skills from other repositories

spark-python-data-source next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
spark-python-data-sourcealessandro9110/Speech-To-Text-With-DatabricksSkill48mo agoMITA80Claude Code
databricks-expertpersonamanagmentlayer/pclSkill4411d agoApache-2.0A74Claude Code
sqliPurpleAILAB/DecepticonSkill6.5k8d agoApache-2.0A48Claude Code, Codex
sql-injectionPurpleAILAB/DecepticonSkill6.5k8d agoApache-2.0A47Claude Code, Codex
bloodhound-queryPurpleAILAB/DecepticonSkill6.5k8d agoApache-2.0A32Claude Code, Codex
nosqliPurpleAILAB/DecepticonSkill6.5k8d agoApache-2.0A38Claude Code, Codex
omnigraphModernRelay/omnigraphSkill1.9ktodayMITA96Claude Code, Codex