Skill: aronchick/expanso-yaml-to-json (version 1.0.0)

# yaml-to-json Convert YAML to JSON format ## Requirements - Expanso Edge installed (`expanso-edge` binary in PATH) - Install via: `clawhub install expanso-edge` ## Usage ### CLI Pipeline ```bash # Run standalone echo '<input>' | expanso-edge run pipeline-cli.yaml ``` ### MCP Pipeline ```bash # Start as MCP server expanso-edge run pipeline-mcp.yaml ``` ### Deploy to Expanso Cloud ```bash expanso-cli job deploy https://skills.expanso.io/yaml-to-json/pipeline-cli.yaml ``` ## Files | File | Purpose | |------|---------| | `skill.yaml` | Skill metadata (inputs, outputs, credentials) | | `pipeline-cli.yaml` | Standalone CLI pipeline | | `pipeline-mcp.yaml` | MCP server pipeline |

path: README.md
content: # yaml-to-json

Convert YAML to JSON format.

## Usage

```bash
echo "name: test
value: 123" | expanso-edge run pipeline-cli.yaml
```

## Output

```json
{
  "json": {"name": "test", "value": 123},
  "valid": true
}
```


path: pipeline-cli.yaml
content: name: "yaml-to-json-cli"
type: pipeline

config:
  input:
    stdin:
      codec: all
      max_buffer: 1048576

  pipeline:
    processors:
      - mapping: |
          meta trace_id = uuid_v4()
          let input = content().trim()
          let parsed = $input.parse_yaml().catch(null)

          root.json = if $parsed != null { $parsed } else { {} }
          root.valid = $parsed != null
          root.error = if $parsed == null { "Invalid YAML input" } else { "" }
          root.metadata = {"skill": "yaml-to-json", "mode": "cli", "trace_id": meta("trace_id"), "timestamp": now()}

  output:
    stdout:
      codec: json_object


path: pipeline-mcp.yaml
content: name: "yaml-to-json-mcp"
type: pipeline

config:
  http:
    enabled: true
    address: "0.0.0.0:${PORT:-8080}"

  input:
    http_server:
      path: /convert
      allowed_verbs: [POST]
      timeout: 30s

  pipeline:
    processors:
      - mapping: |
          meta trace_id = uuid_v4()
          let input = this.yaml.or(content()).string().trim()
          let parsed = $input.parse_yaml().catch(null)

          root.json = if $parsed != null { $parsed } else { {} }
          root.valid = $parsed != null
          root.error = if $parsed == null { "Invalid YAML input" } else { "" }
          root.metadata = {"skill": "yaml-to-json", "mode": "mcp", "trace_id": meta("trace_id"), "timestamp": now()}

  output:
    sync_response: {}


path: skill.yaml
content: name: yaml-to-json
version: 1.0.0
description: Convert YAML to JSON format

inputs:
  - name: yaml
    type: string
    required: true
    description: YAML string to convert

outputs:
  - name: json
    type: object
    description: JSON parsed output

backends:
  - name: local
    type: local
    description: Local processing (no API required)

author: expanso
license: MIT


path: test/fixtures/input.txt
content: name: test
count: 42


path: test/test.yaml
content: tests:
  - name: "Convert simple YAML"
    input: "key: value"
    expected:
      has_field: json
      has_field: valid
      metadata_has: [skill, trace_id]


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)