Install
openclaw skills install swampModel any API with Swamp, test it, and enrich *Claw with new capabilities — full lifecycle from idea to working integration
openclaw skills install swampYou are an AI agent that uses Swamp to model any API, test it, and turn it into a reusable *Claw capability. Swamp is an AI-native automation CLI that represents external resources (APIs, CLIs, cloud services) as typed models with executable methods and composable workflows.
Before any operation, check if the current directory is a swamp repository. If not, initialize one:
swamp repo init --tool claude
This creates a .swamp/ directory with the necessary structure. Use --tool claude to set up the AI agent integration for Claude/OpenClaw.
Find available model types to understand what kinds of resources can be modeled:
swamp model type search
swamp model type describe <type>
The command/shell type is the most versatile — it can model any API via shell commands (curl, httpie, CLI tools).
Create a new model definition for the API:
swamp model create <type> <name>
Example: swamp model create command/shell github-issues
Open and edit the model's YAML definition to configure endpoints, authentication, parameters, and methods:
swamp model edit <name>
When editing, define:
Ensure the model definition is well-formed:
swamp model validate <name>
Fix any validation errors before proceeding.
Execute a method on your model to test it:
swamp model method run <model_name> <method_name>
Check outputs, logs, and data from the execution:
swamp model output get <output_id_or_model_name>
swamp model output logs <output_id>
swamp model output data <output_id>
See past executions:
swamp model method history search
swamp model method history get <output_id_or_model_name>
Iterate on the model definition until methods return the expected results.
Chain multiple model methods into automated workflows with dependency ordering:
swamp workflow create <name>
swamp workflow edit <name>
swamp workflow validate <name>
swamp workflow run <name>
Workflows support:
Check workflow results:
swamp workflow history get <name>
swamp workflow history logs <run_id>
Store API keys and secrets securely — never hardcode them:
swamp vault create <type> <name>
swamp vault put <vault_name> <KEY=value>
swamp vault list-keys <vault_name>
Reference secrets in model definitions using CEL expressions like vault.get("my-vault", "API_KEY").
Inspect outputs and artifacts across models:
swamp data list <model_name>
swamp data get <model_name> <data_name>
swamp data search <query>
Swamp-club is the community registry and collaboration layer. Authenticate to push/pull extensions and share work:
swamp auth login
swamp auth login --server <url>
swamp auth whoami
swamp auth logout
swamp auth login opens a browser-based login flow by default--no-browser with --username and --password for headless/CI environmentsSWAMP_CLUB_URL env var to target a custom serverswamp auth whoami after loginAuthentication is required before pushing extensions to the registry.
Extensions expand Swamp's model types and capabilities. Use the extension registry to share and reuse custom models:
Install a community or team extension from the registry:
swamp extension pull <extension_name>
swamp extension pull <extension_name> --force
Use --force to overwrite existing files without prompting.
See what extensions are currently installed:
swamp extension list
Publish your own extension to the swamp registry (requires swamp auth login first):
swamp extension push <manifest-path>
swamp extension push <manifest-path> --dry-run
Use --dry-run to build the archive locally and verify it without actually publishing. Use -y to skip confirmation prompts.
Uninstall a pulled extension and clean up its files:
swamp extension remove <extension_name>
The typical flow for extending Swamp with new model types:
extensions/models/swamp model create <your-type> <name>swamp extension push ./manifest.yaml --dry-runswamp extension push ./manifest.yamlswamp extension pull <your-extension>Once a Swamp model is validated and working, turn it into a standalone *Claw skill:
swamp model get <name> --json to extract the full definitionclawhub publishThe generated skill should:
swamp in its bins dependencyFor reusable model types (not just individual models), publish as a Swamp extension:
extensions/models/swamp extension push ./manifest.yamlswamp extension pull <name>This creates a two-layer sharing model: extensions for model types (Swamp registry), skills for agent workflows (ClawHub).
"Model the JSONPlaceholder API so I can list and create posts"
swamp model create command/shell jsonplaceholderlist-posts (GET /posts), create-post (POST /posts)swamp model method run jsonplaceholder list-posts"Create a weather model that fetches forecasts by city"
swamp model create command/shell weatherforecast method using curl -s "wttr.in/{city}?format=j1"swamp model method run weather forecast"Create a workflow that fetches GitHub issues, summarizes them, and posts to Slack"
github-issues, slack-webhookswamp workflow create issue-digestswamp workflow run issue-digest"Turn my working weather model into a skill others can install"
swamp model get weather --json to exportSKILL.md wrapping the weather model commandsclawhub publish ./weather-skill"Publish my custom Stripe model type so the team can use it"
swamp auth login to authenticate with swamp-clubswamp extension push ./stripe-models/manifest.yaml --dry-run to verifyswamp extension push ./stripe-models/manifest.yaml to publishswamp extension pull stripe-models--json flag when you need to parse Swamp output programmaticallyswamp model validate before running to catch definition errors early-v (verbose) flag when debugging unexpected behaviorswamp auth login before pushing extensions to the registryswamp extension push --dry-run to verify an extension before publishingswamp auth whoami to confirm your identity before registry operations