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

# json-to-yaml Convert JSON to YAML 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/json-to-yaml/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: # json-to-yaml

Convert JSON to YAML format.

## Usage

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

## Output

```json
{
  "yaml": "name: test\nvalue: 123\n",
  "valid": true
}
```


path: pipeline-cli.yaml
content: name: "json-to-yaml-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_json().catch(null)

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

  output:
    stdout:
      codec: json_object


path: pipeline-mcp.yaml
content: name: "json-to-yaml-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.json.or(content()).string().trim()
          let parsed = $input.parse_json().catch(null)

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

  output:
    sync_response: {}


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

inputs:
  - name: json
    type: string
    required: true
    description: JSON string to convert

outputs:
  - name: yaml
    type: string
    description: YAML formatted 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 JSON"
    input: '{"key": "value"}'
    expected:
      has_field: yaml
      has_field: valid
      metadata_has: [skill, trace_id]


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