Skip to main content
RapidDev - Software Development Agency

How to Install and Use Sag in OpenClaw

To use Sag in OpenClaw, run `clawhub install sag` in your terminal, configure any required settings in your OpenClaw config, and start applying specific automation patterns and workflow sequences directly from OpenClaw chat. Sag is a ClawHub utility skill that focuses on defined automation patterns and repeatable workflow structures for technical and operational use cases.

What you'll learn

  • How to install and activate the Sag ClawHub skill in OpenClaw
  • How to configure Sag and understand its available automation patterns
  • How to invoke specific Sag automation patterns from OpenClaw chat prompts
  • How Sag differs from Larry and when to use each utility skill
  • How to combine Sag with other OpenClaw skills for comprehensive workflow automation
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner13 min read10 minutesPlatform ToolsMarch 2026RapidDev Engineering Team
TL;DR

To use Sag in OpenClaw, run `clawhub install sag` in your terminal, configure any required settings in your OpenClaw config, and start applying specific automation patterns and workflow sequences directly from OpenClaw chat. Sag is a ClawHub utility skill that focuses on defined automation patterns and repeatable workflow structures for technical and operational use cases.

How Sag Enables Specific Automation Patterns in OpenClaw

In software and operational workflows, there are patterns that appear repeatedly: data transformation pipelines, validation sequences, batch processing routines, structured reporting workflows. These patterns have a known shape — a defined sequence of steps with predictable inputs and outputs. Sag brings these automation patterns into OpenClaw as callable workflow templates, letting you invoke them from chat rather than rebuilding the logic from scratch each time.

Where Larry (the companion utility skill) focuses on task management and productivity-oriented workflows for individual contributors, Sag is oriented toward more technically specific automation patterns. This might include structured data validation sequences, format conversion workflows, batch operation routines, or systematic review patterns that follow a technical specification. Sag is the right tool when you need consistency and precision in how an automation is executed — when the shape of the workflow matters as much as the output.

In practice, Sag and Larry complement each other within an OpenClaw setup: Larry handles the human-facing productivity layer (standups, checklists, weekly reviews), while Sag handles the structured technical automation layer (data processing, validation, transformation). Teams that install both cover a wide range of automation scenarios without needing separate tools for each category. For individuals, installing the skill that best matches your primary automation needs is the right starting point, with the option to add the other later.

Integration method

ClawHub Skill

Sag runs inside OpenClaw as a native ClawHub skill. Once installed via `clawhub install sag`, the skill extends OpenClaw with a library of automation patterns and workflow definitions that can be invoked through natural language prompts. Sag handles the execution logic, state tracking, and output formatting for these patterns without requiring external services or APIs — everything runs inside your OpenClaw instance.

Prerequisites

  • OpenClaw installed and running (see openclaw.ai for installation instructions)
  • ClawHub CLI available in your terminal (bundled with OpenClaw)
  • Terminal/command line access to run the clawhub install command
  • Familiarity with OpenClaw chat prompts and the ClawHub skill system

Step-by-step guide

1

Install the Sag Skill via ClawHub

Open your terminal and run the clawhub install command to add Sag to your OpenClaw instance. ClawHub downloads the sag skill package, verifies its checksum against the registry, and registers it with your local OpenClaw configuration. Installation takes 10-20 seconds. When it completes, the terminal shows a confirmation message with the installed version and any configuration keys that may be required. Sag's core pattern library may work without additional configuration, though some patterns that interact with external data sources may require credentials. After installation, run `clawhub info sag` to see the full documentation including the list of built-in automation patterns, their trigger phrases, and any pattern-specific configuration options. Understanding the pattern library before using Sag helps you write more effective prompts.

terminal
1# Install sag
2clawhub install sag
3
4# Verify installation
5clawhub list
6
7# View pattern library and configuration reference
8clawhub info sag

Pro tip: The `clawhub info sag` output is particularly valuable for this skill because it lists the specific automation patterns Sag provides. Review these before writing your first prompts — knowing pattern names lets you invoke them precisely rather than describing what you want from scratch.

Expected result: Terminal shows 'sag@X.X.X installed successfully'. The skill appears in `clawhub list` and `clawhub info sag` displays the available automation patterns and configuration options.

2

Review the Pattern Library and Configure Sag

Before running automation patterns, review the output of `clawhub info sag` to understand what patterns are available and how they are invoked. Each pattern in Sag has a name, a description, and specific input/output expectations — understanding these before using the skill produces much more accurate results than trial and error. If Sag requires any configuration (such as default output formats, pattern-specific settings, or credentials for external data source patterns), add these to your OpenClaw config using `clawhub config set` or by editing `~/.openclaw/skills/sag.yaml`. Apply the changes with `clawhub reload`. For Sag patterns that process external data, the relevant data must be provided directly in your OpenClaw prompt or sourced from another skill that Sag can chain with. Sag is a pattern execution engine — it applies defined logic to inputs you provide, so the quality of your inputs directly affects the quality of outputs.

