Create ZIP
file.create_zip
Overview
You provide files as inline UTF-8 text, base64 bytes, or managed file references and we build a deterministic ZIP archive. Entry paths are validated against zip-slip (absolute paths, .., drive letters, backslashes, over-long names). Duplicate paths are rejected unless you allow overwrites. We return a file reference when storage is available, or archiveBase64 as a fallback, plus size and SHA-256. Do not use this to extract archives or create password-protected zips. Archive members cost 1 execution credit per 10 members, rounded up, minimum 1, capped at 1000 members (100 credits).
Agents cannot produce binary archives reliably. We build deterministic, zip-slip-safe ZIPs from content you already have.
Reliability
Archive bytes are deterministic — we sort entries by path and stamp every timestamp to epoch, so identical inputs give the same SHA-256. Generated fileRef, expiresAt, and downloadUrl values are newly allocated and vary between calls. An entry fileRef resolves only inside your own tenant; if it has expired or belongs to someone else you get a validation error naming that entry index, and the fix is to re-upload and retry with the fresh reference. The other validation errors are equally not worth retrying unchanged: an empty files array, more than 1,000 entries, a zip-slip path (.., absolute, backslash, drive letter, or over 255 UTF-8 bytes), a duplicate path while overwriteDuplicatePaths is false, an entry over 50 MiB or a total over 500 MiB, invalid base64, and a fileRef entry sent when file storage is not available.
Context footprint
Returns fileRef or archiveBase64, entry count, size, checksum, and metadata. Archive members cost 1 execution credit per 10 members, rounded up, minimum 1, capped at 1000 members (100 credits). The files array names those members, so we reserve from that count until settlement reports the members actually archived.
When to use it
When you need to bundle inline content or managed files into one archive.
When you need extraction, encryption, or paths outside safe relative names.
Scope
Non-goals
- Does not extract archives
- Does not encrypt or password-protect
- Does not fetch external URLs
Properties
Capabilities
Cost & billing
1 execution credit per 10 archive members, rounded up, reserved from the request and capped at 1000 members (100 credits).
File handling
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.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 50 MiB | Skill and platform maximum |
| Maximum total input size | 500 MiB | Skill maximum |
| Maximum number of input files | 1,000 | Skill maximum |
| Maximum generated artifact size | 500 MiB | Skill maximum |
| Maximum number of generated files | 1 | Skill maximum |
| Maximum total generated size | 500 MiB | Skill maximum |
How we handle your data
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.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| files | array | Yes | From 1 through 1,000 closed entry objects sorted by their safe path before archive creation. |
| compressionLevel | integer | No | DEFLATE compression level. |
| overwriteDuplicatePaths | boolean | No | Whether duplicate paths retain the first sorted entry. |
| outputFilename | string | No | Managed archive filename; .zip is appended when absent. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| ok | boolean | Yes | True after archive creation succeeds. |
| fileRef | string | No | New tenant-scoped archive reference. |
| expiresAt | string | No | RFC 3339 expiry for fileRef. |
| downloadUrl | string | No | Presigned download URL when the storage provider supplies one. |
| archiveBase64 | string | No | Inline base64 archive when managed storage is unavailable. |
| entryCount | integer | Yes | Number of archive entries written after validation. |
| sizeBytes | integer | Yes | Total byte count of the completed ZIP archive. |
| sha256 | string | Yes | Lowercase SHA-256 of archive bytes. |
| metadata | object | Yes | Closed receipt object containing the applied outputFilename and compressionLevel properties. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"file.create_zip","input":{"files":[{"path":"one.txt","content":"Hello"}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("file.create_zip", {"files":[{"content":"Hello","path":"readme.txt"},{"content":"More","path":"data/info.txt"}]});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 extract archives
- Does not encrypt or password-protect
- Does not fetch external URLs
- Archive extraction (use file.safe_extract_archive)
- Password-protected or encrypted archives
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "file.create_zip",
"input": {
"files": [
{
"content": "Hello",
"path": "readme.txt"
},
{
"content": "More",
"path": "data/info.txt"
}
]
}
}Examples
Two inline text files archived to managed storage
{
"files": [
{
"content": "Hello",
"path": "readme.txt"
},
{
"content": "More",
"path": "data/info.txt"
}
]
}{
"fileRef": "squillify://files/f-generated-archive",
"expiresAt": "2026-08-13T12:00:00Z",
"sizeBytes": 301,
"downloadUrl": "https://files.squillify.example/generated-archive",
"ok": true,
"entryCount": 2,
"metadata": {
"compressionLevel": 6,
"outputFilename": "archive.zip"
},
"sha256": "3d14b5b2236cc79e3b1f533361055f829dcf02e98974579dc78e948fa234ad2c"
}Maximum compression on a single small file
{
"compressionLevel": 9,
"files": [
{
"content": "ok",
"path": "note.txt"
}
]
}{
"fileRef": "squillify://files/f-generated-archive",
"expiresAt": "2026-08-13T12:00:00Z",
"sizeBytes": 152,
"downloadUrl": "https://files.squillify.example/generated-archive",
"ok": true,
"entryCount": 1,
"metadata": {
"compressionLevel": 9,
"outputFilename": "archive.zip"
},
"sha256": "4fd10e5c2b4a4a77242d3668a3c6198805c1e3ef90d1d35505f64a305a959652"
}Recommended use cases
- Bundle agent outputs for download
- Package multiple managed files into one handoff artifact
Avoid for
- Archive extraction (use file.safe_extract_archive)
- Password-protected or encrypted archives
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.