PluginWorks in Claude CodeCurrent
Idmp plugin
TDengine IDMP plugin with packaged skills for discovery, schema inspection, and safe operational workflows.
0
Try it
See what this would do for you. No sign-up needed.
Install in Claude Code
Run these in Claude Code, in order. The first adds the marketplace, the second installs the plugin.
Step 1
/plugin marketplace add anthropics/claude-plugins-official
Step 2
/plugin install idmp-plugin@claude-plugins-official
Review commands before running them. Promptu never runs code on your machine or pushes changes to your repo.
What's inside
23 skills
- idmp-ai
- idmp-analysis
- idmp-annotation
- idmp-attribute
- idmp-dashboard
- idmp-data
- idmp-datasource
- idmp-element
- idmp-event
- idmp-notification
- idmp-openapi-explorer
- idmp-panel
- idmp-shared
- idmp-template
- idmp-uom
- idmp-user-access
- idmp-workflow-alert-create
- idmp-workflow-alert-debug
- idmp-workflow-analysis-create
- idmp-workflow-asset-bootstrap
- idmp-workflow-data-import-export
- idmp-workflow-datasource-diagnose
- idmp-workflow-panel-build
Security scan
Passed
Promptu's text scan of the files it could read didn't match any known risky patterns. It doesn't run the plugin, and a clean scan doesn't mean the plugin is safe.
Automated pattern check of 24 file(s) found nothing risky. Not a full audit.
Details
## skills/idmp-ai/SKILL.md
---
name: idmp-ai
description: "IDMP AI skill. Use it to confirm AI availability and usable data, inspect chat sessions, generate recommended questions or panels, create analyses or panels from prompts, and decide when `record` should persist the session."
metadata:
author: "TaosData"
version: "0.4.0"
owner_team: "AI"
requires:
bins:
- idmp-cli
cliHelp: "idmp-cli ai --help"
---
# ai
**Read [`../idmp-shared/SKILL.md`](../idmp-shared/SKILL.md) first.**
## What this skill covers
- Prove AI availability, AI-visible data, chat-session visibility, and generation boundaries before claiming success.
- Keep generation grounded in a real element scope and hand off to non-AI workflows when the backend is empty or unavailable.
## Recommended reference
- [`references/ai-read-flows.md`](references/ai-read-flows.md)
## Missing context to resolve first
- AI backend availability.
- Record policy.
- Whether the operator wants availability only, recommendations, a draft object, or a recorded chat.
- The target element scope for recommend or create requests.
- Whether `record:true` is acceptable.
## Constrained live behaviors
- Treat `datasource available list=false` as a hard stop.
- `idmp-cli datasource available list` is the hard availability gate.
- `recommend` can return an empty array.
- `idmp-cli ai anydata list` measures AI-visible data, not chat history.
- `idmp-cli ai chat sessions` is the safest proof that recorded chat is visible.
- `ai recommend create` and `ai recommend create-post` still need `questionType` values from the backend `QuestionType` enum. Use `GENERAL_QUESTION`, `GEN_PANEL_QUESTION`, or `GEN_ANALYSIS_QUESTION`; do not send intuitive aliases such as `PANEL` or `ANALYSIS`.
- Keep the endpoint path in the evidence: `ai recommend create` calls `/api/v1/ai/panels/recommend`, while `ai recommend create-post` calls `/api/v1/ai/prompts/recommend`.
- Recommendation endpoints can return `[]`; classify that as empty output instead of inventing advice.
- If the backend returns a structured error, surface that error verbatim.
- If recommend fails with `Can't parse the value: PANEL to AiGenPromptType`, classify it as a backend contract mismatch instead of datasource or auth unavailability.
- If recorded chat creation complains about an invalid session, retry with `sessionId:null`.
- AI analysis draft creation can time out even when `datasource available list` and `ai anydata list` are healthy; classify `context deadline exceeded` as backend AI/API latency and hand off to structured analysis workflows instead of mutating the request semantics blindly.
## Execution flow
1. Start with `idmp-cli datasource available list` and stop immediately if availability is false.
2. Use `idmp-cli ai anydata list` to prove the AI backend can see usable data instead of assuming data visibility from availability alone.
3. Read `idmp-cli ai chat sessions` before any recorded chat or follow-up AI write so the session state is grounded in a real reread.
4. Use `idmp-cli ai recommend create-post --ack-risk --data` with the final `questionType` locked to `GENERAL_QUESTION`, `GEN_PANEL_QUESTION`, or `GEN_ANALYSIS_QUESTION`, then classify the result as populated, empty, structured failure, or backend contract mismatch.
5. Use `idmp-cli ai create create --ack-risk --data` or `idmp-cli ai create create-post --ack-risk --data` only when a draft object is requested, then prove the response actually contains a generated object before claiming success. If analysis draft creation times out, stop and hand off to the structured analysis workflow instead of claiming AI unavailability.
## Evidence of completion
- Availability is only complete when `datasource available list` and `ai anydata list` agree on the backend state.
- Recommendation work is only complete when the returned array, empty result, or structured error is preserved exactly; do not fabricate advice.
- AI create work is only complete when the response proves a real generated draft or clearly classifies the failure boundary.
## Key commands
1. `idmp-cli datasource available list` to prove the backend is reachable.
2. `idmp-cli ai anydata list` to prove the AI service can see usable data.
3. `idmp-cli ai chat sessions` to inspect visible chat history before new writes.
4. `idmp-cli ai recommend create-post --ack-risk --data '{"elementId":123,"questionType":"GENERAL_QUESTION","async":true}'` for generic prompt suggestions.
5. `idmp-cli ai recommend create-post --ack-risk --data '{"elementId":123,"questionType":"GEN_PANEL_QUESTION","async":true}'` or `...GEN_ANALYSIS_QUESTION...` for panel or analysis-oriented recommendations.
6. `idmp-cli ai create create --ack-risk --data '{"elementId":123,"prompt":"Create a 1-minute average-current analysis","record":true,"deepThinking":false,"deviceDocument":false}'` for analysis drafts.
7. `idmp-cli ai create create-post --ack-risk --data '{"elementId":123,"prompt":"Create a maximum-current trend panel","record":true,"deepThinking":false,"deviceDocument":false}'` for panel drafts.
## Exception paths
- Stop if availability is false; hand off to datasource or asset bootstrap workflows instead of forcing AI generation.
- Keep empty recommendation results separate from backend failures.
- Do not claim a panel or analysis exists unless the response payload proves it and the draft is visible through a follow-up read.
- If create fails, stop and report the backend-unavailable state.
## Validation scenarios
### 1. Availability gate
Run `idmp-cli datasource available list` and `idmp-cli ai anydata list` first. Success here only means the environment can support later AI work.
### 2. Data readiness
Use `idmp-cli ai anydata list` after availability passes. If the list is empty, treat that as weak AI context rather than a fabricated success.
### 3. Session visibility
Read `idmp-cli ai chat sessions` before recorded chat creation. Only use session detail reads if the list result gives you a trusted session ID.
### 4. Recommendation path after availability passes
Use `idmp-cli ai recommend create-post --ack-risk --data` with a locked element scope and an explicit backend enum such as `GENERAL_QUESTION`, `GEN_PANEL_QUESTION`, or `GEN_ANALYSIS_QUESTION`. Empty arrays, structured backend errors, and enum-contract errors are all valid, different outcomes.
### 5. Explicit unavailable-backend failure branch
If `idmp-cli ai create create --ack-risk --data` or `idmp-cli ai create create-post --ack-risk --data` fails, classify the failure and stop. Distinguish backend timeouts from true availability failures, and never report a generated object unless the response proves it.
## skills/idmp-analysis/SKILL.md
---
name: idmp-analysis
description: "IDMP analysis skill for listing, searching, reading, resuming, and preparing analysis create flows with path, trigger type, sub-template, and output-attribute checks."
metadata:
author: "TaosData"
version: "0.5.0"
owner_team: "AI"
requires:
bins:
- idmp-cli
cliHelp: "idmp-cli analysis --help"
---
# analysis
**Read [`../idmp-shared/SKILL.md`](../idmp-shared/SKILL.md) first.**
**Before any write:** Follow the [🛑 Destructive op confirmation protocol](../idmp-shared/SKILL.md#-destructive-op-confirmation-mandatory). Read-only commands stay read-only here, but delete / write / patch flows still require the shared yes-gate.
## Recommended shortcuts
| Shortcut | Purpose |
|----------|---------|
| `+list` | Read analyses under one element. |
| `+search` | Search analyses globally, including an empty-keyword starting point. |
## Recommended references
- [`analysis read flows`](references/analysis-read-flows.md)
- [`../idmp-workflow-analysis-create/SKILL.md`](../idmp-workflow-analysis-create/SKILL.md)
- [`../idmp-workflow-alert-create/SKILL.md`](../idmp-workflow-alert-create/SKILL.md)
## Missing context to resolve first
| Context | Why it must be resolved before create or resume |
| --- | --- |
| Final owner and mode | You need the exact `elementId` or `elementTemplateId` before you can choose the right command family or reserve a name. |
| Business root | Element-mode analysis creates still need `rootElementId` from the business root, even when the real owner moves to a data-bearing leaf. Prove that root with `element elements path` plus `element fullpath get` before you send the create payload. |
| Candidate analysis name | `analysis.analyses.new-name` and `analysis-template.analyses.new-name` require a candidate `name`. |
| Trigger scope | You need to know `applyOnSelf`, child-template scope, and which trigger type is valid after that choice. |
| Output plan | Decide whether to reuse or create output attributes, which `valueType` they need, and whether they land on self or child scope. |
| Runtime target | Decide whether `Ready` is acceptable or whether the final workflow must end in `Running` and therefore needs `resume`. |
## Constrained live behaviors
- Prefer `POST /api/v1/ai/analysis/create` for natural-language analysis or alert intents, then persist the returned draft through the normal create path. Use the structured DTO workflow as the fallback when the draft is unsuitable or persistence fails.
- `analysis.analyses.new-name` and `analysis-template.analyses.new-name` require a candidate `name` and `--ack-risk`; do not call them with only the owner scope.
- In element mode, `rootElementId` comes from the business root rather than the current leaf element.
- Shared environments can force analysis creation onto a data-bearing leaf when `trigger-types list` is empty on the current owner.
- Child scope does not inherit self-scope triggers. When `applyOnSelf=false`, the backend can legitimately expose only `Session` and `Interval`, so do not assume `DataInput` or `Event` will stay available.
- Minimal create payloads need `rootElementId`, `startAfterCreated`, a valid `trigger`, and real `output.attributes[].attrId` values. For current live `ELE_SUBET` flows, child-scope analyses can use owner-element output attributes while `output.elementTemplate.id` continues to point at the child template.
- Analysis create is not complete until `get`, `list`, and, when needed, `resume` prove the backend kept the object in the expected runtime state.
- Current live backends can return success for analysis delete while the generated output attributes remain referenced. Once create, reread, and `resume` prove the analysis itself worked, classify leaked output-attribute cleanup as a backend boundary instead of a wrong create payload.
- If the workflow must emit events or notifications, switch to [`../idmp-workflow-alert-create/SKILL.md`](../idmp-workflow-alert-create/SKILL.md) instead of treating it as a generic read or create flow.
## Evidence of completion
- A reserved name is only useful when the later `create` reread shows the same name on the persisted object.
- A create is only complete when `analysis analyses get` and `analysis analyses list` show the same `id`, owner scope, and expected state bits.
- If the success condition is a running analysis, do not stop at `Ready`; reread after `resume` and confirm the runtime state actually changed.
- Shared-environment cleanup is best-effort. If delete returns success but the output attribute still shows a backend reference leak, keep the leaked IDs with the report and do not downgrade an already-proven create or running analysis into a payload-shape failure.
- If `rootElementId` was part of the write path, keep the `element elements path` and `element fullpath get` evidence with the create proof.
## Product behavior to preserve
- Read `path`, `attributes`, `sub-templates`, `trigger-types`, and `new-name` before create or edit.
- For natural-language creation asks, prefer the AI draft endpoint first and keep the structured create flow as the fallback.
- `analysis.analyses.new-name` and `analysis-template.analyses.new-name` require a candidate `name` and `--ack-risk`; do not call them with only the owner scope.
- In element mode, the create payload needs `rootElementId` from the business root, not the current element.
- Copyable live-safe create shapes belong in [`../idmp-workflow-analysis-create/SKILL.md`](../idmp-workflow-analysis-create/SKILL.md), especially when the payload must include `output.attributes[]`.
- Trigger type choices depend on `applyOnSelf` and, for child scope, the selected template.
- If a create flow is abandoned after reserving a temporary output attribute, clean up that temporary attribute before retrying.
- After create or update, read the analysis back and `resume` it if the expected state is running.
## Key commands
```bash
idmp-cli schema analysis.analyses.list
idmp-cli analysis analyses list --params '{"elementId":123,"current":1,"size":20}'
idmp-cli schema analysis.analyses.get
idmp-cli analysis analyses get --params '{"elementId":123,"id":456}'
idmp-cli schema analysis.analysis.search
idmp-cli analysis analysis search --params '{"keyword":"voltage","current":1,"size":20}'
idmp-cli analysis analyses new-name --ack-risk --params '{"elementId":123,"name":"demo-analysis"}'
idmp-cli analysis trigger-types list --params '{"elementId":123,"applyOnSelf":true}'
idmp-cli analysis trigger-types list --params '{"elementId":123,"applyOnSelf":false,"elementTemplateId":456}'
idmp-cli schema analysis.analyses.resume
idmp-cli analysis analyses resume --ack-risk --params '{"elementId":123,"id":456}'
```
## Exception and failure handling
- If `trigger-types list` changes after `applyOnSelf` or the child template changes, discard the earlier trigger choice and re-read it.
- If child-scope trigger types only show `Session` or `Interval`, redesign the analysis around those trigger families or move back to self scope; do not force `Event` or `DataInput`.
- If the element path does not resolve to a business root, do not create the analysis until `rootElementId` is known. Treat “resolved” as `element elements path` plus `element fullpath get` agreeing on the same first-level owner.
- If output attributes were created only for a draft analysis and the draft is canceled, remove the temporary outputs before the next attempt.
- If delete succeeds but `attribute elements attributes-delete` still reports the output attribute is referred by the analysis, classify that as a backend cleanup boundary after you have already captured the create or running proof; stop retrying generic cleanup loops.
- If create or update succeeds but `get` still shows an unexpected state, verify with `list` and then use `resume` instead of sending another create.
- If search results are ambiguous, confirm the owner element before editing; do not reuse an `id` from a different element or template scope.
## Validation scenarios
1. Read the owner list with `idmp-cli schema analysis.analyses.list` and `idmp-cli analysis analyses list --params '{"elementId":123,"current":1,"size":20}'`.
2. Read one analysis in detail with `idmp-cli analysis analyses get --params '{"elementId":123,"id":456}'`.
3. Check global discoverability with `idmp-cli analysis analysis search --params '{"keyword":"voltage","current":1,"size":20}'`.
4. Resolve the business-root proof chain with `idmp-cli element elements path --params '{"elementId":123}'` and `idmp-cli element fullpath get --params '{"rootElementId":100,"elementId":123}'`, then validate create prerequisites with `idmp-cli analysis analyses new-name --ack-risk --params '{"elementId":123,"name":"demo-analysis"}'` and `idmp-cli analysis trigger-types list --params '{"elementId":123,"applyOnSelf":false,"elementTemplateId":456}'`.
5. Preview and verify the write path with `idmp-cli analysis analyses create --dry-run --ack-risk --params '{"elementId":123}' --data '{...}'`, then prove the runtime branch with `idmp-cli analysis analyses get --params '{"elementId":123,"id":456}'`, `idmp-cli analysis analyses list --params '{"elementId":123,"current":1,"size":20}'`, and `idmp-cli analysis analyses resume --dry-run --ack-risk --params '{"elementId":123,"id":456}'`.
## skills/idmp-annotation/SKILL.md
---
name: idmp-annotation
description: "IDMP annotation skill. Use it to read and write element annotations while keeping element annotations separate from event annotations."
metadata:
author: "TaosData"
version: "0.4.0"
owner_team: "AI"
requires:
bins:
- idmp-cli
cliHelp: "idmp-cli annotation --help"
---
# annotation
**Read [`../idmp-shared/SKILL.md`](../idmp-shared/SKILL.md) first.**
## What this skill covers
- Read, create, update, and delete annotations attached to elements.
- Keep element annotations separate from event annotations, which use the `event annotations *` family.
- Use annotation IDs for follow-up changes after the initial list read.
- Use filtered rereads by `content` or time window to prove the exact note you just changed.
## Recommended shortcuts
| Shortcut | Purpose |
|----------|---------|
| `+list` | List annotations for one element, optionally filtered by content |
## Recommended reference
- [`Annotation read flows`](references/annotation-read-flows.md)
## Missing context to resolve first
| Context | Why it must be resolved before mutation |
| --- | --- |
| Annotation scope | Decide whether the note belongs to an element or an event before choosing the command family. |
| Owner element | Element annotation create needs the final `elementId`. |
| Target annotation ID | Update and delete need `annotationId`, not the element ID. |
| Verification plan | Decide how you will reread the annotation list after create, update, and delete. |
## Constrained live behaviors
- `annotation annotation create` writes element annotations only; event notes use the `event annotations *` family.
- `annotation annotation update` and `annotation annotation delete` act on `annotationId`, not on the owner element.
- Annotation writes are not complete until `annotation annotation list` reread shows the expected text or confirms deletion.
- `annotation annotation list` supports `content`, time windows, and small page sizes, so use filtered rereads before widening to the full page.
- `annotation annotation list` time-window filters expect epoch milliseconds, even though `annotation annotation update` can return a timestamp string. Convert the returned time before you feed it back into `updateTimeFrom` or `updateTimeTo`.
- Disposable debug notes should be deleted when the workflow ends so shared environments do not accumulate stale annotations.
## Operator workflow
1. Use this skill for element annotations only.
2. If the operator is discussing an event timeline, switch to `event annotations *`.
3. Read the element annotation list first and capture the `annotationId` before any update or delete.
4. `update` and `delete` operate on the annotation record, not on the element itself.
5. Re-read with a `content` filter first, then widen to the unfiltered first page if needed, to confirm the final text and timestamps.
6. When you need an `updateTime*` filter after `update`, normalize the returned timestamp to epoch milliseconds before the reread.
## Key commands
```bash
idmp-cli schema annotation.annotation.list
idmp-cli annotation annotation list --params '{"elementId":123,"current":1,"size":20}'
idmp-cli annotation annotation list --params '{"elementId":123,"content":"copilot note","current":1,"size":1}'
idmp-cli schema annotation.annotation.create
idmp-cli annotation annotation create --ack-risk --data '{...}'
idmp-cli schema annotation.annotation.update
idmp-cli annotation annotation update --ack-risk --data '{...}'
idmp-cli schema annotation.annotation.delete
idmp-cli annotation annotation delete --ack-risk --params '{"annotationId":456}'
```
## Exception paths
- The list is empty: treat that as “no annotations yet,” not as a product failure.
- Reads return 404 or permission errors: verify the `elementId` and the current user’s access level.
- Update or delete fails unexpectedly: confirm you passed `annotationId`, not `elementId`.
- The operator expected event notes: switch to `event annotations *` instead of forcing element commands.
- A write succeeds but the note still seems missing: remove filters and re-read the first page of results.
- Update succeeds but `updateTimeFrom` filtering misses the note: convert the returned update time to epoch milliseconds and retry the filtered list.
## Validation scenarios
1. List annotations for a known element with `idmp-cli annotation annotation list`.
2. Repeat the list with a content filter and small page size to isolate one known note.
3. Create a disposable annotation with `idmp-cli annotation annotation create --ack-risk`.
4. Update that annotation by `annotationId` with `idmp-cli annotation annotation update --ack-risk`.
5. Delete the same annotation by `annotationId` and confirm it no longer appears in the list.
## skills/idmp-attribute/SKILL.md
---
name: idmp-attribute
description: "IDMP attribute skill for reading definitions and values, checking history, evaluating expressions, reserving names, and safely writing test data."
metadata:
author: "TaosData"
version: "0.4.0"
owner_team: "AI"
requires:
bins:
- idmp-cli
cliHelp: "idmp-cli attribute --help"
---
# attribute
**Read [`../idmp-shared/SKILL.md`](../idmp-shared/SKILL.md) first.**
**Before any write:** Follow the [🛑 Destructive op confirmation protocol](../idmp-shared/SKILL.md#-destructive-op-confirmation-mandatory). Read-only commands stay read-only here, but delete / write / patch flows still require the shared yes-gate.
## Recommended shortcuts
| Shortcut | Purpose |
|----------|---------|
| [`+list`](references/idmp-attribute-list.md) | Read attribute definitions before value or history work. |
| [`+get`](references/idmp-attribute-get.md) | Read one attribute's current value. |
| [`+data`](references/idmp-attribute-data.md) | Read multiple current values in one request. |
| [`+history`](references/idmp-attribute-history.md) | Read historical data for one attribute. |
## Recommended references
- [`references/idmp-attribute-evaluate-expression.md`](references/idmp-attribute-evaluate-expression.md)
## Product-style workflow
1. Read definitions with `attributes`.
2. Read current values with `data-get` or `data-post` only when needed.
3. Run `new-name` without `--ack-risk` before creating an attribute.
4. Run `attribute evaluate-expression create` before saving a formula or expression.
5. Use `write-data` only when you need controlled test input on a metric-backed attribute.
## Missing context to resolve first
| Context | Why it must be resolved before create or write |
| --- | --- |
| Owner element | You need the final `elementId` before you can reserve names, create the attribute, or reread definitions and values. |
| Candidate attribute name | `attribute attributes new-name` only works after the owner is fixed. |
| Attribute type plan | You need the intended `valueType` and whether the attribute is only metadata, expression-backed, or a metric-backed writable reference. |
| Write target | Decide whether `write-data` should target an existing TDengine metric reference rather than the newly created attribute. |
| Verification and cleanup target | Decide how you will prove create success, how you will reread written data, and which temporary attribute must be deleted at the end. |
## Constrained live behaviors
- `attribute attributes new-name` only needs the owner scope, but `attributes-post` must use the final reserved name and a real `valueType`.
- The expression-preview command family is `attribute evaluate-expression create`, and the schema path is `attribute.evaluate-expression.create`; the older guessed `attribute.attributes.evaluate-expression` path is wrong.
- Older checks may still mention the guessed `attribute.attributes.evaluate-expression` path; use `idmp-cli attribute evaluate-expression create --dry-run --ack-risk --params` for the real request.
- `attribute evaluate-expression create` needs a request body with at least `dataReferenceType` and `expression`. The live-safe starter is `{"dataReferenceType":"Formula","expression":"..."}`; `attributeId` and `uomId` are optional context helpers, not substitutes for the formula text.
- A newly created generic attribute is not automatically a TDengine metric reference. `attribute write-data create` can fail with `etda390037` unless the target attribute is backed by writable metric storage.
- In strict live validation, `attribute historydata list` should use explicit `start` and `end` bounds instead of relying on ambient defaults.
- Attribute create is not complete until `attributes` reread shows the new definition.
- Template-derived attributes are not generic scratch objects. If an attribute still has `attrTempId`, the generic `attribute elements attributes-delete` path is expected to reject the delete while the backing template exists.
- Temporary probe attributes should be deleted after the workflow, even when write-data validation used a different existing metric-backed attribute.
## Evidence of completion
- A create is only complete when `attribute elements attributes --params` rereads the new definition under the same owner.
- A value probe is only complete when `data-get`, `data-post`, or bounded `historydata list` returns the intended attribute data.
- A write probe is only complete when the target is known to be metric-backed and the reread reflects the inserted row, not just the CLI success line.
## Key commands
```bash
idmp-cli schema attribute.elements.attributes
idmp-cli attribute elements attributes --params '{"elementId":1}'
idmp-cli schema attribute.attributes.new-name
# new-name is read-only (reserves a name); no --ack-risk required
idmp-cli attribute attributes new-name --params '{"elementId":1}'
idmp-cli schema attribute.elements.attributes-post
idmp-cli attribute elements attributes-post --ack-risk --params '{"elementId":1}' --data '{"name":"probe-attribute","valueType":"Double"}'
idmp-cli schema attribute.evaluate-expression.create
idmp-cli attribute evaluate-expression create --params '{"elementId":1}' --data '{...}' --dry-run --ack-risk
idmp-cli schema attribute.attributes.data-get
idmp-cli attribute attributes data-get --params '{"elementId":1,"attributeId":2}'
idmp-cli schema attribute.historydata.list
idmp-cli attribute historydata list --params '{"elementId":1,"attributeId":2,"current":1,"size":20,"start":1704067200000,"end":1704153600000}'
```
## Exception and failure handling
- If an attribute is not returned by `attributes`, do not guess the ID from older notes or scripts.
- If the definition exists but the current value is empty, check history before treating it as a product failure.
- If `new-name` returns a different candidate, use the reserved value instead of forcing the original name.
- If expression evaluation fails, fix the formula before create or update; do not save a broken expression first.
- If test writes are rejected with errors such as `etda390037`, switch to a known metric-backed attribute; do not assume the newly created attribute is writable.
- If delete fails because the attribute came from an attribute template, treat that as a scope boundary; do not keep retrying the generic element-attribute delete path.
- If the preview differs from the intended payload, stay read-only until the schema and permissions are correct.
## Validation scenarios
1. Read attribute definitions with `idmp-cli schema attribute.elements.attributes` and `idmp-cli attribute elements attributes --params '{"elementId":1}'`.
2. Reserve a create-safe name with `idmp-cli attribute attributes new-name --params '{"elementId":1}'`.
3. Read one live value with `idmp-cli attribute attributes data-get --params '{"elementId":1,"attributeId":2}'`.
4. Create a probe attribute only after `idmp-cli attribute attributes new-name --params '{"elementId":1}'`, then verify the create path with `idmp-cli attribute elements attributes-post --ack-risk --params '{"elementId":1}' --data '{"name":"probe-attribute","valueType":"Double"}'`.
5. Check history paging with `idmp-cli attribute historydata list --params '{"elementId":1,"attributeId":2,"current":1,"size":20,"start":1704067200000,"end":1704153600000}'`, then use `idmp-cli attribute write-data create --dry-run --ack-risk --params '{"elementId":1}' --data '{"probe":"example"}'` only after confirming the target attribute is a writable metric reference and `idmp-cli attribute evaluate-expression create --params '{"elementId":1}' --data '{"dataReferenceType":"Formula","expression":"AVG(${attributes['"'"'Current'"'"']})"}' --dry-run --ack-risk` already succeeded.
## skills/idmp-dashboard/SKILL.md
---
name: idmp-dashboard
description: "IDMP dashboard skill for listing dashboards, reading details, updating layout and order, templating stable dashboards, and keeping dashboard lifecycle separate from panel lifecycle."
metadata:
author: "TaosData"
version: "0.6.0"
owner_team: "AI"
requires:
bins:
- idmp-cli
cliHelp: "idmp-cli dashboard --help"
---
# dashboard
**Read [`../idmp-shared/SKILL.md`](../idmp-shared/SKILL.md) first.**
**Before any write:** Follow the [🛑 Destructive op confirmation protocol](../idmp-shared/SKILL.md#-destructive-op-confirmation-mandatory). Read-only commands stay read-only here, but delete / write / patch flows still require the shared yes-gate.
## Recommended shortcuts
| Shortcut | Purpose |
|----------|---------|
| `+list` | List dashboards under one element. |
| `+search` | Search dashboards globally. |
| `+templates` | List dashboard templates available to one element. |
## Recommended reference
- [`dashboard read flows`](references/dashboard-read-flows.md)
- [`../idmp-workflow-panel-build/SKILL.md`](../idmp-workflow-panel-build/SKILL.md)
## Missing context to resolve first
| Context | Why it must be resolved before create or update |
| --- | --- |
| Owner element | You need the final `elementId` before you can list, get, create, reorder, or template dashboards. |
| Candidate dashboard name | `dashboard.dashboards.new-name` requires both `elementId` and a proposed `name`. |
| Panel placement plan | Decide which panel IDs should appear in the dashboard and whether panel creation must happen first. |
| Refresh owner | Dashboard refresh belongs in `dashboard.params`, so you need to know whether the dashboard shell owns refresh behavior. |
| Verification target | Decide whether the final proof is layout readback, panel membership, ordering, template readiness, or all of them. |
## Constrained live behaviors
- `dashboard.dashboards.new-name` requires a candidate `name`; do not call it with only the owner scope.
- `refreshInterval` belongs in `dashboard.params`, not in a top-level field.
- Creating a panel does not add it to a dashboard automatically; dashboard membership is a separate update path.
- `make-top` only changes ordering. It does not replace layout edits or dashboard content updates.
- Deleting or editing a dashboard does not delete the underlying panels by itself.
- Removing a panel from a dashboard must be verified by rereading the dashboard layout and the standalone panel inventory; a dashboard update does not delete the panel object.
- After membership changes, reread both the dashboard and the standalone panel inventory before you conclude the change is complete.
## Evidence of completion
- A dashboard create is only complete when `dashboard dashboards get` or `dashboard dashboards list` returns the new shell with the intended owner.
- A layout or membership update is only complete when both the dashboard reread and the standalone panel inventory reflect the intended state.
- Ordering work is only complete when a reread shows the new position; `make-top` does not stand in for broader layout proof.
## Product behavior to preserve
- Read `list` first, then `get`, before changing a dashboard.
- Use `new-name` with a candidate `name` before creating a dashboard shell.
- `refreshInterval` belongs in `dashboard.params`, not in a top-level field.
- Creating a panel does not add it to a dashboard; dashboard membership is managed separately.
- Deleting or changing a dashboard does not delete the underlying panels by itself.
- After removing a panel from `dashboard.panels`, reread both the dashboard and the panel inventory before you conclude the layout change is complete.
## Key commands
```bash
idmp-cli schema dashboard.dashboards.list
idmp-cli dashboard dashboards list --params '{"elementId":123}'
idmp-cli schema dashboard.dashboards.get
idmp-cli dashboard dashboards get --params '{"elementId":123,"dashboardId":456}'
idmp-cli dashboard dashboards search --params '{"keyword":"energy","current":1,"size":20}'
idmp-cli dashboard dashboards new-name --params '{"elementId":123,"name":"demo-dashboard"}'
idmp-cli dashboard dashboards create --dry-run --ack-risk --params '{"elementId":123}' --data '{...}'
idmp-cli dashboard dashboards update --dry-run --ack-risk --params '{"elementId":123,"dashboardId":456}' --data '{...}'
idmp-cli dashboard dashboards make-top --ack-risk --params '{"elementId":123,"dashboardId":456}'
idmp-cli dashboard dashboards make-top --dry-run --ack-risk --params '{"elementId":123,"dashboardId":456}'
idmp-cli dashboard dashboard-templates list --params '{"elementId":123}'
```
## Exception and failure handling
- If a panel exists but does not appear in a dashboard, update the dashboard explicitly; panel creation alone is not enough.
- If `refreshInterval` is placed outside dashboard `params`, the dashboard will not behave as intended; correct the payload before retrying.
- If `make-top` succeeds, expect only ordering changes; do not use it as a substitute for layout edits.
- If an update succeeds but `get` still shows an old layout or `panelIds`, reread immediately before sending another mutation. If the mismatch remains, report stale state instead of retrying blindly.
- If a dashboard is removed, plan for panels to remain available until they are deleted separately.
## Validation scenarios
1. Read the dashboard list with `idmp-cli schema dashboard.dashboards.list` and `idmp-cli dashboard dashboards list --params '{"elementId":123}'`.
2. Read one dashboard in detail with `idmp-cli dashboard dashboards get --params '{"elementId":123,"dashboardId":456}'`.
3. Check discovery and naming with `idmp-cli dashboard dashboards search --params '{"keyword":"energy","current":1,"size":20}'` and `idmp-cli dashboard dashboards new-name --params '{"elementId":123,"name":"demo-dashboard"}'`.
4. Preview structure changes with `idmp-cli dashboard dashboards update --dry-run --ack-risk --params '{"elementId":123,"dashboardId":456}' --data '{...}'`, then apply the membership change and reread both the dashboard and the standalone panel inventory.
5. Verify ordering and template readiness with `idmp-cli dashboard dashboards make-top --ack-risk --params '{"elementId":123,"dashboardId":456}'`, then preview the same operation with `--dry-run` and check `idmp-cli dashboard dashboard-templates list --params '{"elementId":123}'`.
## skills/idmp-data/SKILL.md
---
name: idmp-data
description: "IDMP data import/export skill. Use it to inspect exportable root elements, review import/export records, download artifacts, and distinguish package export, artifact download, and import flows."
metadata:
author: "TaosData"
version: "0.5.0"
owner_team: "AI"
requires:
bins:
- idmp-cli
cliHelp: "idmp-cli data --help"
---
# data
**Read [`../idmp-shared/SKILL.md`](../idmp-shared/SKILL.md) first.**
## What this skill covers
- Discover which top-level elements are available for package import/export.
- Review import/export records before downloading artifacts or investigating failures.
- Distinguish package export, artifact download, package import, and single import/export operations.
- Use records as the operator’s source of truth for status, filenames, and error messages.
- Accept both valid export outcomes: a record-backed artifact or a ZIP archive streamed directly to stdout.
## Recommended shortcuts
| Shortcut | Purpose |
|----------|---------|
| `+roots` | List first-level elements visible to import/export |
| `+records` | List import/export records |
| `+download` | Download the artifact for a known record |
## Recommended reference
- [`Data import/export read flows`](references/data-read-flows.md)
## Missing context to resolve first
| Context | Why it must be resolved before import or export |
| --- | --- |
| Workflow type | Package export, package import, and datasource CSV import are different mutation chains. |
| Scope | You need the final `elementIds`, `elementTemplateIds`, or datasource scope before the write. |
| Expected artifact | Exports can either stream a ZIP directly to stdout or create a record that later exposes `fileName`. |
| Datasource context | CSV import needs a validated `connectionId`, `dbName`, and table or stable names from earlier reads. |
| Verification window | Decide when and how you will reread `data records list` after the write. |
## Constrained live behaviors
- Package export, package import, and datasource CSV import must not share guessed payloads or filenames.
- `data records list` is the authoritative confirmation after every write; a quick success response is not the final state.
- `data download get` must use the real record artifact name as the `name` path parameter, not a guessed path.
- A successful export can end in two valid ways: ZIP bytes on stdout or a later record-backed artifact with `fileName`.
- High-impact import or export work should start with schema inspection or `--dry-run` before the real write.
- If a probe import creates assets you do not want to keep, cleanup belongs to the owning asset workflow, not to record deletion.
## Operator workflow
1. Start with `first-level-elements` before any export or import decision.
2. Read `records` before downloading an artifact, reviewing a failure, or confirming the generated filename.
3. Use `import-and-export export` for package creation, `download get` only when a record exposes `fileName`, and `import-and-export import` or `single-import create` for uploads.
4. Expect exports and imports to be long-running or asynchronous; the CLI response alone is not the final confirmation.
5. If export already streamed ZIP bytes to stdout, treat that stream as the artifact and still re-check `records` for audit history.
6. Re-check `records` after every write to confirm status, artifact name, and failure details.
## Key commands
```bash
idmp-cli schema data.first-level-elements.list
idmp-cli data first-level-elements list
idmp-cli schema data.records.list
idmp-cli data records list
idmp-cli schema data.import-and-export.export
idmp-cli data import-and-export export --ack-risk --data '{"elementIds":[123]}'
idmp-cli schema data.download.get
idmp-cli data download get --params '{"name":"export.zip"}'
idmp-cli schema data.import-and-export.import
# `data.import-and-export.import` is multipart/form-data in the current schema.
# Inspect the schema output first and build the request with the exact transport and fields
# (for example `jsonFile` / `taosgenFiles[]`) instead of assuming a plain JSON body.
idmp-cli data import-and-export import --ack-risk --data '{...}'
idmp-cli schema data.single-import.create
# `data.single-import.create` is also multipart/form-data in the current schema.
# Inspect the schema output first and use the exact upload fields instead of guessing a JSON DTO.
idmp-cli data single-import create --ack-risk --data '{...}'
```
## Exception paths
- `first-level-elements` is empty: confirm the current account can see any import/export roots before troubleshooting files.
- The export call returns quickly but no usable record appears: check whether stdout already contains a ZIP artifact before retrying.
- A download fails with file