sag.yaml
1# Review pattern library
2clawhub info sag
3
4# Configure Sag in ~/.openclaw/skills/sag.yaml
5sag:
6 default_output_format: "structured" # structured | plain | json
7 pattern_verbosity: "normal" # silent | normal | verbose
8 max_batch_size: 100 # max items in batch operations
9 strict_pattern_matching: false # require exact pattern names (default: fuzzy)
10
11# Apply configuration
12clawhub reload
13
14# Verify Sag is active
15clawhub status sag

Pro tip: Set `pattern_verbosity: verbose` during your initial Sag sessions to understand exactly which pattern is being applied to your prompts and how Sag is interpreting your input. Switch to 'normal' once you are comfortable with the pattern behaviors.

Expected result: `clawhub status sag` shows 'active'. Configuration is applied and `clawhub config get` confirms any set values are present.

3

Test Sag with a Built-In Automation Pattern

Open OpenClaw chat and test Sag by invoking one of its built-in automation patterns. Start with a simple, self-contained pattern that does not require external data sources — something where you can provide all the input directly in your prompt and immediately verify the output is correct. Good first tests are data cleaning or validation patterns: give Sag a list of items with deliberate errors and ask it to apply a specific cleaning pattern. The result should be a consistently structured output that matches the pattern's defined behavior. Invoke Sag explicitly by name to ensure it handles the prompt: 'Sag, apply [pattern name] to...' or 'Using Sag, run the [pattern name] pattern on...'. Once you are familiar with how OpenClaw routes to Sag naturally, the explicit invocation becomes optional for prompts that clearly match Sag's pattern vocabulary. RapidDev can help teams define custom Sag automation patterns for specific operational workflows — particularly useful when the built-in pattern library does not cover your exact use case.

OpenClaw Prompt

Sag, apply a text-normalization pattern to the following list of product names and return them in a consistent format — title case, no extra spaces, and abbreviations expanded: 'AI systems ltd', 'rapid dev INC', 'cloud solutions corp', 'techworks LLC'.

Paste this in OpenClaw chat

Pro tip: If Sag applies the wrong pattern or misinterprets your prompt, try being more specific about the pattern name and the input format. For example: 'Sag, apply the text-normalization pattern. Input format: plain text list. Apply these rules: ...' — explicit structure reduces ambiguity.

Expected result: Sag returns a consistently formatted list with title case, expanded abbreviations, and normalized spacing. The output matches the expected pattern behavior described in `clawhub info sag`.

4

Define a Custom Automation Pattern

While Sag ships with a built-in pattern library, you can also define custom patterns in the sag.yaml configuration file for workflows specific to your use case. Custom patterns follow the same structure as built-in patterns — a name, a description, input expectations, a sequence of processing steps, and an output format. Custom patterns are particularly valuable for recurring operational workflows that are specific to your team or project. Instead of describing the full logic in every prompt, you define it once in the configuration file and then invoke it by name from OpenClaw chat. After defining a custom pattern, run `clawhub reload` to apply the configuration and then test the pattern with a representative input to verify it behaves as expected. Complex patterns may require iteration — refining the step definitions after seeing how Sag interprets and executes them.

OpenClaw Prompt

Sag, run my custom pattern called 'vendor-contact-cleanup' on this list of vendor contact entries. Apply the pattern rules: standardize phone number format to +1-XXX-XXX-XXXX, capitalize company names, and flag any entries where the email domain does not match the company name.

Paste this in OpenClaw chat

sag.yaml
1# Define custom patterns in ~/.openclaw/skills/sag.yaml
2sag:
3 custom_patterns:
4 vendor-contact-cleanup:
5 description: "Standardize and validate vendor contact records"
6 input_format: "list of contact records"
7 steps:
8 - normalize_phones: "format to +1-XXX-XXX-XXXX"
9 - capitalize_companies: "title case for company names"
10 - validate_email_domain: "flag where domain doesn't match company name"
11 output_format: "structured_report"
12 report_sections:
13 - passed: "records that passed all rules"
14 - flagged: "records with validation issues"
15 data-quality-check:
16 description: "Run standard data quality checks on a dataset"
17 steps:
18 - check_completeness: "flag empty required fields"
19 - check_format_consistency: "flag format outliers"
20 - check_duplicates: "identify duplicate entries"
21 output_format: "summary_with_counts"

