/sftpgo-skill:sftpgofrom sftpgo-skill
Reference skill for SFTPGo managed file transfer platform. Covers configuration, REST API payloads, Event Action templates, authentication (OIDC, LDAP), and edition/SaaS gating.
Ships in sftpgo-skill. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Generic reference skill for SFTPGo. Content is organized under references/ by topic and grows over time. The skill is the primary entry point for any SFTPGo-related task — REST API usage, WebAdmin configuration, and Event Action template authoring. The deepest current coverage is on Event Action templates; the REST API and WebAdmin topics lean heavily on the authoritative OpenAPI spec (below) plus the enum and cross-field notes in references/.
Load this skill when the user is:
sftpgo.json / env files, composing SFTPGO_... environment variables correctly, setting up the data provider, enabling HTTPS / ACME / Defender / metrics, activating a license, hardening the server with a post-quantum configuration (SSH and TLS key exchange, ML-DSA keys). See references/deployment.md (§5.14 for post-quantum).references/user-guide.md §3.5./api/v2/* (users, groups, folders, event rules, event actions, shares, admins, API keys, quota, retention, etc.). The skill teaches the shape conventions (tagged unions, required fields, secret envelopes, status codes) that make payloads validate on the server.references/examples.md.This skill is deliberately thin: it indexes the rest. Three external sources carry the ground truth, and this skill tells you which to consult for which question.
OpenAPI spec — for field names, enum values, required fields, schema shape:
https://sftpgo.com/assets/openapi.yaml — refreshed on every public release, always the latest publicly released SFTPGo version.openapi/openapi.yaml inside the deployed SFTPGo installation — authoritative for that server (may be older than the public copy).If the user is deploying an older SFTPGo, prefer the installed file. If the user is reasoning about the current product, the public URL is the reference.
Public documentation (https://docs.sftpgo.com/enterprise/, GitHub source at sftpgo/docs branch enterprise) — for operational how-to (install, storage backend setup, groups, shares, authentication, hooks, metrics, etc.). Fetch raw markdown via:
https://raw.githubusercontent.com/sftpgo/docs/enterprise/docs/<file>.md
Two dual-use index pages to orient fast without reading the full navigation:
documentation-map.md — task → file cheat sheetglossary.md — disambiguation of SFTPGo-specific termsEvery indexed file has a description: frontmatter line: read that first to decide whether the file is worth fetching.
The public docs are updated before this skill. metadata.upstream.docs_synced_at is the date this skill was last aligned with them. Before answering a question about how to configure something or how a feature works, fetch the matching docs page (find it with documentation-map.md) instead of relying on this skill's summary alone. When the docs and this skill disagree, follow the docs. This skill's own content stays the reference for what the docs do not cover: per-trigger placeholders, template functions and pitfalls, edition and SaaS gating, answer conventions.
This skill's reference files — for what the OpenAPI spec and the public docs cannot easily express: enum↔sub-config mappings, per-trigger placeholder availability, template context shape, quoting rules, ready-to-paste templates, common pitfalls.
This section describes the templating used in Event Action fields (Body / Subject / Endpoint / Headers / Paths / args / env / template_user / template_admin) — not the WebAdmin / WebClient page templates, which are a separate concern.
The engine differs by edition:
text/template (not Handlebars, not Jinja, not html/template). Supports {{if}} / {{range}} / {{with}} / pipes ({{.X | toJson}}), an extended FuncMap (see references/template-functions.md), and structured accessors like {{.Object.User.Email}} / {{index .IDPFields "claim"}}. Templates are compiled at action-save time, so a syntax error rejects the save with a validation error; a semantic error (referencing a field the trigger does not populate) silently renders as the empty string at runtime.strings.Replacer pass over a fixed list of placeholders. The dot-prefixed syntax ({{.Name}}, {{.VirtualPath}}, ...) is identical in shape to the Enterprise form, but it is string substitution only — no conditionals, no ranges, no functions, no nested accessors. OIDC custom fields are exposed as flat tokens like {{.IDPField<claim>}} (e.g. {{.IDPFielddepartment}}), there is no {{.IDPFields}} map and no {{index ... }}. Provider-event object data is reachable only through the raw {{.ObjectData}} / {{.ObjectDataString}} placeholders. See references/editions.md for the full list of placeholders that exist on OSS.Most of the rest of this skill targets the Enterprise template engine. When the user is on OSS, drop conditionals / pipes / functions and stay within the OSS placeholder list — the rendered output is otherwise often "the literal placeholder string", which looks like a missing-field bug.
Both editions share these rules:
{{.Name}}, not {{Name}}.The same question has a different correct answer on the SaaS, on a self-hosted Enterprise install and on the Open Source edition: a CLI command or env var is useless on the SaaS, and most Event Manager, OIDC and UI-configuration content is Enterprise-only. A confident answer for the wrong environment is the most expensive mistake this skill can make, so ask before answering, do not guess.
When to ask. At the start of every new problem — configuring, deploying, troubleshooting, or producing a REST API payload or an Event Action template — unless the environment is already established:
references/saas.md §1 and references/editions.md §4 — e.g. bucket=default + region=default, a drakkan/sftpgo image, a registry.sftpgo.com image).Indirect or weak signals are not enough: ask, and mention what you noticed. A purely conceptual question ("what is a virtual folder?") can be answered directly, flagging any part that depends on the edition.
How to ask. Ask first, in one short message, and wait for the reply — do not attach a long answer that covers every environment. Offer numbered options so the user can reply with a number:
Before I answer, which SFTPGo setup are you using?
- Fully-managed SaaS from sftpgo.com (hosted for you, you only use the WebAdmin, WebClient, SFTP and REST API)
- Self-hosted Enterprise — official packages, the
registry.sftpgo.comimage, the Helm chart, or a cloud-marketplace VM / container (AWS, Azure, GCP)- Open Source edition — from
github.com/drakkan/sftpgo, the Docker Hubdrakkan/sftpgoimage, a Linux distribution, a NAS / home-lab app store or another third-party package- Not sure
Adapt the wording to the user's language. When the problem is a troubleshooting one, add in the same message — at most two more questions — the SFTPGo version and the exact error message or log line. Do not ask about anything the user already told you.
If the user answers Not sure, help them find out with the detection signals in references/editions.md §4 (where they installed it from, the Docker image name, whether the WebAdmin shows a license section or "License inactive, limited functionality") instead of picking an edition for them.
After the answer. Treat it as settled for the rest of the conversation — do not ask again. Route with it: SaaS → references/saas.md; Open Source → references/editions.md §5; self-hosted Enterprise → the full skill, plus references/deployment.md for server-side changes. If a later message contradicts the answer (e.g. an OSS user pastes a registry.sftpgo.com image, or a template function the OSS engine does not have), point out the mismatch and confirm before continuing.
Most people asking about SFTPGo want the next step, not a reference page. The depth of this skill is there to get the answer right, not to repeat it: keep answers short and in everyday words.
The skill is used in two situations. Pick the one that fits, then apply the common rules below to both.
Drafting a reply to a message. The user pastes a message they received (an email, a ticket, a forum post) and asks you to answer it. Write the reply ready to send, nothing around it:
* bullets. Write values, commands and API paths as they are (-1, GET /api/v2/connections). When an answer has several options, put each on its own line starting with "- ", or write them as short sentences.Example. It shows the style only: do not reuse its content (the caveats, the tips) in replies about other questions. Someone asks six numbered questions about a 100 MB per-file upload limit set through groups (setup, inheritance, active sessions, how to verify, what happens over the limit, which protocols). A good reply, in full:
These answers apply to self-hosted Enterprise, current release. If you are on an older version, let us know which one.
- Yes. Set 100 MB on the primary group and leave the users at 0. Users that already have a non-zero value keep their own limit. 0 on a user means "inherit", so for an unlimited exception give that user a very large value.
- Yes, your understanding is correct.
- Open SFTP and FTP sessions pick up the new limit when they reconnect. To enforce it now, find them with GET /api/v2/connections and close them with DELETE /api/v2/connections/{connectionID}. Closing a session interrupts any transfer in progress. WebDAV, WebClient and REST API sessions use the new value from the next request.
- Yes.
- The upload starts and is stopped as soon as it goes past the limit. Resuming a file that is already over the limit is refused at once.
- Yes, the limit covers every protocol.
Working through a task with the user. The user asks you directly how to do or fix something on their own installation (the default when no message to answer is pasted):
Example. It shows the style only: do not reuse its content in answers about other tasks. The user, on self-hosted Enterprise, asks how to get an email when someone uploads a file. A good answer, in full:
You need a mail server set up first, then an action that sends the email and a rule that runs it on upload.
- Go to Server Manager > Configurations > SMTP and enter your mail server details. Save.
- Go to Event Manager > Actions and click Add. Pick the Email type, enter the recipient, and use this as the subject:
{{.Name}} uploaded {{.VirtualPath}}- Go to Event Manager > Rules and click Add. Pick Filesystem events, select upload in the events list, and add the action from step 2.
That's it. The next upload sends the email. Want a longer email body with the file size and the user's IP?
Common rules
104857600) and bandwidth in KB/s, in the text and in the values to enter in the WebAdmin. Bytes appear only inside REST API JSON, when JSON is asked for.{{.Name}}), field names and menu labels exactly as the product shows them, and keep the skill's example texts (email subjects and bodies, chat messages) in English as written; translate them only when the user asks.When the user's question is about SFTPGo in general (creating users, groups, shares, setting up event rules, troubleshooting, picking a backend, etc.), start from references/user-guide.md — short orientation with pointers into the public docs. Fetch the matching public doc file (raw GitHub URL) before answering a configuration or how-it-works question — the docs may be newer than this skill; its frontmatter description tells you if it's the right one before you commit tokens to the full read.
When the user's question is about installation, server configuration, or environment variables (package install, Docker/K8s, editing sftpgo.json, composing SFTPGO_... env vars, enabling HTTPS / ACME / Defender, data-provider setup, licensing), start from references/deployment.md. It contains the env-var naming rule (the part an AI must get exactly right), ready-to-paste env.d/ recipes, and the sysadmin pitfall list.
When the user is on the fully-managed SaaS (dedicated per-instance subdomain we assigned, custom domain via CNAME onto it, bucket=default+region=default in their config, mentions "managed service" / "SaaS" / "sftpgo.com plan"), start from references/saas.md — the customer has no shell access, so deployment recipes, env vars, and CLI commands are off-limits, and there is a pre-created default group wired to the integrated storage that is the right answer for most user-creation questions. If detection is ambiguous, ask the Step 0 question.
Before committing to an answer on any unfamiliar installation (especially when the user mentions a managed-hosting provider, a NAS or home-lab app store, a community Linux-package archive, a Docker Hub drakkan/sftpgo image, a "free version", or "no license"), consult references/editions.md. The skill's content overwhelmingly targets Enterprise; the Open Source edition has a reduced Event Manager, basic OIDC, no WOPI / LDAP / ICAP / PGP / staged-upload / event-report / clustering / audit-logs UI, and no support from third-party resellers. editions.md has detection signals, the canonical difference list, and the rule to flag Enterprise-only features plainly (once, no sales pitch) when answering an OSS user. When the edition is uncertain, ask the Step 0 question.
When the user is specifically authoring an Event Action template:
references/action-types.md. This tells you which struct field holds the template string and which sub-fields are template-rendered..IDPFields is only populated for EventTriggerIDPLogin; .RetentionChecks is only populated after a retention-check action has run earlier in the chain). See references/trigger-types.md.references/template-context.md — it lists every key in the template context with its type and provenance..Initiator.User / .Initiator.Admin before accessing fields; use toJson/toJsonUnquoted when the output is embedded in JSON to avoid broken quoting. See references/pitfalls.md./api/v2/eventactions only when the user automates through the REST API.
Offer the other form in one line instead of showing both.Before writing any template, settle which fields are actually populated for the chosen trigger. Using a placeholder that is empty at runtime is the #1 source of "webhook fires but body looks wrong" bugs.
| Trigger | Always-safe placeholders | Extra placeholders available | Placeholders that are empty / zero — do not use |
|---|---|---|---|
1 — Filesystem event (upload, download, delete, rename, mkdir, rmdir, copy, ssh_cmd, and their pre-* / first-* variants) | .Name, .ExtName, .Event, .Status, .VirtualPath, .FsPath, .ObjectName, .Protocol, .IP, .Timestamp, .UID, .Role, .Email, .Errors | .VirtualTargetPath / .FsTargetPath (rename/copy only); .FileSize / .Elapsed (only on post-upload/download, zero for pre-*); .Metadata (cloud backends only). | .IDPFields, .Initiator (both .User and .Admin nil), .ObjectType, .Object, .RetentionChecks, .EventReports, .ShareExpirationChecks. |
2 — Provider event (add / update / delete on user, group, share, folder, admin, ...) | .Event, .ObjectName, .ObjectType, .Object, .Object.JSON, .Timestamp, .UID, .Initiator (one of .User / .Admin populated). | .Name = affected username for user events; .Object.User / .Object.Admin / .Object.Group / .Object.Share depending on .ObjectType. | .VirtualPath, .FsPath, .FileSize, .Elapsed, .Protocol, .IP, .IDPFields, .Errors. |
| 3 — Schedule (cron) | .Timestamp, .UID. Chained data from earlier actions in the same rule: .RetentionChecks, .EventReports, .ShareExpirationChecks. | Chained Share Expiration can populate .ShareExpirationResult when split-mode is on. | .Name, .VirtualPath, .FsPath, .Event, .Status, .FileSize, .Protocol, .IP, .Role, .Email, .IDPFields, .Object. Everything that would require a subject user or file path is blank. |
| 4 — IP blocked | .IP, .Protocol, .Event, .Timestamp, .UID, .Errors. | — | .Name, .VirtualPath, .FsPath, .FileSize, .Object, .Initiator, .IDPFields. |
| 5 — Certificate renewal (ACME) | .Name (domain), .Event (= Certificate renewal), .Status (1 ok / 2 error), .Timestamp, .UID, .Errors. | — | Everything else. |
| 6 — On demand | .Name (= rule name), .Inputs (from the POST body), .Timestamp, .UID. | Whatever earlier chained actions populate. | Depends on how the rule is invoked — default: same blanks as schedule. |
| 7 — IDP login | .Name, .Event (IDP login user / IDP login admin), .Protocol (= OIDC), .IP, .Timestamp, .UID, .IDPFields. | Anything in .IDPFields must match a claim listed in the OIDC binding's custom_fields, the role and email claims included: role_field drives the login internally and is not copied to .Role. | .Role, .Email, .ExtName, .VirtualPath, .FsPath, .FileSize, .Object, .Initiator, .Errors. |
Rule of thumb:
.Name + .VirtualPath + humanizeBytes .FileSize + .Protocol + .IP — these cover 90% of real notifications..Event + .ObjectType + .ObjectName and fall back to .Object.JSON when you need full detail..RetentionChecks or .EventReports — user-scoped placeholders like .Name are empty..Name plus .IDPFields (the claims listed in custom_fields, the role claim included) drive the group mapping. Nothing else is reliably populated.Full worked examples with both WebAdmin-paste form and REST API JSON form are in references/examples.md. Highlights:
{{.Name}}, {{.VirtualPath}}, {{humanizeBytes .FileSize}}.references/examples.md §2. The body is JSON; always wrap dynamic strings with {{... | toJsonUnquoted}} inside pre-quoted positions, or emit them with {{toJson ...}} unquoted. When in doubt, pipe through toJson — it handles quoting for strings automatically..Object.JSON for provider events.template_user; covers the #1 real-world pitfall: the role claim must be listed in custom_fields, .Role stays empty).attach_event_report / {{.RetentionChecks}}).paths with {{.VirtualPath}}).args: ["--user={{.Name}}", "--path={{.VirtualPath}}"]).Before endorsing a user's template, scan for:
{{Name}} / {{Event}} without a leading dot → wrong, won't compile in text/template even though some old documentation examples show this syntax..Initiator.User.Email without an enclosing {{if .Initiator.User}} guard → will panic-render empty with no error but produce confusing output when the initiator is an admin or nil.{{.Object.Username}} directly → .Object is a lazy renderer, not a plain struct. Use .Object.User.Username / .Object.Admin.Username or .Object.JSON.{{index .IDPFields "some_claim"}} where some_claim is not in the OIDC binding's custom_fields array → always nil. The role claim is no exception: .Role is empty on IDP login.toJson / toJsonUnquoted → broken payload.See references/pitfalls.md for the full list with reproducible cases.
Every claim in this skill's reference files is verified against SFTPGo runtime behavior. When SFTPGo releases introduce a new template function, a new key in the template context, or a new action type, update the reference files and bump the metadata.version and metadata.upstream.verified_against in this manifest. When the reference files are aligned with the public docs, set metadata.upstream.docs_synced_at to that date. A template that the skill vouches for must still compile and behave correctly.
references/action-types.md (opens in a new tab)references/deployment.md (opens in a new tab)references/editions.md (opens in a new tab)references/examples.md (opens in a new tab)references/pitfalls.md (opens in a new tab)references/saas.md (opens in a new tab)references/template-context.md (opens in a new tab)references/template-functions.md (opens in a new tab)references/trigger-types.md (opens in a new tab)references/user-guide.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
sftpgo, file-transfer, event-actions, template-authoring, oidc, ldap
Other plugins' skills for the same job
npx claudepluginhub sftpgo/sftpgo-skill --plugin sftpgo-skill