659描述技能D0748603

tools-only2026-10-25查看 470复制 440

用于 InstallAnywhere .iap_xml 安装程序定义的 Dasel v3 查询模式——在查询动作序列、发现变量、解析平台条件、导航面板或比较安装程序变体时使用。文件大小为 2.5+ MB、65,000+ 行——对于上下文读取来说过大,需要结构化 dasel 查询。

Download (.md)

📘如何使用这个技能

  1. 1
    复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
  2. 2
    打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
  3. 3
    粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
  4. 4
    直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景

💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。

SKILL.md4270 chars
---
description: "Dasel v3 query patterns for InstallAnywhere .iap_xml installer definitions — use when querying action sequences, discovering variables, resolving platform conditions, navigating panels, or comparing installer variants. Files are 2.5+ MB, 65,000+ lines — too large for context reads, requires structural dasel queries."
---

# InstallAnywhere .iap_xml Query Patterns

<when_to_use>

Load this skill when working with any `.iap_xml` file — auditing install actions, listing file copy operations, discovering variables, finding platform-specific branches, or comparing two installer variants (e.g., RA vs NON_RA builds).

</when_to_use>

## Operational Constraints

- Always pass `-i xml` explicitly — auto-detection fails on `.iap_xml` extensions
- Write all intermediate results to `/tmp/` — never to the source tree
- Files are 2.5–2.6 MB, 65,000+ lines — use structural dasel queries, never read the file into context

## Root Structure

InstallAnywhere `.iap_xml` files have a fixed root path: `InstallAnywhere.project`.

```bash
# Top-level element names at the document root
dasel -f installer.iap_xml -i xml 'keys($this)'

# Navigate to the install action sequence
dasel -f installer.iap_xml -i xml 'InstallAnywhere.project.installSequence'

# Children of the project node
dasel -f installer.iap_xml -i xml 'InstallAnywhere.project.keys($this)'
```

Recursive descent — finds elements at any depth without knowing the full path:

```bash
# All elements named "action" at any depth
dasel -f installer.iap_xml -i xml '..action'

# All elements named "panel" at any depth
dasel -f installer.iap_xml -i xml '..panel'

# Any node at any depth where a specific attribute exists
dasel -f installer.iap_xml -i xml 'search(has("-name"))'
```

`..elementName` descends recursively. `search(predicate)` matches nodes at any depth.

## Action Sequence Analysis

```bash
# All action names in execution order
dasel -f installer.iap_xml -i xml '..action.map("-name")'

# All action types
dasel -f installer.iap_xml -i xml '..action.map("-type")'

# Count all action elements
dasel -f installer.iap_xml -i xml 'len(..action)'

# Write for analysis
dasel -f installer.iap_xml -i xml '..action.map("-name")' > /tmp/action_names.txt
dasel -f installer.iap_xml -i xml '..action.map("-type")' > /tmp/action_types.txt
```

## Variable Discovery

```bash
# All variable definitions
dasel -f installer.iap_xml -i xml '..variable.map("-name")' > /tmp/installer_vars.txt
```

## Platform Conditions

```bash
# All platform conditions (Windows vs Linux branches)
dasel -f installer.iap_xml -i xml 'search(has("-platform")).map("-platform")' > /tmp/platforms.txt
```

## Cross-Variant Comparison

When comparing two builds of the same installer (e.g., RA vs NON_RA, Windows vs Linux variant):

```bash
# Compare action sets between two installer files
dasel -f installer_a.iap_xml -i xml '..action.map("-name")' | sort > /tmp/actions_a.txt
dasel -f installer_b.iap_xml -i xml '..action.map("-name")' | sort > /tmp/actions_b.txt
diff /tmp/actions_a.txt /tmp/actions_b.txt > /tmp/installer_diff.txt

# Compare panel sets
dasel -f installer_a.iap_xml -i xml '..panel.map("-name")' | sort > /tmp/panels_a.txt
dasel -f installer_b.iap_xml -i xml '..panel.map("-name")' | sort > /tmp/panels_b.txt
diff /tmp/panels_a.txt /tmp/panels_b.txt
```

## File Copy Operations

```bash
# All file copy sources
dasel -f installer.iap_xml -i xml '..installFile.map("-source")' > /tmp/file_copies.txt
```

## Panel Navigation

```bash
# Panel names and count
dasel -f installer.iap_xml -i xml '..panel.map("-name")'
dasel -f installer.iap_xml -i xml 'len(..panel)'
```

## Attribute Syntax Reference

XML attributes use `-` prefix in dasel friendly mode:

```bash
# Access specific attribute on first match
dasel -f installer.iap_xml -i xml '..action[0].-name'

# Discover attributes and children of a node
dasel -f installer.iap_xml -i xml '..action[0].keys($this)'

# Extract attribute values across all matching nodes
dasel -f installer.iap_xml -i xml '..elementName.map("-attributeName")'

# Count matching elements
dasel -f installer.iap_xml -i xml 'len(..elementName)'

# Search with attribute predicate at any depth
dasel -f installer.iap_xml -i xml 'search(has("-attributeName"))'
```
来源:skillsdirectory

评论0

登录后参与评论

还没有评论,来抢沙发吧