epics-database

Generate EPICS IOC database definitions with templates and macro-based substitutions.

1|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/BCDA-APS/opencode-skills --skill epics-database
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: epics-database
Source: https://github.com/BCDA-APS/opencode-skills/tree/main/epics-database
Command: npx skills add https://github.com/BCDA-APS/opencode-skills --skill epics-database

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing EPICS IOC database files by hand is error-prone, especially when you need consistent record links, macros, templates, and substitution-driven reuse across many devices.

Core Features & Use Cases

  • Write EPICS database (.db) record instances: create records, populate common fields, and set type-specific fields for standard record types (ai/ao/bi/bo, mbbi/mbbo, calc/calcout, waveform/aSub/aai/aao, seq/fanout/dfanout, and more).
  • Create reusable templates (.template): parameterize record content using $(MACRO) / ${MACRO} so the same database structure can instantiate many devices.
  • Instantiate templates with substitution files (.substitutions): generate many record sets using either pattern-style rows or simple per-line macro maps.
  • Get link syntax right: correctly form INP/OUT/FLNK-style links using modifiers like CPP, CP, MS, NMS, and handle constant and JSON links; also support INST_IO and VME-style address strings.

Quick Start

Ask: "Using the epics-database skill, generate a small IOC database with a template and substitutions that create three devices (P=BL1:, M=ch1..ch3) with one ai record and one calc record that scales the ai value."

Frequently Asked Questions about epics-database

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate EPICS IOC database files without manual syntax errors?

To generate EPICS IOC database files without errors, use automated generation for record instances, parameterized templates, and macro-based substitutions to ensure valid DB syntax and correct field configuration.

What is the correct syntax for EPICS record links using INP, OUT, and FLNK modifiers?

Correct EPICS record link syntax requires applying specific modifiers like CPP, CP, MS, and NMS to INP, OUT, and FLNK fields to establish proper processing chains and handle constant links safely.

How do I create reusable EPICS templates with macro substitutions for multiple devices?

Create reusable EPICS templates by parameterizing record content using $(MACRO) or ${MACRO} syntax, then instantiate multiple device configurations using pattern-style rows or per-line macro maps in substitution files.

Can I use substitution files to generate multiple EPICS waveform and ai records at once?

Yes, you can use substitution files to generate multiple EPICS waveform, ai, and ao records at once by defining a parameterized template and applying macro expansion rules across pattern-style data rows.

What is the best way to configure alarm and scan fields in an EPICS database?

The best way to configure alarm and scan fields in an EPICS database is through automated generation tools that ensure consistent field population and valid syntax across standard record types like bi, bo, and calc.

Why does my EPICS database break when expanding macros across different device channels?

EPICS database macro expansion fails when substitution file formats are inconsistent or when macro names mismatch between the template and substitution definitions, requiring strict adherence to supported substitution rules.