/formae:formae-plugin-newfrom formae
Guides building a new formae resource plugin for a cloud provider or service, including provider research, schema design, CRUD implementation, and TDD conformance testing.
Ships in formae. 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.
None: SKILL.md is the whole skill.
Create a complete formae resource plugin for a cloud provider or service, following the plugin SDK tutorial and using TDD for the implementation.
Call list_agent_plugins with an explicit profile and read the mode it reports.
If the connection is hosted formae, say so plainly before starting: a hosted installation cannot install the plugin this produces, because plugins ride the agent image and there is no on-demand install. The work is still worth doing — for a self-hosted agent, or as a candidate for the curated cloud plugin set — but it will not become usable on their installation at the end of this session. Ask for explicit confirmation before continuing, and if they decline, stop here rather than building something they cannot use.
If the connection is a self-hosted agent, continue.
Building a resource plugin is a large, multi-step, context-hungry effort: provider API research, schema design, CRUD implementation, TDD for every operation, conformance tests, and end-to-end verification. The full workflow (steps 1–8 below) easily spans hundreds of tool calls and thousands of tokens — far bigger than authoring a forma file.
If the user arrived here mid-authoring (i.e., they were writing a forma file and discovered no plugin exists for their provider), offer to run the plugin build as a separate sub-agent or fresh session before diving in:
"Building this plugin is a large task that will likely fill the current conversation's context window. I recommend starting a fresh Claude Code session (or I can launch a sub-agent) so the plugin build doesn't crowd out your authoring work. Want me to proceed that way?"
If the user is not actively managing context, proactively warn them before starting:
"Heads up: building a full plugin typically uses 40–60 % of a context window on its own. I'll warn you again at 40 % and every 10 % after that, but if you'd prefer to keep this conversation focused on authoring, I can hand the plugin work to a sub-agent now."
Only skip these prompts if the user has already confirmed they want to build the plugin in the current session.
After ANY code changes to the plugin, you MUST run make install before running conformance tests. The conformance tests run against the INSTALLED plugin binary, not the source code. Skipping this step means you're testing stale code.
Ask the user an open-ended question: what provider or service do they want to build a plugin for, and which resource types should it support? Do NOT present a multiple-choice list of providers — there are thousands of possible targets and we cannot guess. Just ask.
Collect the following from the user:
AWS, GCP, ATLAS). The scaffolder will uppercase mixed-case input automatically and emit a notice when it does so.Research the provider's API to understand:
Look at how Terraform or Pulumi model equivalent resources for schema design reference.
If resources have polymorphic structures (like DNS record types with different field shapes), design the schema to accommodate all variants.
Guided mode checkpoint: present API research findings and proposed resource model to the user for approval before continuing.
If your plugin shells out to an external binary (e.g., atlas, helm, kubectl), the binary must be available in the formae agent's $PATH at runtime. The plugin SDK does not yet ship a first-class mechanism for bundling extra binaries with plugin distributions; the conventions below are the current stop-gap.
Prior art. Formae core ships the pkl-reader-helm external binary using the pattern at formae/scripts/install-helm-reader.sh. This is the canonical reference for any plugin that depends on a runtime binary — read it before designing your own.
Plugin-side convention. On plugin initialization, call exec.LookPath("<binary>") and fail fast with a clear error message naming both the binary and the install path. Example error:
plugin atlas: required binary `atlas` not found in $PATH.
Install with: /path/to/install-atlas.sh
See: https://atlasgo.io/getting-started
Optionally expose a health-check endpoint that reports binary availability so operators can diagnose deployment issues without invoking real CRUD operations.
Multi-arch handling. Mirror the uname -s / uname -m mapping pattern from formae/scripts/install-helm-reader.sh to select the correct release asset per platform.
Dev-mode bootstrap. Until the SDK supports bundled binaries, mirror the install script in your plugin's own repository (e.g., scripts/install-atlas.sh). Have make install invoke it so fresh dev machines and CI runners can bootstrap automatically.
Known SDK limitation. Track the follow-up "plugin ships extra binaries" SDK enhancement — when that lands, plugins will declare their binary dependencies in formae-plugin.pkl and the agent host will install them at plugin registration time.
Run the scaffolding command:
formae plugin init --no-input --name <name> --namespace <NS> --description "<desc>" --author "<author>" --module-path "<path>" --license Apache-2.0
Verify the scaffolded project:
ls -Rformae-plugin.pklmake buildFetch the plugin SDK tutorial from https://docs.formae.io/en/latest/plugin-sdk/tutorial/ and follow it start to finish, adapting each lesson to the target provider.
Reference prior art plugins for general examples (single resource, simple CRUD): AWS, Azure, GCP, OCI, OVH — each at https://github.com/platform-engineering-labs/formae-plugin-<provider>.
For specific advanced patterns, the canonical references are:
| Pattern | Canonical reference |
|---|---|
| Resolvable computed outputs (custom Read, output-port story) | formae-plugin-aws/schema/pkl/ses/emailidentity.pkl |
| Polymorphic Target auth (abstract + discriminated subclasses) | formae-plugin-k8s/schema/pkl/main/k8s.pkl |
| Cross-plugin Target Resolvables (Target Config field accepts upstream resolvable) | formae-plugin-grafana/schema/pkl/grafana.pkl |
Collection Resolvables (Mapping<String, formae.Resolvable>) | formae-plugin-compose — see the Target Config file with the Mapping field |
Synthetic identifiers (identifier = "Label" for logical resources without natural server-side IDs) | formae-plugin-atlas — Migration resource schema |
Tutorial lessons to follow (adapt to target provider):
@ResourceType, @CreateOnly, @ReadOnly)OperationErrorCode patterns from the SDKmake conformance-testTarget Config field serialization (G-6). Plugin Go structs SHOULD declare camelCase json tags on Config fields (e.g., `json:"host"`). PKL fields should be single-name camelCase. Do NOT use the hidden lowercase / fixed PascalCase = lowercase pattern preserved in older plugins (k8s, Grafana) — that's a wart from Go structs lacking json tags, not a convention. Canonical reference for the clean pattern: the AWS plugin's Target Config classes.
Target Config field immutability (G-8). @formae.ConfigFieldHint.createOnly defaults to true (immutable), the opposite of @formae.FieldHint on resource fields (defaults to false, mutable). This is by-design: a Target's identity is typically defined by immutable environment fields (AWS account ID, region, server URL), so changing one means replacing the Target — and everything in it. Always declare createOnly explicitly on ConfigFieldHint annotations so intent is visible in PKL:
@formae.ConfigFieldHint { createOnly = false } // mutable
hidden host: String
@formae.ConfigFieldHint { createOnly = true } // immutable (also the default)
hidden region: String
MANDATORY: TDD for steps 4–8. Each tutorial lesson includes integration tests (e.g., TestCreate, TestRead, TestReadNotFound, TestUpdate, TestDelete, TestDeleteNotFound, TestList). For EVERY CRUD operation you MUST follow this exact loop:
https://docs.formae.io/en/latest/plugin-sdk/tutorial/05-create/)make install && go test -tags=integration ./... — confirm the test passes.NEVER write implementation code before its corresponding test. NEVER skip writing tests. If you implement Create without first writing TestCreate, you are doing it wrong.
Guided mode checkpoints (skip all in autonomous mode):
In guided mode, do not proceed past a checkpoint until the user approves. If the user requests changes, make them and re-present.
Run make install && make conformance-test.
Fix any failures and re-run. All CRUD and discovery tests must pass before continuing.
Create a test project and verify the full lifecycle:
formae project init in a temporary directoryformae apply --mode reconcile --simulate to verify the planformae apply --mode reconcile to create real resourcesformae inventory to verify resources are managedformae destroy to clean upexamples/ directoryREADME.md with:
Authoring vs. runtime distinction. Schema work (formae eval, PKL editing) does NOT require the plugin to be installed on the agent — the PKL schema is evaluated locally. The plugin binary is only needed for formae apply / runtime operations that actually call cloud APIs.
Where the plugin runs. A resource plugin is a separate process that the formae agent discovers and spawns at startup. The binary must be present on the agent machine — the host (local or remote) where formae agent start runs. The agent's plugin directory is configured in ~/.config/formae/formae.conf.pkl on that machine.
Install requires root and possibly remote access. Placing a binary in the agent's plugin directory typically requires sudo (or equivalent) on the agent host. If the agent runs remotely, you may need SSH access. If the agent runs in a container, you need to rebuild or extend the container image.
The assistant guides, never installs. Walk the user through the installation steps but do NOT:
sudo commands to place binaries on the agent hostDocker-based agents. If the agent runs in a Docker container, adding a plugin requires rebuilding or extending the image so the plugin binary is present inside it. The general approach is to add a COPY step for the plugin binary and a RUN step to register it, then redeploy the container. See docs.formae.io for the authoritative procedure.
Docs gap (as of 2026-06-17): The page
https://docs.formae.io/en/operations/extending-the-agent-image/is listed in the docs sidebar but returns 404. Until it is published, guide the user through the general Docker extension pattern and refer them to docs.formae.io for the latest authoritative steps. Do not fabricate specific Dockerfile snippets as authoritative — confirm with the user before any production change.
Non-Docker agents. Copy the built plugin binary to the agent host's plugin directory (as shown in formae-plugin.pkl's install target or via make install if the agent machine is local), then restart the agent. The exact path is in ~/.config/formae/formae.conf.pkl on the agent host.
Verify the install. After installation, run formae plugin list (or the equivalent agent health check) to confirm the agent has discovered and started the plugin before attempting formae apply.
Before reporting completion, verify each item:
make install && make conformance-test)examples/make install before make conformance-test — tests run against the installed binarymake install and check the outputWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
formae@formae-marketplace is listed by platform-engineering-labs/formae-marketplace — review the source before installing
npx claudepluginhub platform-engineering-labs/formae-marketplace --plugin formae23 skills in this plugin
/formae-applyUse when the user wants to deploy infrastructure, apply a forma file, reconcile a stack, update a stack, or make planned infrastructure changes/formae-authorUse when the user wants to start authoring formae infrastructure or deploy something NEW with formae — e.g. 'I want to deploy X with formae', 'build a k8s app with formae', 'set up infrastructure for Y', 'create a new forma file for my service', 'write formae IaC for Z'. The front door that triages where the work happens, sets up plugin schema deps, and dispatches to focused authoring skills. NOT for applying an existing forma file (use formae-apply) or operating existing infra./formae-configUse when the user wants to switch, list, save, edit, delete, or compare formae configuration profiles in ~/.config/formae/Other plugins' skills for the same job