.agents/skills/bulk-engineering/SKILL.md
Bulk engineering approaches, tools, and implementation strategies for mass-generating PLC/DCS control logic, HMI displays, and I/O configurations from engineering databases. Use when planning or implementing automation of DCS engineering workflows.
npx skillsauth add d-subrahmanyam/deno-fresh-microservices bulk-engineeringInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Typical mid-size plant: 200-500 motors, 100-300 valves, 500-2000 analog loops, 200-1000 discrete I/O. Manual configuration: 15-60 min/instance. Bulk engineering reduces months to days.
[Instrument Index / Motor List / Valve List] (Excel/CSV input)
|
v
[Engineering Database] (SQLite / structured data)
|
v
[Template Library] + [Configuration Rules]
|
v
[Code Generator] (Python + Jinja2 / string replacement)
|
v
[DCS/PLC Project Files] (PRT, XML, FHX, etc.)
|
v
[Validation] (cross-reference check, naming, completeness)
|
v
[Import to DCS Engineering Tool]
| Document | Contains | Used For | |----------|---------|---------| | Instrument Index (I/O List) | Every tag, type, range, units, alarms, P&ID ref | Tag creation, scaling, alarms | | Motor List | Motors with power, starter type, protections, interlocks | Motor block generation | | Valve List | Valves with type, fail position, actuator | Valve block generation | | Control Narrative | Control logic descriptions per unit | Logic implementation | | Cause & Effect Matrix | Safety/interlock logic in tabular form | Interlock logic generation |
0000000000| Element | Template | Replace With |
|---------|----------|-------------|
| Node name | 11301CLWW1A1 | {area}{equip}{num} |
| MSR primary | 11301.CLWW.1A1 | {area}.{prefix}.{num} |
| MSR short | 11301.CW.1A1 | {area}.{short}.{num} |
| Graph ref | g11301CLWW1A1 | g{area}{equip}{num} |
| Description | PHO RCK EXTR CNVR-1 | {description} |
| EAM signals | XA1/XA2/XB1/XL/XS1/XS2 + node | Same prefixes + new node |
Parse full project CSV, add new sections, re-import. More powerful but higher risk.
using Siemens.Engineering;
using Siemens.Engineering.SW;
TiaPortal tia = new TiaPortal(TiaPortalMode.WithUserInterface);
Project project = tia.Projects.Open(new FileInfo(@"Project.ap17"));
PlcSoftware sw = device.GetService<PlcSoftware>();
sw.BlockGroup.Blocks.Import(new FileInfo(@"MotorFB.xml"), ImportOptions.Override);
PlcTagTable table = sw.TagTableGroup.TagTables.Create("Motors");
Rules-based: define rules like "For every MotL FB, create faceplate." Reads PLC structure, auto-generates WinCC displays.
Define module template (class) -> instantiate many -> template changes propagate to all instances.
MODULE TEMPLATE "MT_MOTOR_1SPD" /
MODULE_CLASS = DEVICE /
{
FUNCTION_BLOCK "DC-1" / DEFINITION = "DC" /
{ ATTRIBUTE MODE_BLK.TARGET = AUTO ; ... }
}
Text-based, parseable, generatable with Python.
| Component | Technology | Purpose | |-----------|-----------|---------| | Language | Python 3.10+ | Core automation | | Excel I/O | openpyxl, pandas | Read input spreadsheets | | Templates | Jinja2 / string.Template | Generate output files | | Database | SQLite | Engineering database | | File I/O | codecs (UTF-16) | Read/write Freelance files | | XML | lxml | PLCopen XML, SimaticML | | Validation | pydantic | Data validation | | GUI (opt) | Streamlit / PyQt6 | User interface | | VCS | Git | Version control |
import codecs
import re
import pandas as pd
# Read motor list
motors = pd.read_excel('motor_list.xlsx')
# Read template
with codecs.open('MOT_template.prt', 'r', 'utf-16') as f:
template = f.read()
# Generate for each motor
for _, motor in motors.iterrows():
output = template
output = output.replace('11301CLWW1A1', motor['node_name'])
output = output.replace('11301.CLWW.1A1', motor['msr_name'])
output = output.replace('PHO RCK EXTR CNVR-1', motor['description'])
# ... more replacements
# Reset checksum
output = re.sub(r'\[CHECKSUM\];.*', '[CHECKSUM];0000000000', output)
with codecs.open(f"{motor['node_name']}.prt", 'w', 'utf-16-le') as f:
f.write('\ufeff' + output)
The NAMUR standard for automation engineering tools mandates:
| Tool | Vendor | Description | |------|--------|-------------| | SmartPlant Instrumentation | AVEVA | Central instrument DB, generates DCS configs for all vendors | | COMOS | Siemens | P&ID to PLC code, TIA Portal integration | | Engineering Base | AUCOTEC | Object-oriented, multi-DCS output | | Unity App Generator | Schneider | Excel-based Modicon PLC generation | | Ignition | Inductive Automation | Database-driven SCADA/HMI with Python scripting |
Signal-Centric (Traditional): Start from I/O signals. AI_Card1_Ch3 -> create tag -> configure. Matches hardware but disconnected from equipment.
Asset-Centric (Modern): Start from physical equipment. Pump P-101A includes motor, flow, pressure, vibration, protection. Easier to template. Aligned with ISA-88/95.
| Approach | ABB Freelance | Siemens PCS 7 | Emerson DeltaV | |----------|--------------|---------------|----------------| | Support | Moderate (MSR hierarchy) | Moderate (plant hierarchy) | Strong (class-based) |
development
Guidelines for building high-performance APIs with Fastify and TypeScript, covering validation, Prisma integration, and testing best practices
development
FastAPI modern Python web framework. Covers routing, Pydantic models, dependency injection, and async support. Use when building Python APIs. USE WHEN: user mentions "fastapi", "pydantic", "async python api", "python rest api", asks about "dependency injection python", "python openapi", "python swagger", "async endpoints", "python api validation", "fastapi middleware" DO NOT USE FOR: Django apps - use `django` instead, Flask apps - use `flask` instead, synchronous Python APIs without type hints, GraphQL-only APIs
tools
FastAPI integration testing specialist. Covers synchronous TestClient, async httpx AsyncClient, dependency injection overrides, auth testing (JWT, OAuth2, API keys), WebSocket testing, file uploads, background tasks, middleware testing, and HTTP mocking with respx, responses, and pytest-httpserver. USE WHEN: user mentions "FastAPI test", "TestClient", "httpx async test", "dependency override test", "respx mock", asks about testing FastAPI endpoints, authentication in tests, or HTTP client mocking. DO NOT USE FOR: Django - use `pytest-django`; pytest internals - use `pytest`; Container infrastructure - use `testcontainers-python`
development
Expert in FastAPI Python development with best practices for APIs and async operations