能力标签
⚙️
Agent工作流

PLC代码审查

基于 TypeScript · 无代码搭建完整 AI 自动化流程
英文名:plc-st-review
⭐ 10 Stars 💻 TypeScript 📄 MIT 🏷 AI 8.5分
8.5AI 综合评分
代码审查CITypeScriptIEC 61131-3
✦ AI Skill Hub 推荐

经 AI Skill Hub 精选评估,PLC代码审查 获评「强烈推荐」。这款Agent工作流在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.5 分,适合有一定技术背景的用户使用。

📚 深度解析

PLC代码审查 是一套完整的 AI Agent 自动化工作流方案。随着 AI 能力的不断提升,基于 Agent 的自动化工作流正在成为提升个人和团队效率的核心方式。区别于传统的 RPA 自动化(模拟鼠标键盘操作),AI Agent 工作流通过理解任务意图、动态规划执行路径,能够处理更复杂的非结构化任务。

PLC代码审查 工作流的设计遵循"最小配置,最大复用"原则:核心逻辑已经封装好,用户只需配置自己的 API Key 和业务参数即可快速上手。工作流内置错误处理和重试机制,在网络波动或 API 限速等情况下仍能稳定运行,适合作为生产环境的自动化基础设施。

在实际部署时,建议先在测试环境中运行 3-5 次,验证各个环节的输出结果符合预期,再部署到生产环境。AI Skill Hub 评分 8.5 分,是同类 Agent 工作流中的精选推荐。

📋 工具概览

自动化IEC 61131-3结构化文本代码审查

PLC代码审查 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。

GitHub Stars
⭐ 10
开发语言
TypeScript
支持平台
Windows / macOS / Linux
维护状态
轻量级项目,按需更新
开源协议
MIT
AI 综合评分
8.5 分
工具类型
Agent工作流
Forks

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

自动化IEC 61131-3结构化文本代码审查

PLC代码审查 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。

📌 核心特色
  • 可视化 Agent 工作流编排,无需编写复杂代码
  • 支持多步骤自动化任务链,实现全流程无人值守
  • 与外部 API、数据库和第三方服务无缝集成
  • 内置错误处理与自动重试机制,保障稳定运行
  • 提供可复用的自动化模板,快速在同类场景部署
🎯 主要使用场景
  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:npm 全局安装
npm install -g plc-st-review

# 方式二:npx 直接运行(无需安装)
npx plc-st-review --help

# 方式三:项目依赖安装
npm install plc-st-review

# 方式四:从源码运行
git clone https://github.com/HeytalePazguato/plc-st-review
cd plc-st-review
npm install
npm start
📋 安装步骤说明
  1. 访问 GitHub 仓库获取工作流文件
  2. 在对应平台(Dify / Flowise / Make 等)中找到「导入工作流」功能
  3. 上传工作流文件
  4. 按照提示配置必要的环境变量和 API Key
  5. 运行测试确认流程正常后投入使用
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 命令行使用
plc-st-review --help

# 基本用法
plc-st-review [options] <input>

# Node.js 代码中使用
const plc_st_review = require('plc-st-review');

const result = await plc_st_review.run(options);
console.log(result);
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
# plc-st-review 配置说明
# 查看配置选项
plc-st-review --config-example > config.yml

# 常见配置项
# output_dir: ./output
# log_level: info
# workers: 4

# 环境变量(覆盖配置文件)
export PLC_ST_REVIEW_CONFIG="/path/to/config.yml"
📑 README 深度解析 真实文档 完整度 69/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

plc-st-review

Version CI License Node Docs Container Checks

A semantic linter, code reviewer, and team-style enforcer for IEC 61131-3 Structured Text, built for CI on PLC codebases that can't be compiled outside the vendor IDE. Parses .st files with the tree-sitter-iec61131-3-st grammar and reports semantic problems, not textual diffs.