Pro tip: Name custom patterns with hyphens and lowercase letters (like 'my-pattern-name') for consistent invocation from OpenClaw chat. Avoid spaces in pattern names — they make prompts awkward and can be misinterpreted by OpenClaw's intent routing.

Expected result: The custom pattern executes correctly from OpenClaw chat, applying the defined processing steps and returning output in the specified format.

5

Combine Sag with Other OpenClaw Skills in a Pipeline

Sag's automation patterns become most powerful when chained with other ClawHub skills in a multi-step OpenClaw workflow. You might use ByteRover to fetch raw data, Sag to apply a validation or transformation pattern to that data, and Supermemory to save the processed result for later retrieval — all in a single OpenClaw conversation. Cross-skill pipelines in OpenClaw work by describing the full workflow intent in a single multi-step prompt. OpenClaw routes each component to the appropriate skill and passes outputs between steps. Describing the pipeline clearly — including what data flows from one step to the next — is the key to getting reliable multi-skill execution. For regularly run pipelines, consider whether the workflow could be encapsulated as a named Larry workflow template that invokes Sag patterns at specific steps. Larry handles the orchestration and interaction layer, while Sag handles the structured processing steps within the pipeline.

OpenClaw Prompt

First, retrieve this week's sales data summary using ByteRover. Then apply Sag's data-quality-check pattern to verify the data is complete and consistent. Finally, save the quality check report to Supermemory under the title 'Sales Data QC — [current date]'.

Paste this in OpenClaw chat

Pro tip: When describing multi-skill pipelines, use explicit transition phrases like 'then apply Sag to the result' or 'pass the output to ByteRover' to help OpenClaw understand the data flow between skills. Implicit transitions can be misinterpreted as separate independent requests.

Expected result: OpenClaw executes the three-step pipeline in sequence: retrieves data via ByteRover, applies Sag's quality check pattern, and saves the report to Supermemory. Each step's output is visible in the OpenClaw chat response.

Common use cases

Structured Data Validation Workflow

Define a validation pattern in Sag that checks a dataset or input against a set of rules and returns a structured report of what passed, failed, and needs manual review. Sag's pattern execution ensures the same validation logic is applied consistently every time, reducing the variability of manual checks.

OpenClaw Prompt

Using Sag, run the data-validation pattern on the following CSV rows and check each row against these rules: email must be valid format, age must be between 18 and 120, and the status field must be one of 'active', 'inactive', or 'pending'. Flag any rows that fail.

Copy this prompt to try it in OpenClaw

Batch Format Conversion and Processing

Apply a Sag automation pattern to convert or transform a batch of items following a consistent structure. For example, reformatting a list of unstructured text entries into a standardized JSON format, or applying a cleaning and normalization pattern to raw data before it is used downstream.

OpenClaw Prompt

Sag, apply the batch-normalize pattern to these 10 company names: remove punctuation, convert to title case, expand common abbreviations (Ltd → Limited, Corp → Corporation, Inc → Incorporated), and return the cleaned list in the same order.

Copy this prompt to try it in OpenClaw

Systematic Technical Review Sequence

Run a Sag-defined technical review pattern against a piece of work — code snippet, configuration file, specification document — that applies a standardized checklist of review criteria and returns a structured findings report. Useful for consistency in code reviews, config audits, or spec validations.

OpenClaw Prompt

Sag, run the config-audit pattern on this environment configuration. Check for missing required fields, insecure default values, commented-out production credentials, and any fields that use placeholder values like 'your-key-here' or 'TODO'. Return findings categorized by severity.

Copy this prompt to try it in OpenClaw

Troubleshooting

Sag does not recognize a pattern name from my prompt — returns a generic response instead of executing the pattern

Cause: The pattern name in the prompt does not match any built-in or custom pattern in Sag's library, or `strict_pattern_matching` is enabled and requires exact name matches.

Solution: Run `clawhub info sag` to review exact built-in pattern names. For custom patterns, check that the pattern name in your prompt matches the name defined in sag.yaml exactly (case-sensitive, hyphen-separated). If using fuzzy matching (`strict_pattern_matching: false`), try rephrasing the pattern description more explicitly.

typescript
1# Check available pattern names
2clawhub info sag
3
4# Verify custom pattern definitions are correct
5clawhub config validate sag

`clawhub install sag` fails with a network error or 429 rate limit

Cause: ClawHub's skill registry has temporary rate limits. This is a registry infrastructure issue unrelated to the Sag skill.

Solution: Wait 2-5 minutes and retry. Use `clawhub install sag --force` if a prior partial installation is blocking a clean retry.

typescript
1# Force reinstall
2clawhub install sag --force

Sag applies a pattern but the output format does not match what I expected

Cause: The default output format configured in sag.yaml may not match the format expected for a specific pattern, or the pattern's output format is different from the general default.

