Rename Batch Plan
file.rename_batch_plan
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
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
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
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.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| files | array | Yes | Bounded non-empty array of 1 through 10000 file basenames, not paths. |
| rules | object | No | Closed optional rename rules; omit the object to keep names unchanged except collision policy. |
| collisionPolicy | string | No | How duplicate targets are handled; omit it for error. |
| dryRun | boolean | No | Accepted for compatibility and ignored; omit it, send true, or send false — nothing is renamed. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| plan | array | Yes | Bounded array of 0 through 10000 closed plan entries in input order. |
| collisions | array | Yes | Bounded array of 0 through 10000 closed collisions; empty when every target is unique. |
| safeToApply | boolean | Yes | True when there are no unresolved collisions. |
API contract
POST /v1/executecurl -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"}}}'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
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 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)
{
"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
{
"files": [
"Report Final (1).PDF"
],
"rules": {
"spaces": "dash",
"removeCharacters": "[^a-zA-Z0-9._ -]",
"extensionCase": "lower",
"case": "lower"
}
}{
"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
{
"files": [
"File.txt",
"FILE.txt"
],
"rules": {
"case": "lower"
}
}{
"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"
}
]
}Recommended use cases
- 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
Related skills
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.