Skip to main content

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

MicroSkills Reference

Compare Files

file.compare_files

ProductionBounded custom (Class B)Deterministicverifiablefastv1.0.0
File inputNo network

Overview

You pass two managed file references and we compare them deterministically. Choose size (byte length), hash (default SHA-256), binary (first differing byte offset), or text (first differing line, with optional line-ending normalization). We always return each file's size and hash. Read-only — we never modify your files. Do not use this when you need a full unified diff or patch.

You need a deterministic answer to "are these files the same?" without pulling bytes into your agent context or building diff logic yourself.

Reliability

Deterministic: the same two files always give the same answer for size, hash, byte-offset, and line comparisons. We read at most 100 MiB per file, and anything larger fails validation — split or trim the file before you retry. A file reference resolves only inside your own tenant, so a reference belonging to someone else, or one that has already expired, comes back as a validation error telling you the reference is not accessible; upload the file again and call us with the fresh reference. An unsupported hashAlgorithm or textEncoding also fails validation, and retrying the same request will not help — fix the parameter first.

Context footprint

Returns equal, per-file size and hash, and the first difference when they diverge. A successful call costs 5 execution credits.

When to use it

When you have two managed file references and need equality or the first difference.

When you need a full line-by-line patch or side-by-side diff view.

Scope

Note
Compares two managed files by size, hash, binary bytes, or text content.

Non-goals

  • Does not produce a full diff patch
  • Does not modify either file
  • Does not fetch external URLs

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysishashing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call5 credits

File handling

Accepts file_refProduces file_refMax input100 MBMax file size100 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 file50 MiBPlatform maximum

How we handle your data

Protected temp storage
What this means

This skill may temporarily store files or intermediate data only to complete execution. Temporary data is protected and automatically deleted.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Temporary execution only storage
  • 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
leftFileRefstringYesManaged left-hand file reference resolved inside the current tenant, read up to 100 MiB.
rightFileRefstringYesManaged right-hand file reference resolved inside the current tenant, read up to 100 MiB.
modestringNoComparison mode; omit it for hash.
hashAlgorithmstringNoDigest used for per-file hash fields and hash mode; omit it for SHA-256.
textEncodingstringNoCharacter encoding for text mode; omit it for UTF-8.
normalizeLineEndingsbooleanNoWhether CRLF and CR become LF before text comparison; omit it for false.

Output schema

FieldTypeRequiredDescription
equalbooleanYesTrue when the files match under the chosen mode.
modestringYesComparison mode that was applied.
leftobjectYesClosed file summary with size and digest under the chosen hashAlgorithm.
rightobjectYesClosed file summary with size and digest under the chosen hashAlgorithm.
differencesarrayYesBounded array of 0 or 1 closed first-difference objects; empty when equal is true.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"file.compare_files","input":{"leftFileRef":"squillify://files/f-a","rightFileRef":"squillify://files/f-b"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("file.compare_files", {"rightFileRef":"squillify://files/f-b","leftFileRef":"squillify://files/f-a","mode":"hash"});

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 produce a full diff patch
  • Does not modify either file
  • Does not fetch external URLs
  • Generating a human-readable unified diff
  • Comparing files outside your managed file references

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "file.compare_files",
  "input": {
    "rightFileRef": "squillify://files/f-b",
    "leftFileRef": "squillify://files/f-a",
    "mode": "hash"
  }
}

Examples

Identical files match by SHA-256 hash

Inputjson
{
  "rightFileRef": "squillify://files/f-b",
  "leftFileRef": "squillify://files/f-a",
  "mode": "hash"
}
Expected outputjson
{
  "equal": true,
  "left": {
    "sizeBytes": 5,
    "hash": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
  },
  "mode": "hash",
  "right": {
    "sizeBytes": 5,
    "hash": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
  },
  "differences": []
}

Text mode reports the first differing line

Inputjson
{
  "rightFileRef": "squillify://files/f-c",
  "leftFileRef": "squillify://files/f-a",
  "mode": "text"
}
Expected outputjson
{
  "equal": false,
  "left": {
    "sizeBytes": 5,
    "hash": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
  },
  "mode": "text",
  "right": {
    "sizeBytes": 5,
    "hash": "486ea46224d1bb4fb680f34f7c9ad96a8f24ec88be73ea8e5a6c65260e9cb8a7"
  },
  "differences": [
    {
      "type": "text",
      "firstDifferingLine": 1
    }
  ]
}
  • Integrity checks before handoff
  • Duplicate detection across uploads
  • Regression comparisons in CI

Avoid for

  • Generating a human-readable unified diff
  • Comparing files outside your managed file references

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

hashingcomparisonfile