Solution: Specify the desired output format explicitly in your OpenClaw prompt: 'Using Sag, apply [pattern name] and return the result as a JSON object' or 'as a numbered list'. You can also override the default in sag.yaml with `default_output_format` or set a pattern-specific format in custom pattern definitions.

typescript
1# Set default format in skill config
2sag:
3 default_output_format: "json" # structured | plain | json

After adding custom patterns to sag.yaml and running `clawhub reload`, Sag still cannot find them

Cause: The sag.yaml file has a YAML syntax error, the indentation is incorrect, or the file is saved in the wrong location.

Solution: Validate your YAML syntax with an online YAML validator or `python3 -c 'import yaml; yaml.safe_load(open("~/.openclaw/skills/sag.yaml"))'`. Ensure the file is at the exact path `~/.openclaw/skills/sag.yaml` (not inside a subdirectory). Check that custom pattern names use hyphens, not spaces.

typescript
1# Validate YAML syntax
2python3 -c "import yaml; yaml.safe_load(open('$HOME/.openclaw/skills/sag.yaml'))" && echo 'YAML is valid'

Best practices

  • Run `clawhub info sag` and review the full pattern library before writing prompts — knowing exact pattern names and their input expectations dramatically improves first-attempt accuracy.
  • Name custom patterns with lowercase hyphen-separated words (e.g., `my-custom-pattern`) for consistent, unambiguous invocation from OpenClaw chat.
  • Set `pattern_verbosity: verbose` during initial setup and pattern testing to understand exactly how Sag is interpreting and executing patterns, then switch to 'normal' for daily use.
  • Provide clear, structured inputs when invoking Sag patterns — the quality of Sag's output is directly proportional to the clarity and completeness of the data you provide.
  • Test custom patterns with representative sample data after defining them in sag.yaml, before using them for actual work — edge cases in the sample data reveal problems in the pattern definition.
  • Combine Sag with Larry for complex workflows: Larry handles interactive orchestration and task management, Sag handles structured pattern execution at specific pipeline steps.
  • For data processing patterns, specify the expected input format explicitly in your prompt — Sag performs better when it knows whether it is receiving a CSV, JSON, plain text, or structured list.
  • Keep custom pattern definitions focused and single-purpose — patterns that try to do too many things produce inconsistent results; compose multiple focused patterns sequentially instead.

Alternatives

Frequently asked questions

How do I install Sag in OpenClaw?

Run `clawhub install sag` in your terminal. After installation, run `clawhub info sag` to see the available automation patterns and any configuration options. For basic patterns, Sag may work immediately without additional setup. Run `clawhub reload` if you add any configuration and then test from OpenClaw chat.

What is Sag used for in OpenClaw?

Sag is a utility skill that provides specific automation patterns and workflow structures for technical and operational use cases. It applies defined processing logic consistently to inputs you provide — useful for data validation, format normalization, batch transformations, and structured review sequences. It complements the Larry skill, which handles productivity and task management workflows.

What is the difference between Larry and Sag in OpenClaw?

Both are ClawHub utility skills but with different automation focuses. Larry is oriented toward personal productivity and task management workflows — standups, checklists, project reviews. Sag focuses on technical automation patterns — data validation, format conversion, batch processing, structured analysis. Many users install both for comprehensive workflow coverage.

How do I configure Sag and add custom patterns in OpenClaw?

Create or edit `~/.openclaw/skills/sag.yaml` to set configuration options and define custom patterns. Custom patterns specify a name, description, processing steps, and output format. Run `clawhub reload` after saving changes to apply them. Verify with `clawhub status sag` and test custom patterns with sample input before using them on real data.

Sag is not finding my custom pattern even after I added it to sag.yaml — what is wrong?

The most common causes are YAML syntax errors (especially incorrect indentation), the file being in the wrong location (it must be at `~/.openclaw/skills/sag.yaml`), or pattern names containing spaces instead of hyphens. Validate your YAML syntax, confirm the file path, and ensure pattern names use only lowercase letters and hyphens.

Can RapidDev help build custom Sag automation patterns for my workflow?

Yes — RapidDev can help design and configure custom Sag patterns for specific operational workflows, particularly for teams with recurring data processing, validation, or transformation needs that go beyond the built-in pattern library. Reach out to RapidDev if your use case requires patterns that the default Sag installation does not cover.

OpenClaw Sag rate limit errors — what causes them and how do I avoid them?

Sag itself does not call external APIs, so rate limit errors from Sag are most likely originating from other skills Sag is chained with in a pipeline. If you see rate limit errors, identify which downstream API is hitting the limit and add delays between batch operations in your OpenClaw prompt. For ClawHub registry rate limits during skill installation, wait 2-3 minutes and retry.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.