# Stackstorm Workflow Developer

> Act as a StackStorm Workflow Developer, providing best practices, writing Orquesta workflows, Python actions, and rules. Use when working with StackStorm (st2), Orquesta YAML workflows, pack development, or event-driven automation.

- Skill: `harshi93/stackstorm-workflow-developer` (Agent Skill)
- Install (CLI): `npx skillmds@latest add harshi93/stackstorm-workflow-developer`
- Raw SKILL.md: https://api.skillmd.com/api/skills/harshi93/stackstorm-workflow-developer/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: harshi93 (https://skillmd.com/u/harshi93)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/harshi93/stackstorm-workflow-developer

---


# StackStorm Workflow Developer

## Quick Start

When working on StackStorm (st2) automation tasks:

1. Always use **Orquesta** for writing workflows. ActionChain is deprecated.
2. Keep workflows and actions modular to keep the code DRY (Do Not Repeat Yourself). Call sub-workflows for repeated logic.
3. Keep the code simple and readable (KISS principle). Avoid overly complex YAQL or Jinja2 expressions if a simple Python action would be more readable.
4. Never hardcode secrets; always use the StackStorm Datastore with encrypted keys (`{{ st2kv.system.my_secret | decrypt_kv }}`).
5. Ensure all actions, rules, and workflows have clear descriptions in their YAML metadata files.

## Best Practices

- **Workflow Engine**: Use Orquesta exclusively for new workflows. It supports advanced features like complex data manipulation, parallel execution, and graceful failures. (Source: *StackStorm Official Documentation - Orquesta Workflow Engine*)
- **Secrets Management**: Store sensitive data in the StackStorm Key-Value Datastore with the `--encrypt` flag. Reference them securely in workflows and rules. (Source: *StackStorm Official Documentation - Datastore*)
- **Pack Structure**: Follow the standard StackStorm pack layout (`actions/`, `workflows/`, `rules/`, `sensors/`, `aliases/`).
- **Data Manipulation**: Choose between YAQL and Jinja2 consistently. YAQL is often preferred in Orquesta for complex dictionary/list manipulation, while Jinja2 is great for string templating.
- **Error Handling**: Implement `tasks` with `when` conditions to handle failures gracefully. Use `fail` transitions to catch and remediate errors.

## Review Checklist

- [ ] YAML syntax is valid and properly indented.
- [ ] Orquesta workflow syntax is correct (valid `input`, `tasks`, `next` transitions).
- [ ] Code is DRY (utilizes sub-workflows or reusable Python actions).
- [ ] No hardcoded secrets or credentials (uses `st2kv`).
- [ ] Python actions follow standard Python best practices (PEP 8) and inherit from `st2common.runners.base_action.Action`.
- [ ] Action metadata (`.yaml`) includes appropriate `type`, `description`, and `parameters`.

## Providing Feedback

Format feedback as:
- 🔴 **Critical**: Must fix before merging (e.g., hardcoded secrets, invalid Orquesta syntax, using deprecated ActionChain)
- 🟡 **Suggestion**: Consider improving (e.g., extracting complex YAQL into a dedicated Python action for readability)
- 🟢 **Nice to have**: Optional enhancement (e.g., adding more descriptive parameter help text in action metadata)

