add-dag-node

Scaffold a new DAG node in afi-reactor, wire it into the pipeline, and ensure all types and validators are imported from afi-core while obeying AFI Orchestrator Doctrine and the AFI Droid Charter.

181 stars

Best use case

add-dag-node is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Scaffold a new DAG node in afi-reactor, wire it into the pipeline, and ensure all types and validators are imported from afi-core while obeying AFI Orchestrator Doctrine and the AFI Droid Charter.

Teams using add-dag-node should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/add-dag-node/SKILL.md --create-dirs "https://raw.githubusercontent.com/majiayu000/claude-skill-registry/main/skills/data/add-dag-node/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/add-dag-node/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How add-dag-node Compares

Feature / Agentadd-dag-nodeStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Scaffold a new DAG node in afi-reactor, wire it into the pipeline, and ensure all types and validators are imported from afi-core while obeying AFI Orchestrator Doctrine and the AFI Droid Charter.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Skill: add-dag-node (afi-reactor)

## Purpose

Use this skill when you need to add a **new DAG node** to the AFI Reactor
pipeline, wire it into the existing graph, and keep everything aligned with:

- AFI Droid Charter
- AFI Droid Playbook
- afi-reactor/AGENTS.md
- AFI Orchestrator Doctrine (the "10 Commandments")
- Canonical types and validators from `afi-core`

This skill is primarily used by `dag-builder-droid` and any future reactor droids
that work on the DAG.

---

## Preconditions

Before changing anything, you MUST:

1. Read:
   - `afi-reactor/AGENTS.md`
   - AFI Orchestrator Doctrine file referenced there
   - AFI Droid Charter
   - AFI Droid Playbook

2. Confirm:
   - The requested node belongs in **afi-reactor** (orchestration), not in
     `afi-core` (validators / runtime logic) or `afi-config` (governance).
   - The change does **not** require editing smart contracts, Eliza configs, or
     deployment/infra repos.

If any requirement is unclear or appears to violate Doctrine or AGENTS.md,
STOP and ask for human clarification instead of trying to be clever.

---

## Inputs Expected

The caller should provide, in natural language or structured form:

- Node name (e.g. `NewsSentimentEnricher`, `GreeksScorer`)
- Node purpose:
  - What this node does in one or two sentences
- Lifecycle stage:
  - One of: `Raw`, `Enriched`, `Analyzed`, `Scored`
- Inputs:
  - What data it expects, and from which upstream node(s) or stage(s)
- Outputs:
  - What it emits and which downstream nodes or stage(s) should consume it
- Canonical types / validators:
  - Which types / schemas / validators exist in `afi-core` that should be used,
    if known

If any of this information is missing, ask clarifying questions or produce a
minimal, clearly-labeled stub that's safe to evolve later.

---

## Step-by-Step Instructions

When this skill is invoked, follow this sequence:

### 1. Restate the requested change

In your own words, summarize:

- The node's purpose
- Its lifecycle stage
- Its upstream and downstream relationships

This summary should be short and precise, so humans can quickly confirm the
intent.

---

### 2. Locate the DAG structures

Identify the current DAG layout and relevant files, typically including:

- DAG engine and orchestration code (e.g. `src/core/dag-engine.ts` or similar)
- DAG graph or codex (e.g. `config/dag.codex.json` or similar config files)
- Any codex/metadata that describes nodes and stages (e.g. `codex/*.json`)
- Any existing node patterns in `src/dags/` (or equivalent)

Do **not** modify these yet; just understand how the DAG is currently modeled.

---

### 3. Create the node scaffold

Create a new node file under the appropriate folder, for example:

- `src/dags/<stage>/<nodeName>.ts`  
  or
- `src/dags/<nodeName>.ts`

Follow any existing naming and folder conventions in afi-reactor.

In the new file:

1. Import canonical types / schemas / validators from `afi-core` where needed.
   - Never re-define schemas or validators that already exist in `afi-core`.
2. Export a clearly named function such as:
   - `runNode`, `execute`, or the project's established pattern.
3. Keep implementation minimal:
   - If the logic is not well-specified, stub the body with `TODO` comments and
     clearly throw or return a safe placeholder.
   - Do **not** implement complex business logic unless explicitly requested.

All comments should be clear, referencing:

- The node's purpose
- Its lifecycle stage
- Any assumptions or TODOs

---

### 4. Wire the node into the DAG graph

Update the DAG graph / codex / configuration files so this new node is part of
the pipeline:

1. Register the node with:
   - Unique identifier / key
   - Stage (Raw / Enriched / Analyzed / Scored)
   - Input/output relationships (upstream/downstream nodes)
2. Ensure the wiring respects:
   - No forbidden cycles (unless explicitly allowed by the Doctrine)
   - The existing pipeline architecture and naming conventions
3. If there is a central registry for node metadata, add a minimal entry using
   the existing pattern.

If wiring rules are ambiguous or require architectural changes, STOP and mark
this as a human decision point.

---

### 5. Add minimal tests or runners (optional but recommended)

Where patterns already exist (e.g. in `ops/runner/` or `test/`):

