matlab-find-pi-assets
Find and query PI assets using MATLAB's Industrial Communication Toolbox. Two paths: (1) direct PI tag lookup via piclient + tags when user provides a tag name or description (R2022a+), (2) Asset Framework navigation via afclient when user needs element/attribute hierarchy (R2026a+). Use when working with PI AF servers, PI Data Archive tags, asset hierarchies, element templates, attribute lookup, or historical data from OSIsoft PI systems.
npx skills add matlab/matlab-agentic-toolkit --skill matlab-find-pi-assets --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Find and query PI assets using MATLAB's Industrial Communication Toolbox wrappers—either direct tag lookup for PI Data Archive or AF navigation for Asset Framework hierarchies. It supports locating tags or AF elements/attributes and reading historical data when requested.
How it works
- Workflow A: Direct Tag Lookup (R2022a+)
- Identify PI Data Archive server (must ask user; propose discovery and server selection when available).
- Connect with
piObj = piclient('serverName'). - Search for tags with
tagList = tags(piObj, Name='pattern*')using user-provided name/description. - Present results as a table containing a
Tagscolumn; confirm which tag to use. - Read data: for current value use
data = read(piObj, tagName); for historical data with a range usedata = read(piObj, tagName, DateRange=[start end], Interval=..., AggregateFcn=...).
- Workflow B: AF Navigation (R2026a+)
- Identify AF server (must ask user; offer discovery and require confirmation).
- Connect with
afObj = afclient('serverName'). - Clarify database with
listDatabases(afObj)and require user confirmation to select one; connect withselectDatabaseorafclient(..., Database='dbName'). - Find elements using wildcard searches or templates; present results with Name, Template, Description, hierarchy path, and NumChildren; confirm which element to use.
- Get attributes using
getAttributes(elem, 'attributeName*'); if ambiguous, present a table with Name, ElementName, ServerDataType, DefaultUnit, HasTimeSeriesData, Description and ask user to select. - Validate attribute: verify parent element and, if needed, show Path for full hierarchy; warn if there is mismatch. If historical data requested but HasTimeSeriesData is false, offer to read current value instead.
- Read data: for current value use
data = read(attr); for historical data usedata = readHistory(attr, startTime, endTime, Interval=hours(1), AggregateFcn="average"). - Verify that returned data has a valid status (not all Bad or NaN).
When to use it
- You need to locate PI AF elements/attributes or PI Data Archive tags.
- You require asset hierarchies, templates, or attributes lookup, or historical data from PI AF attributes or PI tags.
- You reference PI AF servers, PI Data Archive, OSIsoft PI, AVEVA PI, or asset hierarchies.
What it can touch
piclient,tags,read(Workflow A).afclient,findElementByName,getAttributes,readHistory,read(Workflow B).- Optional:
listDatabases,selectDatabasefor AF navigation; server discovery patterns.
Caveats
- Requires user confirmation for server selection and database choice.
- Historical data retrieval requires HasTimeSeriesData true for attributes; otherwise current value may be read.
- Ambiguity in attributes/elements may require disambiguation via presented tables.
- Files and commands must be used exactly as stated in the tool’s documented functions (e.g.,
piclient,afclient,tags,read,readHistory,getAttributes, etc.).
# PI Asset Identification & Data Query Connect to PI systems, locate assets, and read historical data using MATLAB's Industrial Communication Toolbox wrappers — not raw .NET SDK interop. ## Release Requirements | Workflow | Minimum Release | Functions | |----------|----------------|-----------| | A: PI Data Archive (tag lookup) | R2022a+ | `piclient`, `tags`, `read` (piclient) | | B: PI Asset Framework (AF navigation) | R2026a+ | `afclient`, `findElementByName`, `getAttributes`, `readHistory`, etc. | ## When to Use - User wants to find or query PI Asset Framework elements or attributes - User provides a PI tag name or tag description and wants to look it up - User needs historical data from a PI AF attribute or PI tag - User mentions PI AF server, PI Data Archive, OSIsoft, AVEVA PI, or asset hierarchy - User wants to list elements by template (e.g., "all generation units") ## When NOT to Use - Creating or modifying AF elements/templates (administration) - Real-time streaming, event frames, or notifications - PI Vision or PI Web API access - Writing data back to PI AF or PI Data Archive ## Decision Logic Choose the workflow based on what information the user provides: | User provide
- Release Requirements
- When to Use
- When NOT to Use
- Decision Logic
- Workflow A: Direct Tag Lookup (R2022a+)
- Workflow B: Asset Framework Navigation (R2026a+)
- Key Functions
- Patterns
- Discover Available AF Servers
- Discover Available PI Data Archive Servers
- Direct Tag Lookup by Name
- Read Current Value from PI Tag
- Read Historical Data from PI Tag
- AF Connection with Server and Database Clarification
What does the matlab-find-pi-assets skill do?
Find and query PI assets using MATLAB's Industrial Communication Toolbox. Two paths: (1) direct PI tag lookup via piclient + tags when user provides a tag name or description (R2022a+), (2) Asset Framework navigation via afclient when user needs element/attribute hierarchy (R2026a+). Use when working with PI AF servers, PI Data Archive tags, asset hierarchies, element templates, attribute lookup, or historical data from OSIsoft PI systems.
How do I install it?
Run `npx skills add matlab/matlab-agentic-toolkit --skill matlab-find-pi-assets --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From matlab/matlab-agentic-toolkit, a repository with 868 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
