Skip to main content

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

MicroSkills Reference

Rename Batch Plan

file.rename_batch_plan

ProductionBounded custom (Class B)Deterministicverifiablefastv1.0.0
No network

Overview

You pass a list of file names (not paths) and optional normalization rules; we return a deterministic side-effect-free rename plan with per-file targets, reason codes, and collision detection. We reject path traversal in names and compile removeCharacters regexes on a linear-time engine. We never rename files on disk. Do not use this when you need to apply renames — only to preview them.

Agents should preview renames and catch collisions before touching files on your side.

Reliability

VERIFIABLE and deterministic for identical files and rules. Input validation (not retryable): empty or oversized files list; path-like names; invalid rules; empty target after transforms; malformed removeCharacters regex. Domain error UNSUPPORTED_REGEX_FEATURE (not retryable — rewrite the pattern without backreferences or lookaround).

Context footprint

Returns the plan, collisions, and safeToApply in one side-effect-free call. A successful call costs 1 execution credit.

When to use it

To compute and review a rename plan before you apply it elsewhere.

When you need Squillify to perform the rename itself.

Scope

Note
Plans deterministic file renames from rules you declare — never applies them.

Non-goals

  • Does not rename files on disk
  • Does not accept directory paths in the files list
  • Does not use Java backtracking regex on caller patterns

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisnormalization

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MB

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
filesarrayYesBounded non-empty array of 1 through 10000 file basenames, not paths.
rulesobjectNoClosed optional rename rules; omit the object to keep names unchanged except collision policy.
collisionPolicystringNoHow duplicate targets are handled; omit it for error.
dryRunbooleanNoAccepted for compatibility and ignored; omit it, send true, or send false — nothing is renamed.

Output schema

FieldTypeRequiredDescription
planarrayYesBounded array of 0 through 10000 closed plan entries in input order.
collisionsarrayYesBounded array of 0 through 10000 closed collisions; empty when every target is unique.
safeToApplybooleanYesTrue when there are no unresolved collisions.

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.rename_batch_plan","input":{"files":["A File.TXT"],"rules":{"case":"lower"}}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("file.rename_batch_plan", {"files":["Report Final (1).PDF"],"rules":{"spaces":"dash","removeCharacters":"[^a-zA-Z0-9._ -]","extensionCase":"lower","case":"lower"}});

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 rename files on disk
  • Does not accept directory paths in the files list
  • Does not use Java backtracking regex on caller patterns
  • Actually renaming files (out of scope for this skill)
  • Path-based moves or directory restructuring

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "file.rename_batch_plan",
  "input": {
    "files": [
      "Report Final (1).PDF"
    ],
    "rules": {
      "spaces": "dash",
      "removeCharacters": "[^a-zA-Z0-9._ -]",
      "extensionCase": "lower",
      "case": "lower"
    }
  }
}

Examples

Lowercase, dash spaces, strip punctuation, lower extension

Inputjson
{
  "files": [
    "Report Final (1).PDF"
  ],
  "rules": {
    "spaces": "dash",
    "removeCharacters": "[^a-zA-Z0-9._ -]",
    "extensionCase": "lower",
    "case": "lower"
  }
}
Expected outputjson
{
  "collisions": [],
  "safeToApply": true,
  "plan": [
    {
      "changed": true,
      "target": "report-final-1.pdf",
      "reasonCodes": [
        "CHARACTER_REMOVED",
        "SPACE_REPLACED",
        "CASE_CHANGED",
        "EXTENSION_CASE_CHANGED"
      ],
      "source": "Report Final (1).PDF"
    }
  ]
}

Case-insensitive collision blocks safe apply

Inputjson
{
  "files": [
    "File.txt",
    "FILE.txt"
  ],
  "rules": {
    "case": "lower"
  }
}
Expected outputjson
{
  "collisions": [
    {
      "source": "FILE.txt",
      "target": "file.txt",
      "reason": "Target name collides with an earlier target (case/unicode-insensitive)."
    }
  ],
  "safeToApply": false,
  "plan": [
    {
      "changed": true,
      "target": "file.txt",
      "reasonCodes": [
        "CASE_CHANGED"
      ],
      "source": "File.txt"
    },
    {
      "changed": true,
      "target": "file.txt",
      "reasonCodes": [
        "CASE_CHANGED"
      ],
      "source": "FILE.txt"
    }
  ]
}
  • Preview a bulk rename before an apply step you control
  • Normalize filenames and catch case or Unicode collisions
  • Strip unsafe characters with a bounded regex

Avoid for

  • Actually renaming files (out of scope for this skill)
  • Path-based moves or directory restructuring

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

planningnormalizationfile