autoflow-core

autoflow-core is a skill for Claude Code, Codex from lidicn/AutoFlow. It costs 67 tokens per session (2,642 once invoked), scanned A, original, MIT.

A safety-focused skill for reading, writing, changing, and checking Node-RED flows. Node-RED is a tool for connecting devices and services with visual flow diagrams.

In plain words
What is it for?
Inspecting Node-RED flows, creating or updating agent-owned flows, checking their structure, preventing accidental production edits, and verifying that a change was saved correctly.
Why use it?
It protects existing user flows by using snapshots, checks, limited write access, logs, and read-back verification before and after changes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Inspecting Node-RED flows, creating or updating agent-owned flows, checking their structure, preventing accidental production edits, and verifying that a change was saved correctly.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lidicn/autoflow/skill
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add lidicn/AutoFlow --skill skill
Clone the repo
git clone --depth 1 https://github.com/lidicn/AutoFlow

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for autoflow-core

README.md
[![agentmods](https://agentmods.dev/badge/skills/lidicn/autoflow/skill/github.svg)](https://agentmods.dev/skills/lidicn/autoflow/skill)
Your own site
<a href="https://agentmods.dev/skills/lidicn/autoflow/skill"><img src="https://agentmods.dev/badge/skills/lidicn/autoflow/skill/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for autoflow-core

Your own site · 80×15
<a href="https://agentmods.dev/skills/lidicn/autoflow/skill"><img src="https://agentmods.dev/badge/skills/lidicn/autoflow/skill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,642 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.02642
Opus 5.5 $0.00027 $0.01057
Sonnet 5.5 $0.00013 $0.00528
Haiku 4.5 $0.00007 $0.00264

Measured 1mo ago against content hash af6a366d1fb9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

autoflow-core scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/nr_client.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

core/skill/SKILL.md · 190 lines

How it starts

The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AutoFlow Core / Pro(核心版 / 专业版)

你(agent)通过本 skill 获得对 Node-RED 实例的安全编程能力:读取、编写、修改、验证 flow。 所有写入经 scripts/nr_client.py(纯标准库,无 pip 依赖),自带护栏:写前快照、 结构 lint、节点数熔断、prod 闸、操作日志、回读校验。

⭐ 两种模式(优先用 Pro 网关模式)

模式 命令前缀 特点 推荐场景
Pro(网关模式) ★推荐 nr_client.py --gateway ... DSL 优先,省 5-10 倍 token,有编译闸门和快照,对话即部署 99% 日常场景
Core(直连模式) nr_client.py ... 直连 NR 写 JSON,无网关,无编译校验 离线/网关不可用/极端定制

默认用 Pro 网关模式。 只有网关不可用或 DSL 确实表达不了时才用 Core 直连模式。

🚀 Pro 网关模式(首选)

配置

配置文件 ~/.autoflow-core/config.json 增加:

{
  "gateway_url": "http://<gateway-host>:8000",
  "api_key": "af_pro_xxxxxx",
  "agent_id": "my-agent"
}

或环境变量:AF_GATEWAY_URL、AF_API_KEY、AF_AGENT_ID。

标准流程(Pro 模式)

1. --gateway doctor                    # 自检:网关连通性
2. --gateway resolve-entity "书房灯"   # 获取真实 entity_id(写 DSL 前必调)
3. --gateway propose-dsl "触发: 书房人体传感器 on\n动作: light.turn_on(书房灯)"  # ★首选
4. 成功 → 自动部署(授权范围内)
5. 失败 → 看编译错误,改 DSL,重跑步骤 3(上限 3 轮)
6. 不满意 → --gateway snapshots 查看快照,--gateway rollback <id> 回滚

Pro 模式命令

# ★首选:提交 DSL,网关编译+闸门校验,自动部署
nr_client.py --gateway propose-dsl "触发: 传感器 on\n动作: light.turn_on(灯)"
nr_client.py --gateway propose-dsl --dsl-file flow.dsl   # 从文件读 DSL
nr_client.py --gateway propose-dsl "..." --preview        # 仅生成提案,不部署

# ⚠️逃生舱:直接提交 raw JSON(仅在 DSL 表达不了时使用)
nr_client.py --gateway deploy-raw --flow-file flow.json

# 实体查询
nr_client.py --gateway entities --domain light --area 书房
nr_client.py --gateway resolve-entity "书房灯"

# 快照与回滚
nr_client.py --gateway snapshots
nr_client.py --gateway rollback <snapshot_id>

# 自检
nr_client.py --gateway doctor
nr_client.py --gateway version

DSL 语法速查

场景: <名称>
触发: <entity_id> <状态>    # 如 binary_sensor.motion on
条件: <entity_id> <状态>    # 可选,多条件用 AND
动作: <service>(<entity_id>)  # 如 light.turn_on(light.lamp)
动作: <service>(<entity_id>, brightness=80)
延时: <秒数>秒
分支: <条件> → <动作>
否则: <动作>
并行: <动作1> | <动作2>
调用子流程: <子流程名>(参数=值)

写 DSL 前必须先调 resolve-entity 获取真实 entity_id,禁止凭记忆编造。

Read the full file on GitHub · 190 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +76 lines · +12 tokens per session af6a366d1fb9
  2. 1mo ago First seen · 114 lines · 55 tokens per session scan A 714bc083c0de

Subscribe to this mod's changes

autoflow-core is a skill published in the GitHub repository lidicn/AutoFlow (1 stars, last pushed 29d ago), licensed MIT. It adds 67 tokens to every session and 2,642 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.