Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Format YAML

code.format_yaml

ProductionEngine wrapper (Class A)Deterministicverifiablefastv1.0.0
File inputNo network

Overview

When you send YAML text or a file reference, we parse it in safe mode and re-emit consistent indentation, block style, and line width. Comments are not preserved — we return a warning when you asked to keep them. We never instantiate custom tags or execute YAML constructors — do not use this when inline comments must survive reformatting. Accepts file input via file_ref — no need to extract file content first.

YAML indentation errors break deploys. We parse safely and re-emit a consistent layout every time.

Reliability

Deterministic for identical input and options. Parse failures surface as validation errors (PARSE_ERROR) — fix the YAML before retrying.

Context footprint

Returns formatted YAML, changed and parseable flags, and warnings. A successful call costs 1 execution credit.

When to use it

When input parses as YAML and you need normalized formatting.

When comments must be preserved in the output.

Powered by SnakeYAML in safe mode (SafeConstructor), which never instantiates arbitrary Java types from YAML tags.

Scope

Note
Reformats YAML you supply using safe parsing.

Non-goals

  • Does not execute YAML tags
  • Does not preserve comments
  • Does not mutate semantics

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

formattingparsing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MBMax file size2 MB

File limits

Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.

LimitValueLimited by
Maximum size per input file2 MiBSkill maximum

How we handle your data

Sensitive output possible
What this means

This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response may contain submitted or transformed content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
yamlstringNoInline YAML document text; omit it when file_ref is the source.
file_refstringNoTenant-scoped managed YAML file reference; omit it when yaml is the source.
indentintegerNoOutput spaces per nesting level; omit it for 2.
lineWidthintegerNoOutput line width; omit it for 120.
sortKeysbooleanNoWhether mapping keys are sorted; omit it for false.
preserveCommentsbooleanNoWhether dropped comments produce a warning; omit it for true.
explicitStartbooleanNoWhether document-start markers are emitted; omit it for false.
explicitEndbooleanNoWhether document-end markers are emitted; omit it for false.

Output schema

FieldTypeRequiredDescription
formattedstringYesSafely parsed and re-emitted YAML text.
changedbooleanYesWhether the formatted text differs from the input.
parseablebooleanYesSuccessful safe-parse marker, always true.
warningsarrayYesFrom 0 through 1 comment-preservation warning string naming that comments were dropped.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"code.format_yaml","input":{"yaml":"a: 1"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("code.format_yaml", {"yaml":"a: 1\nb:\n - c\n"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not execute YAML tags
  • Does not preserve comments
  • Does not mutate semantics
  • YAML that must retain inline comments verbatim

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "code.format_yaml",
  "input": {
    "yaml": "a: 1\nb:\n - c\n"
  }
}

Examples

Reindent a nested mapping

Inputjson
{
  "yaml": "a: 1\nb:\n - c\n"
}
Expected outputjson
{
  "changed": true,
  "parseable": true,
  "formatted": "a: 1\nb:\n- c\n",
  "warnings": []
}

Inline comments trigger a preservation warning

Inputjson
{
  "yaml": "a: 1 # note\n",
  "preserveComments": true
}
Expected outputjson
{
  "changed": true,
  "parseable": true,
  "formatted": "a: 1\n",
  "warnings": [
    "COMMENTS_NOT_PRESERVED: comments are dropped during YAML reformatting."
  ]
}
  • Normalize config or manifest YAML before commit
  • Clean up agent-generated YAML indentation
  • Produce consistent block style across documents

Avoid for

  • YAML that must retain inline comments verbatim

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

codeyamlformatting