plc-st-review runs in three modes, each backed by the same 80-check engine:

  • Static linter (--lint src/**/*.st), run on every push. 59 single-revision checks for ST bugs: division by zero, out-of-range array indices, infinite loops, TON/CTU/R_TRIG misuse, output reads, unused vars, naming-convention drift, forbidden_symbols, the full PLCopen-aligned set (forbidden statements, IF without ELSE, direct-address use, pointer arithmetic, parameter/global caps, …), an IEC 62443 cybersecurity set (hard-coded credentials / endpoints, unvalidated input, debug pragmas, persistent plaintext secrets), and more.
  • PR / MR reviewer (GitHub Action or GitLab CI job), posts inline review comments on lines that triggered findings. Adds 21 diff-based checks that compare the PR against its base: signature drift, outdated call sites, enum removals, timer-value changes, EXTENDS swaps, pragmas, SAFETY_* constant changes, and metric regressions (complexity, nesting, LOC growth). With --project-scope it also flags newly added POUs that nothing in the repo calls.
  • Team-style enforcer: drop a .plc-st-review.yml in the repo root listing your naming_conventions (prefix / suffix / pattern per declaration kind) and forbidden_symbols. Both modes pick it up automatically.

Catches the bugs reviewers miss on visual scan:

  • A TON.PT changed from T#5s to T#500ms (10× faster).
  • A function block grew a required input but only some call sites updated.
  • A CASE on an enum that gained a value but no ELSE branch.
  • A global variable's type silently changed and the readers are now broken.
  • A constant whose name starts with SAFETY_ had its value changed.

Building from source

npm install

That's the whole setup. The parser ships as WebAssembly: web-tree-sitter boots the tree-sitter runtime and loads the grammar's tree-sitter-iec61131_3_st.wasm (published inside the tree-sitter-iec61131-3-st package). There's no native addon to compile, so no C++ toolchain, no node-gyp, and no platform-specific prerequisites — npm install runs the same on Windows, Linux, and macOS, on any supported Node version.

Quick start

PLCopen Coding Guidelines preset

The repo ships one opinionated preset: presets/plcopen.yml, tuned to PLCopen Coding Guidelines v1.0. Vendor-neutral, standards-body-published — use it as your baseline if your team doesn't already have a style guide:

```yaml

Configuration

Create .plc-st-review.yml at the repo root:

case_sensitive: false          # identifier casing rules; see "Case sensitivity" below

disabled_checks:
  - COMMENT_ONLY

severity_overrides:
  TIMER_VALUE_CHANGED: error   # all timer changes block merge

ignore_paths:
  - "deprecated/**"
  - "third_party/**"

safety_critical_prefixes:
  - SAFETY_
  - INTERLOCK_
  - SIL_

reporting:
  fail_on_severity: error      # exit-nonzero threshold
  comment_style: inline        # inline | summary | both (GitLab/GitHub)

metrics:                       # bands for the metric-regression checks
  thresholds:
    cyclomatic_complexity:
      warn: 15
      error: 25
    nesting_depth:
      warn: 5
      error: 8

parsing:
  max_file_size_bytes: 1000000  # per-file size cap; see "Source-size cap" below

limits:                        # numeric caps for the size-/count-checking PLCopen rules
  max_identifier_length: 32    # PLCopen N6 — drives IDENTIFIER_TOO_LONG (null = off)
  max_globals_used_per_pou: 10 # PLCopen CP18 — drives TOO_MANY_GLOBALS_USED (null = off)
  max_parameters: 8            # PLCopen CP23 — drives TOO_MANY_PARAMETERS (null = off)

identifier_charset: null       # PLCopen N8 — regex every identifier must match; null = off
                               # e.g. '^[A-Za-z_][A-Za-z0-9_]*$' restricts to ASCII + underscore

The metrics block is optional; the values shown are the defaults. COMPLEXITY_INCREASED and NESTING_INCREASED read these bands; LOC_SPIKE fires on any single-PR growth over 50%. See docs/checks-reference.md for the full block (the lines_of_code, comment_ratio, and fan_out keys are accepted now and consumed by the upcoming standalone --metrics mode).

Layer your own preferences on top.

naming_conventions: bool: { prefix: b } # we use b, not PLCopen's x ```

The full rule-by-rule mapping (which PLCopen rules the preset enforces, which would need new checks, which are out of scope) is on the Pages site under Presets → PLCopen Coding Guidelines.

.github/workflows/lint.yml, same idea on GitHub

