Toolverse
All skills

python-scala-oop

by benchflow-ai

Guide for translating Python classes, inheritance, and object-oriented patterns to Scala. Use when converting Python code with classes, dataclasses, abstract classes, inheritance, properties, static methods, class methods, or design patterns.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
UX / Design
Views
3

About this skill

Guide for translating Python classes, inheritance, and object-oriented patterns to Scala. Use when converting Python code with classes, dataclasses, abstract classes, inheritance, properties, static methods, class methods, or design patterns.

How to use

  1. Załaduj umiejętność python-scala-oop w swoim środowisku agenta lub narzędzia AI. Umiejętność zawiera mapowanie między konstrukcjami Pythona a ich odpowiednikami w Scali.

  2. Przygotuj kod Python zawierający klasy, które chcesz przetłumaczyć. Może to być klasa zwykła z metodą init, dataclass, klasa z właściwościami (@property) lub hierarchia dziedziczenia.

  3. Przekaż kod Pythona do umiejętności, wskazując typ konstrukcji: klasa podstawowa, dataclass, właściwości lub dziedziczenie. Umiejętność zwróci odpowiadającą konstrukcję Scali.

  4. Dla klas zwykłych zwróć uwagę, że Scala wymaga słowa kluczowego 'new' przy tworzeniu instancji, a parametry konstruktora mogą być oznaczone jako 'val' dla automatycznego utworzenia pól.

  5. Dla dataclass użyj case class w Scali – są one domyślnie niezmienne i automatycznie generują equals, hashCode, toString i metodę copy.

  6. Przy właściwościach z getterami i setterami zastosuj wzorzec Scali: getter jako metoda bez parametrów, setter jako metoda z przyrostkiem '=' (np. radius=). Użyj require() do walidacji zamiast raise ValueError.

Related skills

3d-graphics

by samhvw8

3D web graphics with Three.js (WebGL/WebGPU). Capabilities: scenes, cameras, geometries, materials, lights, animations, model loading (GLTF/FBX), PBR materials, shadows, post-processing (bloom, SSAO, SSR), custom shaders, instancing, LOD, physics, VR/XR. Actions: create, build,

UX / Design
2595

canvas-design

by anthropics

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright

UX / Design
1998

market-sizing-analysis

by wshobson

This skill should be used when the user asks to \

UX / Design
4791

stitch-ui-design

by sickn33

Expert guide for creating effective prompts for Google Stitch AI UI design tool. Use when user wants to design UI/UX in Stitch, create app interfaces, generate mobile/web designs, or needs help crafting Stitch prompts. Covers prompt structure, specificity techniques, iteration

UX / Design
1670

content-trend-researcher

by alirezarezvani

Advanced content and topic research skill that analyzes trends across Google Analytics, Google Trends, Substack, Medium, Reddit, LinkedIn, X, blogs, podcasts, and YouTube to generate data-driven article outlines based on user intent analysis

UX / Design
20116

solid-principles

by SmidigStorm

Enforce SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion) in object-oriented design. Use when writing or reviewing classes and modules.

UX / Design
24154