curl -L -o pyspark-schema-converter.skill "https://aiskillstore.io/v1/agent/skills/6a19a067-93da-4b65-88f2-9e3f5d2461fb/download?platform=ClaudeCode"
{
"tool": "download_skill",
"arguments": {
"skill_id": "6a19a067-93da-4b65-88f2-9e3f5d2461fb",
"platform": "ClaudeCode"
}
}
{
"mcpServers": {
"skill-store": {
"url": "https://aiskillstore.io/mcp/"
}
}
}
Convert JSON Schema / DDL / CSV headers to PySpark StructType code, and reverse-convert PySpark schemas to Avro or JSON Schema. No Spark runtime required.
Compatible Platforms any
Findings: ["메타데이터 경고: 권장 필드 없음: 'requirements' (SKILL.md v2 권장)", "메타데이터 경고: 권장 필드 없음: 'changelog' (SKILL.md v2 권장)", '정보: spec: usk/1.0 미선언 — v2 패키지로 처리됩니다. 자동 변환 및 에이전트 검색 기능을 사용하려면 USK v3로 업그레이드하세요.']
✅ No security risks found.
AI Review Stage
스킬 메타데이터에 명시된 `network: false`, `filesystem: false`, `subprocess: false` 권한 선언과 실제 코드의 동작이 완벽하게 일치합니다. 코드 분석 결과, `sys`, `json`, `os`, `re`, `csv`, `io` 등 표준 라이브러리만을 사용하며, 이들 또한 스킬의 핵심 기능(입력/출력 처리, 문자열 파싱, JSON 직렬화/역직렬화)을 수행하는 데 필요한 범위 내에서만 사용됩니다. - `os` 모듈은 `sys.path.insert`를 위한 경로 설정에만 사용되며, 파일 시스템에 대한 임의 접근은 없습니다. - `io.StringIO`는 메모리 내 문자열 처리에 사용될 뿐, 실제 파일 I/O를 수행하지 않습니다. - `subprocess` 모듈이나 외부 명령 실행 코드는 발견되지 않았습니다. - `requests`, `urllib` 등 네트워크 통신을 위한 라이브러리 사용이 전혀 없습니다. - 사용자 입력 스키마를 파싱하고 변환하는 것이 스킬의 목적이며, 이 과정에서 사용자 데이터를 무단으로 수집하거나 외부로 전송하는 행위는 발견되지 않았습니다. - 정적 분석 결과에서도 'red_flags_found', 'obfuscation_warnings', 'forbidden_exec_files_found' 항목이 모두 비어 있어 코드의 안전성을 뒷받침합니다. 전반적으로 코드 품질이 우수하고, 스킬의 목적에 부합하며, 보안 위험 요소가 없는 것으로 판단됩니다.
Representative input/output examples for this skill. Agents can use these to understand how to invoke the skill and what output to expect.
Nested JSON Schema (user profile with address object and tags array) -> PySpark StructType Python code
{
"input_format": "json_schema",
"input_schema": "{\"type\":\"object\",\"required\":[\"user_id\",\"email\"],\"properties\":{\"user_id\":{\"type\":\"integer\",\"format\":\"int64\"},\"email\":{\"type\":\"string\"},\"address\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"},\"zip\":{\"type\":\"string\"}}},\"tags\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}"
}
{
"field_count": 4,
"input_format_detected": "json_schema",
"output": "PySpark StructType code with LongType for user_id, StringType for email, nested StructType for address, ArrayType(StringType()) for tags",
"success": true,
"warnings": []
}
MySQL CREATE TABLE with BIGINT NOT NULL and DECIMAL(10,2) -> accurate LongType and DecimalType
{
"input_format": "ddl",
"input_schema": "CREATE TABLE orders (id BIGINT NOT NULL, amount DECIMAL(10,2), status VARCHAR(50), created_at TIMESTAMP);"
}
{
"field_count": 4,
"input_format_detected": "ddl",
"output": "PySpark StructType code: id as LongType(nullable=False), amount as DecimalType(10,2), status as StringType, created_at as TimestampType",
"success": true,
"warnings": []
}
CSV header with sample rows -> inferred PySpark types (IntegerType, DateType, BooleanType)
{
"csv_sample_rows": [
"1001,alice@example.com,2024-01-15,true",
"1002,bob@example.com,2024-03-22,false",
"1003,carol@example.com,2024-07-01,true"
],
"input_format": "csv_header",
"input_schema": "user_id,email,created_at,is_active"
}
{
"field_count": 4,
"input_format_detected": "csv_header",
"output": "PySpark StructType code: user_id as IntegerType, email as StringType, created_at as DateType, is_active as BooleanType",
"success": true,
"warnings": []
}
PySpark schema.json() format -> Apache Avro schema with logicalType annotations
{
"input_format": "pyspark_json",
"input_schema": "{\"type\":\"struct\",\"fields\":[{\"name\":\"order_id\",\"type\":\"long\",\"nullable\":false,\"metadata\":{}},{\"name\":\"total\",\"type\":{\"type\":\"decimal\",\"precision\":10,\"scale\":2},\"nullable\":true,\"metadata\":{}},{\"name\":\"status\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}}]}",
"output_format": "avro"
}
{
"field_count": 3,
"input_format_detected": "pyspark_json",
"output": "Avro record schema with long for order_id, decimal logicalType for total, string for status",
"success": true,
"warnings": []
}
JSON Schema with array of objects and anyOf nullable -> ArrayType(StructType) recursive conversion
{
"input_format": "json_schema",
"input_schema": "{\"type\":\"object\",\"properties\":{\"order_id\":{\"type\":\"integer\"},\"items\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"sku\":{\"type\":\"string\"},\"qty\":{\"type\":\"integer\",\"format\":\"int32\"},\"price\":{\"type\":\"number\"}}}},\"tags\":{\"anyOf\":[{\"type\":\"array\",\"items\":{\"type\":\"string\"}},{\"type\":\"null\"}]}}}"
}
{
"field_count": 3,
"input_format_detected": "json_schema",
"output": "PySpark StructType with LongType for order_id, ArrayType(StructType with IntegerType/DoubleType) for items, nullable ArrayType(StringType) for tags",
"success": true,
"warnings": []
}
Malformed DDL input -> PARSE_ERROR with structured error response
{
"input_format": "ddl",
"input_schema": "THIS IS NOT VALID DDL AT ALL"
}
{
"error": {
"code": "PARSE_ERROR",
"message": "PARSE_ERROR: Could not find column definition block \u0027(...)\u0027. Ensure input is a valid CREATE TABLE statement."
},
"success": false
}
PostgreSQL DDL -> JSON Schema output (for API contract generation)
{
"input_format": "ddl",
"input_schema": "CREATE TABLE products (sku VARCHAR(100) NOT NULL, price DECIMAL(12,4), stock INTEGER, last_updated TIMESTAMP);",
"output_format": "json_schema"
}
{
"field_count": 4,
"input_format_detected": "ddl",
"output": "JSON Schema with string for sku (required), number/decimal for price, integer for stock, string/date-time for last_updated",
"success": true,
"warnings": []
}
All examples are also available via the agent API:
/v1/agent/skills/6a19a067-93da-4b65-88f2-9e3f5d2461fb/schema
No reviews yet. Be the first to leave one!