name: lint on: [push] jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: npx plc-st-review --lint "src/**/*.st" ```

--lint accepts file paths, directories, or globs (*, **, mixed). It parses each .st file in isolation and runs the 59 single-revision checks: the 21 diff-based ones are auto-disabled because there's no "before" state. Exit code is non-zero when any finding meets reporting.fail_on_severity (default error), so the job fails the pipeline on real bugs.

Diff-based (compare before vs after)

CategoryDefault severityTrigger
SIGNATURE_CHANGEDwarn (error on breaking)A POU's inputs/outputs/in-outs changed.
CALL_SITE_OUTDATEDerrorA caller doesn't pass a required argument the callee now requires, or passes an unknown argument.
TYPE_MISMATCHerrorA VAR_GLOBAL's declared type changed between revisions.
ENUM_VALUE_REMOVEDerrorA CASE statement references an enum value that was removed.
ENUM_VALUE_ADDEDwarnAn enum gained a value but a CASE on the enum has no matching branch and no ELSE.
TIMER_VALUE_CHANGEDinfo/warn/error by ratioTON/TOF/TP PT changed; severity scales with the change magnitude (≥2× = warn, ≥10× = error).
CONSTANT_VALUE_CHANGEDinfo (warn for safety-prefixed names)A VAR_GLOBAL CONSTANT's initial value changed. Prefixes like SAFETY_, INTERLOCK_, SIL_ elevate severity.
COMMENT_ONLYinfoThe AST is structurally identical between revisions; only comments/whitespace changed.
ARRAY_BOUNDS_CHANGEDerror (shrink) / warn (grow)An array declaration's [lower..upper] bounds changed.
LOOP_BOUNDS_CHANGEDinfo/warn by ratioA FOR loop's bounds changed; severity rises when the iteration count moves ≥10×.
POU_DELETEDerror (with callers) / warnA POU was deleted; severity depends on whether call sites in the new revision still reference it.
POU_RENAMEDinfoHeuristic: a POU was deleted and another with an identical signature was added; suggests a rename.
METHOD_ADDED_TO_INTERFACEerrorAn INTERFACE gained a method but a FUNCTION_BLOCK that IMPLEMENTS it doesn't have one.
INHERITANCE_CHANGEDwarnAn EXTENDS clause was added, removed, or changed.
PRAGMA_CHANGEDinfoThe set of pragmas in a file changed (added or removed).
UNUSED_VAR_INTRODUCEDinfoA new local variable was declared but isn't referenced in its scope.
COUNTER_VALUE_CHANGEDinfo / warn / error by ratioCTU/CTD/CTUD PV changed; severity scales with the change magnitude.
COMPLEXITY_INCREASEDwarn (error on crossing threshold)A POU's cyclomatic complexity rose by more than 5, or crossed the configured error threshold.
NESTING_INCREASEDwarn (error on crossing threshold)A POU's max control-structure nesting depth rose beyond the configured warn threshold.
LOC_SPIKEinfoA POU's lines of code grew by more than 50% in a single PR.
DEAD_POU_INTRODUCEDinfoA newly added FUNCTION/FUNCTION_BLOCK that nothing in the project calls. Needs [--project-scope](docs/project-scope.md).
🎯 aiskill88 AI 点评 A 级 2026-06-09

高质量的自动化代码审查工具

⚡ 核心功能

👥 适合人群

自动化工程师和运维人员项目经理和业务分析师希望减少重复性工作的专业人士数字化转型团队

🎯 使用场景

  • 自动化日常重复性工作,将精力集中于创造性任务
  • 构建数据采集 → 处理 → 输出的完整自动化管线
  • 实现跨平台、跨系统的数据流转和业务协同

⚖️ 优点与不足

✅ 优点
  • +MIT 协议,可免费商用
  • +大幅减少重复性人工操作
  • +可视化流程,清晰直观
  • +可扩展性强,支持复杂场景
⚠️ 不足
  • 初始配置和调试需投入一定时间
  • 强依赖外部服务的稳定性
  • 复杂场景需具备一定技术基础
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。

🔗 相关工具推荐

🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

IEC 61131-3是一种用于编程语言的国际标准
💡 AI Skill Hub 点评

AI Skill Hub 点评:PLC代码审查 的核心功能完整,质量优秀。对于自动化工程师和运维人员来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ MIT 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 PLC代码审查
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 plc-st-review
Topics 代码审查CITypeScriptIEC 61131-3
GitHub https://github.com/HeytalePazguato/plc-st-review
License MIT
语言 TypeScript
🔗 原始来源
🐙 GitHub 仓库  https://github.com/HeytalePazguato/plc-st-review 🌐 官方网站  https://heytalepazguato.github.io/plc-st-review/

收录时间:2026-06-09 · 更新时间:2026-06-09 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。