Skip to main content

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

MicroSkills Reference

Line Deduplicator

text.deduplicate_lines

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

Overview

Removes duplicate lines from text using exact or normalized comparison. Supports case-insensitive matching, Unicode normalization, keep-first or keep-last policy, and configurable line endings. Reports removed lines with details. Accepts file input via file_ref — no need to extract file content first.

Agents frequently produce or collect lists with duplicates. We give you deterministic, policy-driven deduplication across encodings and normalization forms.

Reliability

STRICT and deterministic — identical inputs with the same mode, keep, caseSensitive, and normalization settings always produce identical output. TEXT_INVALID_ENCODING — trigger: you set requireNormalized and your text is not already NFC, so exact matching could miss canonically equal lines; retryable: yes, once the text is normalized; next: run text.normalize_unicode with form NFC and call us again. A normalization value we do not recognise quietly falls back to NFC instead of failing. Input validation (not retryable): a mode, keep, or lineEnding outside the listed values; neither text nor file_ref; both text and file_ref; text longer than 1,048,576 characters.

Context footprint

Accepts inline text up to ~1M chars or file_ref (up to 2 MB). Output exceeding 100 KB is stored as a downloadable file automatically. Upload files via POST /v1/files/upload before passing file_ref. A successful call costs 1 execution credit.

When to use it

When you need exact duplicate-line removal with control over matching, ordering, case sensitivity, and normalization.

Do not use when duplicates are approximate, semantically similar, or within a single line — this skill operates line-by-line only.

Scope

Note
Removes duplicate lines from your text with configurable exact or normalized matching, keep-first/keep-last policy, and optional Unicode normalization.

Non-goals

  • Does not deduplicate tokens within a single line
  • Does not merge similar or fuzzy-matched lines
  • Does not perform semantic deduplication

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformationtext-processing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input1 MBMax file size1.9 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 file1.9 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
textstringNoBounded inline text source. Required unless file_ref is provided.
file_refstringNoTenant-scoped opaque text-file reference. Omit it to use the required inline text; never send both.
modestringNoComparison mode; omit it for exact.
normalizationstringNoUnicode normalization; omit it for none.
keepstringNoDuplicate retention policy; omit it for first.
caseSensitivebooleanNoWhether comparison is case-sensitive; omit it for true.
lineEndingstringNoOutput line ending; omit it for LF.
requireNormalizedbooleanNoWhether non-normalized input is refused; omit it for false.
outputToFilebooleanNoWhether a large result is stored as a file; omit it for false.

Output schema

FieldTypeRequiredDescription
textstringNoDeduplicated inline text when returned inline.
file_refstringNoStored deduplicated-text reference when returned by file.
download_urlstringNoTemporary platform download URL when returned by file.
size_bytesintegerNoReturned UTF-8 byte size.
totalLinesintegerYesOriginal logical-line count.
keptLinesintegerYesReturned logical-line count.
removedCountintegerYesRemoved duplicate-line count.
modestringYesApplied comparison mode.
keepstringYesApplied retention policy.
removedDetailsarrayNoBounded array of removed-line receipts with source index and retained-line details. The item shape is defined by the nested schema and the array contains from 0 through 2000000 items.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"text.deduplicate_lines","input":{"text":"apple\nbanana\napple\ncherry","mode":"exact","keep":"first"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("text.deduplicate_lines", {"text":"apple\nbanana\napple\ncherry"});

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.
TEXT_INVALID_ENCODING400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not deduplicate tokens within a single line
  • Does not merge similar or fuzzy-matched lines
  • Does not perform semantic deduplication
  • Fuzzy or semantic deduplication
  • Within-line token deduplication
  • Merging lines that differ only by formatting you have not normalized

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "text.deduplicate_lines",
  "input": {
    "text": "apple\nbanana\napple\ncherry"
  }
}

Examples

Exact dedup keeping first occurrence

Inputjson
{
  "text": "apple\nbanana\napple\ncherry"
}
Expected outputjson
{
  "text": "apple\nbanana\ncherry",
  "removedCount": 1,
  "keep": "first",
  "removedDetails": [
    {
      "line": 3,
      "duplicateOf": 1,
      "content": "apple"
    }
  ],
  "keptLines": 3,
  "totalLines": 4,
  "mode": "exact"
}

Case-insensitive exact dedup

Inputjson
{
  "caseSensitive": false,
  "text": "Apple\napple\nBANANA"
}
Expected outputjson
{
  "text": "Apple\nBANANA",
  "removedCount": 1,
  "keep": "first",
  "removedDetails": [
    {
      "line": 2,
      "duplicateOf": 1,
      "content": "apple"
    }
  ],
  "keptLines": 2,
  "totalLines": 3,
  "mode": "exact"
}
  • Clean up log files with repeated entries
  • Deduplicate exported lists or CSV-like text
  • Remove redundant lines from generated or scraped content

Avoid for

  • Fuzzy or semantic deduplication
  • Within-line token deduplication
  • Merging lines that differ only by formatting you have not normalized

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

texttransformationcleanup