Skip to content
Back to skills

Graph Engineering Patterns

ASecurity

Use when building graphs for agent orchestration — code-as-graph (dynamic workflow) or LLM-as-graph (skill + SOP + scripts), with I/O schemas, state management and verifier/planner separation. Triggers on "graph engineering patterns", "code as graph", "llm as graph", "dynamic workflow templates".

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 19, 2026
ai-agentsjavascriptgojavanodegit

Works with

  • cursor
  • cli

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add majinmagros/magros.ai-skills --skill graph-engineering-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Graph Engineering Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Graph Engineering Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majinmagros-graph-engineering-patterns/badge)](https://www.skillsdirectory.com/skills/majinmagros-graph-engineering-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: graph-engineering-patterns
description: Use when building graphs for agent orchestration — code-as-graph (dynamic workflow) or LLM-as-graph (skill + SOP + scripts), with I/O schemas, state management and verifier/planner separation. Triggers on "graph engineering patterns", "code as graph", "llm as graph", "dynamic workflow templates".
metadata:
  origin: AUTORAL
  source_docs:
    - https://www.youtube.com/watch?v=_9OT25ZvrWs (AI Jason video)
    - https://github.com/anthropics/claude-code/tree/main/docs/dynamic-workflow
    - https://docs.anthropic.com/en/docs/claude-code/hooks
  platforms: [claude-code, opencode, cursor, codex, gemini-cli, hermes, openclaw]
  requires_adapters: [hooks, commands]
---

# Graph Engineering Patterns — Templates Unificados

Biblioteca de templates para Graph Engineering em dois modos: **code-as-graph** (dynamic workflow, código executa) + **LLM-as-graph** (skill + SOP + scripts, modelo orquestra). Engines em `scripts/`.

## Quando usar (gatilhos concretos)

- "Graph engineering patterns"
- "Code as graph templates"
- "LLM as graph patterns"
- "Dynamic workflow templates"

## Quando NÃO usar

- Orchestration runtime → use `orchestration` skills
- Basic workflow → use `routines`
- Simple orchestration → use `agent-harness-construction`

## Core: Dual Approach

**1. Code-as-Graph** (`scripts/code-as-graph.js`) — `CodeAsGraph`: nós tipados (`agent`, `script`, `tool`, `decision`, `parallel`, `loop`) com I/O schemas, retries e timeout; arestas com condição; execução em ordem topológica (detecta ciclo); `executeParallel` e `addLoop` inclusos.

```javascript
import { CodeAsGraph } from './scripts/code-as-graph.js';
const g = new CodeAsGraph();
g.addNode('implement', { type: 'agent', config: { task: 'Implement feature' } });
g.addNode('test', { type: 'script', config: { script: 'run-tests.sh' } });
g.addEdge('implement', 'test');
await g.execute({ repo: 'org/repo' });
```

**2. LLM-as-Graph** (`scripts/llm-as-graph.js`) — `LLMAsGraph`: registra skills (triggers + schemas + steps), SOP templates (steps + variables + decision points) e scripts determinísticos; `executeNode` resolve SOP → steps → scripts → valida output contra schema.

**3. State** (`scripts/state-management.js`) — `GraphStateManager`: state por nó + global, schemas I/O por nó, snapshot/restore, persistência JSON (save/load).

**4. Verifier/Planner** (`scripts/verifier-planner.js`) — `VerifierPlanner`: verifiers com severidade (`error`/`warning`/`info`) + planners; `verify()` barra em erro; `plan()` seleciona planner e valida o plano. Verifiers padrão: output-schema, no-hallucination, completeness.

## I/O Schemas (`scripts/io-schemas.js`)

| Schema | Input chave | Output chave |
|---|---|---|
| `agentNode` | `task*` + context/tools/maxTokens | `result*`, `success*`, artifacts, tokensUsed |
| `scriptNode` | `script*` + args/env | `exitCode*`, stdout/stderr, artifacts |
| `decisionNode` | `condition*` + context | `decision*` + reason |
| `parallelNode` | `branches*` (nodeId + input) | `results*` |
| `skillInvocation` | `skill*` + `input*` | result, artifacts, stateChanges |
| `sopExecution` | `sop*` + `variables*` | `steps*`, `finalState*` |

## Templates Prontos (`scripts/templates.js`)

- `shipChange` (code): setup → implement → verify → test → pr
- `dailyTriage` (code): fetch → filter → evaluate → rank → publish + improve
- `shipChangeSOP` (LLM): setup → grill → spec → tickets → implement → verify → pr (com variáveis `scope/plan/repo`)

Files in this skill

  • SKILL.md3.5 KB
  • scripts/code-as-graph.js4.3 KB
  • scripts/io-schemas.js2.9 KB
  • scripts/llm-as-graph.js4.3 KB
  • scripts/state-management.js1.8 KB
  • scripts/templates.js3.3 KB
  • scripts/verifier-planner.js3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…