Agent skill · Data & Analytics

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.

matlabgithub.com/matlabGitHub ↗
claude-codecodexcopilotNOASSERTION
Install
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.

Facts
Files in the skill folder: 3
SKILL.md size: 24 KB
Bundled scripts: none
Version: 1.0
Declared author: MathWorks
Path: skills-catalog/test-and-measurement/matlab-find-pi-assets/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 868
Language: MATLAB

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

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 Tags column; confirm which tag to use.
    • Read data: for current value use data = read(piObj, tagName); for historical data with a range use data = 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 with selectDatabase or afclient(..., 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 use data = 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, selectDatabase for 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.).
From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Release Requirements
  2. When to Use
  3. When NOT to Use
  4. Decision Logic
  5. Workflow A: Direct Tag Lookup (R2022a+)
  6. Workflow B: Asset Framework Navigation (R2026a+)
  7. Key Functions
  8. Patterns
  9. Discover Available AF Servers
  10. Discover Available PI Data Archive Servers
  11. Direct Tag Lookup by Name
  12. Read Current Value from PI Tag
  13. Read Historical Data from PI Tag
  14. AF Connection with Server and Database Clarification
Ships with 2 files
  • manifest.yaml
  • references/key-functions.md
More from matlab-agentic-toolkit
All skills →
About this skill
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.

Keep going