- Add a small integration test or runner stub that:
  - Constructs a minimal signal or input
  - Passes it through the new node
  - Asserts basic shape/flow (not business outcomes)
- Do not introduce new test frameworks or heavy dependencies.

If no test patterns exist yet, leave a clearly marked TODO and surface this
in your summary.

---

### 6. Validate and build

Run at least:

- `npm run build` in `afi-reactor`

If relevant quick tests exist and are safe to run:

- `npm test` (or the closest equivalent)

Do not mark the skill as "successful" if the build fails. Instead, stop, gather
error output, and surface it with minimal, clear commentary.

---

## Hard Boundaries

When using this skill, you MUST NOT:

- Create or modify validators or schemas in `afi-reactor`.
  - Those belong in `afi-core` or `afi-config`.
- Duplicate or move canonical logic from `afi-core` into `afi-reactor`.
- Modify any other repos (`afi-token`, `afi-config`, `afi-ops`, `afi-infra`, etc.).
- Introduce new external services, queues, or transports.
- Perform large, sweeping refactors of the DAG architecture without explicit
  human approval.
- Change tokenomics, emissions, or smart contracts.

If a request forces you towards any of the above, STOP and escalate.

---

## Output / Summary Format

At the end of a successful `add-dag-node` operation, produce a short summary
that includes:

- Node name and stage
- Files created
- Files modified (graph/config/metadata)
- Any new tests or runners added
- Any TODOs or open questions that must be resolved by a human

Aim for something a human maintainer can read in under a minute to understand
exactly what changed and why.

---

## Example Usage Patterns

You should use this skill for requests like:

- "Add a new Raw-stage node that normalizes exchange metadata before enrichment."
- "Insert a News Sentiment Enricher node between the Enriched and Analyzed stages."
- "Wire an existing afi-core validator into a Scored-stage node that computes
  a composite score."

You should NOT use this skill for:

- Changing how PoI/PoInsight are defined at the validator/agent level.
- Modifying Eliza agents, character specs, or AFI gateway behavior.
- Editing or deploying smart contracts.

Related Skills

admin-infra-linode

181
from majiayu000/claude-skill-registry

Deploys infrastructure on Linode (Akamai Cloud) with Linodes, Firewalls, and VLANs. Strong Kubernetes support with Cluster Autoscaler and Akamai edge network integration. Use when: setting up Linode/Akamai infrastructure, deploying Linodes, configuring firewalls, needing Kubernetes autoscaling, wanting Akamai CDN integration. Keywords: linode, akamai, linode-cli, VPS, dedicated CPU, firewall, VLAN, kubernetes autoscale, infrastructure

add-nodebridge-handler

181
from majiayu000/claude-skill-registry

Use this skill when adding a new NodeBridge handler to src/nodeBridge.ts, including updating types in src/nodeBridge.types.ts and optionally testing with scripts/test-nodebridge.ts

add-node

181
from majiayu000/claude-skill-registry

Add a new node to the Kubernetes cluster. Use when connecting new hardware, expanding cluster capacity, or setting up worker nodes.

Backend Node.js Expert

181
from majiayu000/claude-skill-registry

专注于 Node.js 后端开发模式与最佳实践。

lets-go-rss

159
from majiayu000/claude-skill-registry

A lightweight, full-platform RSS subscription manager that aggregates content from YouTube, Vimeo, Behance, Twitter/X, and Chinese platforms like Bilibili, Weibo, and Douyin, featuring deduplication and AI smart classification.

Content & Documentation

chrome-debug

159
from majiayu000/claude-skill-registry

This skill empowers AI agents to debug web applications and inspect browser behavior using the Chrome DevTools Protocol (CDP), offering both collaborative (headful) and automated (headless) modes.

Coding & DevelopmentClaude

whisper-transcribe

159
from majiayu000/claude-skill-registry

Transcribes audio and video files to text using OpenAI's Whisper CLI, enhanced with contextual grounding from local markdown files for improved accuracy.

Media Processing

vly-money

159
from majiayu000/claude-skill-registry

Generate crypto payment links for supported tokens and networks, manage access to X402 payment-protected content, and provide direct access to the vly.money wallet interface.

Fintech & CryptoClaude

ontopo

159
from majiayu000/claude-skill-registry

An AI agent skill to search for Israeli restaurants, check table availability, view menus, and retrieve booking links via the Ontopo platform, acting as an unofficial interface to its data.

General Utilities

astro

159
from majiayu000/claude-skill-registry

This skill provides essential Astro framework patterns, focusing on server-side rendering (SSR), static site generation (SSG), middleware, and TypeScript best practices. It helps AI agents implement secure authentication, manage API routes, and debug rendering behaviors within Astro projects.

Coding & Development

grail-miner

159
from majiayu000/claude-skill-registry

This skill assists in setting up, managing, and optimizing Grail miners on Bittensor Subnet 81, handling tasks like environment configuration, R2 storage, model checkpoint management, and performance tuning.

DevOps & Infrastructure

tech-blog

159
from majiayu000/claude-skill-registry

Generates comprehensive technical blog posts, offering detailed explanations of system internals, architecture, and implementation, either through source code analysis or document-driven research.

Content & DocumentationClaude