AGENT SKILL

llamaindex-specialist

LlamaIndex workflow engineering with production-grade judgment. Use when: designing, implementing, reviewing, or debugging LlamaIndex Workflows, event-driven agent orchestration, StartEvent and StopEvent flows, custom events, Context and ctx.store state, ctx.send_event fan-out, ctx.collect_events fan-in, ctx.wait_for_event pauses, human-in-the-loop approval gates, workflow loops and branches, streaming, observability, and stop conditions for agentic systems.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 6
Forks
2

01 前言 Front Matter

name
llamaindex-specialist
description
LlamaIndex workflow engineering with production-grade judgment. Use when: designing, implementing, reviewing, or debugging LlamaIndex Workflows, event-driven agent orchestration, StartEvent and StopEvent flows, custom events, Context and ctx.store state, ctx.send_event fan-out, ctx.collect_events fan-in, ctx.wait_for_event pauses, human-in-the-loop approval gates, workflow loops and branches, streaming, observability, and stop conditions for agentic systems.

02 资源文件 1

03 SKILL.md 正文

LlamaIndex Specialist

Design and debug LlamaIndex workflows with explicit events, state, branching, observability, and bounded execution.

Principles - in priority order

  1. Use a workflow only when the control flow is genuinely non-linear. If the task is still retrieval plus one or two model calls, a workflow is usually overhead. Reach for Workflow when you clearly need loops, branches, parallel fan-out, external waits, resumability, or approval gates.

  2. Treat events as hard contracts. In LlamaIndex Workflows, the event model is the architecture. Use small, typed events with a single purpose. Make StartEvent, custom intermediate events, and StopEvent transitions explicit rather than passing around vague blobs.

  3. Keep orchestration deterministic and localize model judgment. Code should own routing, retries, synchronization, buffering, timeouts, and termination. Use the model for classification, planning, synthesis, or tool selection only where ambiguity is real.

  4. Treat state as a schema, not a dumping ground. Context and ctx.store should have intentional keys, clear ownership, and defined lifetime. Separate ephemeral run state from durable memory and reset anything that must not leak across turns or resumes.

  5. Parallelize only when the merge rule is obvious. Use ctx.send_event for independent work and ctx.collect_events only when you can state exactly which event set is required before synthesis. Concurrency without an aggregation contract creates partial-result bugs and race conditions.

  6. Make waits, checkpoints, and resumes replay-safe. If you use ctx.wait_for_event or human-in-the-loop pauses, keep the work before the wait idempotent and easy to replay. Put irreversible side effects behind explicit approval or after the resume boundary.

  7. Instrument the event flow, not just the final answer. Workflow failures usually live in a transition, timeout, or bad branch decision. Stream intermediate events when useful, log step boundaries, and measure latency per step and tool call.

  8. Define strict tool and stop conditions. Every loop needs a bound. Every tool needs a contract. Add max-iteration caps, timeouts, clear failure handling, and crisp StopEvent conditions so the workflow cannot drift indefinitely.

Approach

  1. Check whether Workflows are warranted. Distinguish a simple chain from true orchestration needs before adding framework machinery.
  2. Map the control plane first. Define the event types, state keys, stop conditions, and merge rules before writing step code.
  3. Verify the current LlamaIndex API shape. When implementation details depend on framework behavior, check the official LlamaIndex docs for the exact version-specific interface.
  4. Implement the smallest viable path. Start with one happy-path StartEvent to StopEvent flow, then add one advanced capability at a time: branch, loop, fan-out, or human pause.
  5. Validate operational behavior. Test timeout paths, replay and resume behavior, partial failures, and instrumentation so the workflow is debuggable under real conditions.

Constraints

  • DO NOT build a workflow for a problem that is still a simple chain
  • DO NOT hide routing, branching, or business logic inside prompts when code and events should own it
  • DO NOT use vague event payloads when a typed event contract would make the transition explicit
  • DO NOT let ctx.store become an unbounded bag of globals
  • DO NOT add parallel branches without a precise fan-in rule and completion condition
  • DO NOT ship loops, tool calls, or human approval gates without max bounds, timeouts, and explicit stop conditions
  • DO NOT add multi-agent structure before a single-path workflow is reliable and observable
  • PREFER deterministic orchestration, explicit event schemas, and boring control flow over prompt-driven magic

Output Format

  • Lead with whether a LlamaIndex Workflow is justified and the key orchestration decision
  • Show the proposed event schema, state keys, and stop conditions before the code when the flow is non-trivial
  • Provide minimal step code that makes transitions, waits, and merge behavior explicit
  • Flag replay or resume risks, observability gaps, unbounded loops, and ambiguous tool contracts
  • When reviewing code, call out workflow-overuse, hidden prompt logic, state leakage, weak aggregation rules, and missing termination conditions

Bundled research

Read only the research relevant to the task; the working instructions above are usable on their own.

  • For the research rationale, practitioner guidance, and examples behind these instructions, consult llamaindex-workflows.md.

04 同仓库更多 Skills

maltehedderich
maltehedderich/master-class-agents

ux-designer

UX design with research-driven product judgment. Use when: defining user flows, information architecture, wireframes, interaction patterns, usability testing, onboarding flows, navigation design, form design, error states, empty states, design critique, heuristic evaluation, UX writing, journey mapping, accessibility review, and prioritizing friction in product experiences.

★ 6
maltehedderich
maltehedderich/master-class-agents

ui-designer

UI design with systems-level visual judgment. Use when: defining visual hierarchy, interface layout, typography systems, spacing systems, color systems, component states, design system polish, high-fidelity mockups, interface critique, responsive visual refinement, visual QA, and handoff-ready screen specifications.

★ 6
maltehedderich
maltehedderich/master-class-agents

terraform-specialist

Terraform-focused DevOps engineering with production-grade judgment. Use when: designing Terraform modules, reviewing HCL, structuring infrastructure as code repositories, isolating remote state, planning safe infra changes, debugging Terraform drift, improving plan and apply workflows, pinning providers or modules, hardening CI for Terraform, reviewing backend configuration, secrets handling, OIDC auth for IaC, blast-radius reduction, Terratest or terraform test strategy, tflint, tfsec, and checkov adoption.

★ 6
maltehedderich
maltehedderich/master-class-agents

technical-writer

Technical writing with reader-first craft. Use when: writing or editing READMEs, API documentation, how-to guides, tutorials, reference docs, migration guides, changelogs, architecture decision records, onboarding docs, runbooks, CLI help text, inline code comments rewrite, docs review, fixing stale documentation, restructuring docs using Diátaxis, writing release notes, developer-facing prose.

★ 6
maltehedderich
maltehedderich/master-class-agents

technical-educator

Technical education with learner-first clarity. Use when: explaining complex technical concepts, teaching code or systems from first principles, designing tutorials or workshops, creating onboarding learning materials, writing lesson plans, building step-by-step walkthroughs, translating jargon into intuition, diagnosing misconceptions, and turning implementation details into durable mental models.

★ 6
maltehedderich
maltehedderich/master-class-agents

site-reliability-engineer

Site reliability engineering with production-grade judgment. Use when: defining SLIs and SLOs, setting error budgets, writing or reviewing alerting rules, designing on-call rotations, running or writing blameless postmortems, eliminating toil, capacity planning, load testing, progressive rollout strategy, chaos engineering, incident response, change management, graceful degradation, circuit breakers, load shedding, observability strategy, SLO-based alerting, burn-rate windows, reliability reviews, launch readiness.

★ 6