This skill should be used when the user asks about "search attributes", "temporal search", "list workflows", "visibility query", "elasticsearch temporal", "find workflow", "workflow filter", or needs guidance on searching and filtering Temporal workflows.
From timelordnpx claudepluginhub therealbill/mynet --plugin timelordThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Guidance for searching and filtering Temporal workflows using visibility features.
Temporal visibility allows searching workflows by:
| Store | Features | Use Case |
|---|---|---|
| Standard (SQL) | Basic queries | Development, small scale |
| Advanced (Elasticsearch) | Full queries, aggregations | Production, complex queries |
Built-in searchable attributes:
| Attribute | Type | Description |
|---|---|---|
WorkflowId | Keyword | Workflow identifier |
RunId | Keyword | Run identifier |
WorkflowType | Keyword | Workflow function name |
ExecutionStatus | Keyword | Running, Completed, Failed, etc. |
StartTime | Datetime | When workflow started |
CloseTime | Datetime | When workflow completed |
ExecutionDuration | Int | Duration in milliseconds |
TaskQueue | Keyword | Task queue name |
-- By status
ExecutionStatus = 'Running'
ExecutionStatus = 'Failed'
ExecutionStatus = 'Completed'
ExecutionStatus = 'Terminated'
ExecutionStatus = 'TimedOut'
-- By workflow type
WorkflowType = 'OrderWorkflow'
-- By workflow ID
WorkflowId = 'order-12345'
-- By task queue
TaskQueue = 'order-processing'
-- Started after date
StartTime > '2024-01-01T00:00:00Z'
-- Started within range
StartTime BETWEEN '2024-01-01' AND '2024-01-31'
-- Completed recently
CloseTime > '2024-01-15T00:00:00Z'
-- Long-running workflows
ExecutionDuration > 3600000 -- > 1 hour in ms
-- AND conditions
WorkflowType = 'OrderWorkflow' AND ExecutionStatus = 'Failed'
-- OR conditions
ExecutionStatus = 'Failed' OR ExecutionStatus = 'TimedOut'
-- Complex combinations
(WorkflowType = 'OrderWorkflow' OR WorkflowType = 'PaymentWorkflow')
AND ExecutionStatus = 'Running'
AND StartTime > '2024-01-01'
-- Order by start time (descending)
ORDER BY StartTime DESC
-- Multiple columns
ORDER BY WorkflowType ASC, StartTime DESC
# Running workflows
temporal workflow list --query "ExecutionStatus='Running'"
# Failed order workflows
temporal workflow list \
--query "WorkflowType='OrderWorkflow' AND ExecutionStatus='Failed'"
# Recent failures
temporal workflow list \
--query "ExecutionStatus='Failed' AND CloseTime > '2024-01-15'" \
--limit 20
# With output format
temporal workflow list \
--query "ExecutionStatus='Running'" \
--output json
timelord workflow list --query "ExecutionStatus='Failed'" --limit 10 --json
# Keyword (exact match)
temporal operator search-attribute create \
--namespace default \
--name CustomerId \
--type Keyword
# Text (full-text search)
temporal operator search-attribute create \
--namespace default \
--name Description \
--type Text
# Numeric types
temporal operator search-attribute create \
--namespace default \
--name OrderTotal \
--type Double
temporal operator search-attribute create \
--namespace default \
--name ItemCount \
--type Int
# Boolean
temporal operator search-attribute create \
--namespace default \
--name IsPriority \
--type Bool
# Datetime
temporal operator search-attribute create \
--namespace default \
--name DueDate \
--type Datetime
# Multiple values
temporal operator search-attribute create \
--namespace default \
--name Tags \
--type KeywordList
At workflow start:
options := client.StartWorkflowOptions{
ID: "order-12345",
TaskQueue: "orders",
SearchAttributes: map[string]interface{}{
"CustomerId": "cust-789",
"OrderTotal": 99.99,
"IsPriority": true,
"Tags": []string{"electronics", "express"},
},
}
we, err := c.ExecuteWorkflow(ctx, options, OrderWorkflow, order)
During workflow execution:
func OrderWorkflow(ctx workflow.Context, order Order) error {
// Update search attributes
err := workflow.UpsertSearchAttributes(ctx, map[string]interface{}{
"OrderStatus": "processing",
"ItemCount": len(order.Items),
})
if err != nil {
return err
}
// Continue workflow...
return nil
}
-- By customer
CustomerId = 'cust-789'
-- By price range
OrderTotal >= 100.00 AND OrderTotal < 500.00
-- By priority
IsPriority = true
-- By tags (KeywordList)
Tags = 'electronics'
-- Combining standard and custom
WorkflowType = 'OrderWorkflow'
AND CustomerId = 'cust-789'
AND ExecutionStatus = 'Running'
-- All failed workflows today
ExecutionStatus = 'Failed'
AND CloseTime > '2024-01-15T00:00:00Z'
-- Stuck workflows (running for > 1 hour)
ExecutionStatus = 'Running'
AND StartTime < '2024-01-15T10:00:00Z'
-- Terminated workflows
ExecutionStatus = 'Terminated'
AND CloseTime > '2024-01-14'
-- High-value orders
OrderTotal > 1000 AND ExecutionStatus = 'Running'
-- Customer's workflows
CustomerId = 'cust-123'
-- Priority items due soon
IsPriority = true AND DueDate < '2024-01-16'
-- Orders by region
Region = 'US-WEST' AND WorkflowType = 'OrderWorkflow'
-- Workflows on specific task queue
TaskQueue = 'critical-processing'
-- Long-running workflows
ExecutionDuration > 86400000 -- > 1 day
-- Workflows started by specific service
InitiatingService = 'api-gateway'
| Feature | Standard SQL | Elasticsearch |
|---|---|---|
| Basic queries | ✓ | ✓ |
| ORDER BY | Limited | ✓ |
| COUNT queries | Limited | ✓ |
| Full-text search | ✗ | ✓ |
| Aggregations | ✗ | ✓ |
| Performance at scale | Limited | Excellent |
Helm values for Elasticsearch:
elasticsearch:
enabled: true
replicas: 3
server:
config:
persistence:
advancedVisibilityStore: es-visibility
# Check visibility store
temporal operator cluster describe
# Verify search attributes
temporal operator search-attribute list
| Do | Don't |
|---|---|
| Index frequently queried fields | Index everything |
| Use appropriate types | Store JSON as Keyword |
| Plan attributes upfront | Add attributes ad-hoc |
| Keep names consistent | Use inconsistent naming |
| Do | Don't |
|---|---|
| Use indexed fields | Scan all workflows |
| Add time bounds | Open-ended time queries |
| Limit results | Fetch unlimited rows |
| Use specific conditions | Use OR excessively |
CustomerId # Keyword - entity reference
OrderTotal # Double - numeric value
IsPriority # Bool - flag
ProcessingStage # Keyword - enum value
Tags # KeywordList - multiple values
Description # Text - searchable content
DueDate # Datetime - temporal value
temporal operator search-attribute listFor detailed search patterns, consult:
references/query-examples.md - Common query patternsreferences/elasticsearch-setup.md - Advanced ES configuration