j4flmao/agent-skills/agentic-workflows
Claude Code and agent skill by j4flmao/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Use this skill when the user says 'agentic workflow', 'agent loop', 'ReAct', 'plan and execute', 'planner executor', 'reflection loop', 'evaluator-optimizer', 'prompt chaining', 'LangGraph workflow'. Designs the control flow around an LLM: which workflow pattern to pick (chain, router, parallel, orchestrator-workers, evaluator-optimizer, autonomous agent), how to bound loops, and where to put human checkpoints. Do NOT use for: multi-agent topology choices (ai/multi-agent-systems), the internals of a single agent loop (ai/ai-agents/core-architectures), or tool schema design (ai/ai-agents/tool-calling-principles).
Install
npx vskill@latest install j4flmao/agent-skills/agentic-workflowsSKILL.md
Agentic Workflows
Purpose
Choose and implement the simplest control flow that solves the task reliably. Most production "agents" are workflows: predefined code paths that call an LLM at specific steps. Reserve open-ended autonomous loops for tasks whose number of steps cannot be known in advance, and always bound them with step limits, budgets, and checkpoints.
Agent Protocol
Trigger
"agentic workflow", "agent loop", "ReAct", "plan-and-execute", "planner/executor", "reflection", "evaluator-optimizer", "prompt chaining", "routing", "orchestrator-workers", "LangGraph".
Input Context
- The task, its success criterion, and whether the step sequence is known up front.
- Available tools and which ones mutate state (writes, payments, deploys).
- Latency and cost budget per run; acceptable failure rate.
- Framework constraints (plain SDK, LangGraph, other).
Output Artifact
A workflow design: pattern choice with rationale, state schema, node/step list, loop bounds, HITL points, and eval plan. Code only if requested.
Response Format
Completion Criteria
- [ ] Simplest viable pattern chosen and justified.
- [ ] Every loop has a hard iteration cap and a budget.
- [ ] State-mutating tools gated by approval or dry-run.
- [ ] Typed state schema, not raw message history only.
- [ ] Offline eval set defined before tuning prompts.
Pattern Decision Tree
| Pattern | Latency | Cost | Predictability | Typical use | |
|---|---|---|---|---|---|
| Prompt chain | Sum of steps | Low | High | Draft → translate → format | |
| Router | 1 extra call | Low | High | Support ticket triage | |
| Parallel (voting) | Max of branches | N× | High | Moderation with majority vote | |
| Orchestrator-workers | Variable | Medium | Medium | Multi-file code change | |
| Evaluator-optimizer | k × (gen + eval) | Medium | Medium | Translation, constrained writing | |
| Autonomous agent | Unbounded unless capped | High | Low | Coding agents, research |
Core Loops
ReAct
Interleave reasoning and tool use: the model decides an action, the harness executes it, the observation is appended, repeat until the model returns a final answer. With native tool calling, "Thought/Action/Observation" text parsing is unnecessary: the API returns structured tool-call blocks.
Plan-and-Execute
A planner produces an explicit step list; an executor runs each step (often a small ReAct loop); a re-planner revises the remaining plan after each step. Better on long tasks because the plan is persisted state, not something the model must remember. Re-planning is mandatory: a static plan breaks on the first surprise.
Evaluator-Optimizer (Reflection)
Generator produces output; evaluator scores it against explicit criteria and returns actionable feedback; loop until pass or cap. Reflection without an external signal (tests, schema validation, retrieval check) often just rephrases the same mistake, so prefer evaluators grounded in execution results.
Implementation (LangGraph)
call_llm, run_checks, publish, and escalate_to_human are your application functions. Use a durable checkpointer (Postgres/SQLite saver) in production so interrupted runs survive restarts.
Bounding Autonomous Loops
- Hard caps: max steps, max tokens, max wall-clock, max USD per run. Abort with a clear error, never silently truncate.
- Loop detection: hash (tool, args) pairs; if the same call repeats with the same result, inject "this failed before, change strategy" or stop.
- Progress signal: require each iteration to change state (new file, new fact, test count); stop on N iterations without progress.
- Context management: summarize or drop stale observations; keep the plan, constraints, and latest results verbatim.
- Idempotent tools: retries after timeouts must not double-apply side effects.
Anti-Patterns
| Anti-pattern | Symptom | Fix | |
|---|---|---|---|
| Agent where a chain suffices | Slow, flaky, expensive | Hard-code the known steps | |
| Unbounded loop | Runaway cost, repeated identical calls | Caps + loop detection | |
| Self-critique with no ground truth | "Improved" output with the same bug | Evaluate with tests/validators | |
| Plan never revised | Executor follows obsolete steps | Re-plan after every step | |
| All state in chat history | Lost constraints after summarization | Typed state fields | |
| Destructive tool without checkpoint | Irreversible mistakes | interrupt_before / approval step |
Checklist
- [ ] Pattern chosen from the decision tree; simpler options ruled out explicitly.
- [ ] Typed state with the fields each step reads and writes.
- [ ] Caps: steps, tokens, time, cost.
- [ ] Deterministic validators run before any LLM judge.
- [ ] HITL before irreversible actions; durable checkpointer.
- [ ] Traces captured per step (inputs, outputs, tool calls, cost).
- [ ] Offline eval set with pass/fail metric, run on every prompt change.
References
- Yao et al., "ReAct: Synergizing Reasoning and Acting in Language Models" (ICLR 2023).
- Wang et al., "Plan-and-Solve Prompting" (ACL 2023).
- Anthropic, "Building effective agents" (Dec 2024) — workflow vs agent taxonomy.
- LangGraph documentation: StateGraph, checkpointers, interrupts.
Shared References
Additional reference material for this skill, stored outside its own references/ folder.
../../harness-engineering/agent-legibility/references/agent-optimized-readmes.md— Agent-Optimized READMEs../../harness-engineering/agent-legibility/references/agents-md-design.md— AGENTS.md Design Reference../../harness-engineering/agent-legibility/references/codebase-navigation-hints.md— Codebase Navigation Hints for Agents../../harness-engineering/agent-legibility/references/convention-constraint-files.md— Convention and Constraint Files Reference../../harness-engineering/agent-legibility/references/progressive-context-disclosure.md— Progressive Context Disclosure for Agents../../harness-engineering/agent-legibility/references/repo-native-instructions.md— Repository-Native Instructions Reference../../harness-engineering/agent-legibility/references/structured-documentation.md— Structured Documentation Reference../../harness-engineering/agent-legibility/references/workspace-configuration.md— Workspace Configuration for Coding Agents../../harness-engineering/feedback-loops/references/automated-validation-hooks.md— Automated Validation Hooks../../harness-engineering/feedback-loops/references/continuous-improvement-loops.md— Continuous Improvement Loops for Agents../../harness-engineering/feedback-loops/references/correction-trigger-mechanisms.md— Correction Trigger Mechanisms../../harness-engineering/feedback-loops/references/hitl-checkpoint-design.md— Human-in-the-Loop (HITL) Checkpoint Design../../harness-engineering/feedback-loops/references/implement-verify-fix-cycles.md— Implement-Verify-Fix (IVF) Cycles../../harness-engineering/feedback-loops/references/output-verification-layers.md— Output Verification Layers../../harness-engineering/feedback-loops/references/quality-gate-frameworks.md— Quality Gate Frameworks for Agent Work../../harness-engineering/feedback-loops/references/reflection-patterns.md— Reflection Patterns../../harness-engineering/feedforward-controls/references/anticipatory-error-prevention.md— Anticipatory Error Prevention (Feedforward Controls)
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ai/agentic-workflows/SKILL.md
Popularity
- Repository stars
- 30
- Repository forks
- 1
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/j4flmao/agent-skills/agentic-workflows)