Communityコーディング&開発github.com

Jamie-BitFlight/dasel-reference

JSON、YAML、TOML、XML、CSV、HCL、INIのクエリ、変更、変換に使用。dasel v3のセレクター、関数、条件、変数、スプレッド演算子、型キャスト、フォーマット固有パターンの完全なリファレンス。

dasel-reference とは?

このスキルは、単一バイナリのCLIツールであるdasel v3の包括的なリファレンスを提供します。jq、yq、xmllintを統合したようなもので、JSON、YAML、TOML、XML、CSV、HCL、INIの構造化データを統一的にクエリ、変更、変換できます。開発者はこのスキルを使って、stdin経由でデータを読み込み、daselの強力なセレクター(ドット記法、配列インデックス、再帰的降下、オブジェクト構築、スプレッド演算子)や関数(フィルタ、マップ、検索、並べ替え、型変換など)でデータを操作できます。インプレース代入によるデータ変更や、フォーマット間の変換もサポートしており、ファイル拡張子に依存せず明示的なフォーマット指定が必要です。このリファレンスには、v2からの破壊的変更も含まれているため、現行バージョンで正しく利用するのに役立ちます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Jamie-BitFlight/claude_skills/tree/main/plugins/dasel/skills/dasel-reference

Installed? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

dasel v3 構文リファレンス

構造化データのクエリ、変更、変換を行う単一バイナリCLI。jq + yq + xmllint を置き換え、全フォーマットで統一されたクエリ構文を提供します。

本ドキュメント執筆時点の安定版(日付:2026-02-23):v3.2.3

サポートされているフォーマット

json、yaml、toml、xml、csv、hcl、ini

基本的な使い方

# stdinからクエリ(フォーマット指定必須)
echo '{"foo": "bar"}' | dasel -i json 'foo'

# ファイルからstdin経由でクエリ
cat config.yaml | dasel -i yaml 'database.host'

# 変更して全文書を出力
echo '{"port": 3000}' | dasel -i json --root 'server.port = 8080'

# フォーマット変換
cat data.json | dasel -i json -o yaml

フォーマットの取り扱い

dasel v3はファイル拡張子からのフォーマット自動検出を行いません。-f/--fileフラグはありません。入力は常にstdinから読み取られます。フォーマットは-iおよび/または-oで明示的に指定する必要があります。どちらか一方のみが指定された場合、もう一方はその値にデフォルト設定されます。どちらも指定されない場合、両方ともデフォルトでjsonになります(~/dasel.yamlのdefault_formatキーで設定可能)。

ソース:internal/cli/query.go:10-11、internal/cli/run.go:37-43、internal/cli/config.go:19-21

主要フラグ

-i、--in <フォーマット>         入力パーサー(json、yaml、toml、xml、csv、hcl、ini)
-o、--out <フォーマット>        出力パーサー(デフォルトは入力フォーマット)
--root                        変更後の全文書を出力
--var <名前>=<値>              変数をクエリに渡す(繰り返し指定可能)
--compact                     コンパクト出力(整形なし)
--rw-flag <名前>=<値>          読み書きフラグ(例:--rw-flag csv-delimiter=;)
--read-flag <名前>=<値>        リーダーフラグ(例:--read-flag xml-mode=structured)
--write-flag <名前>=<値>       ライターフラグ(例:--write-flag csv-delimiter=;)
-c、--config <パス>            設定ファイルパス(デフォルト:~/dasel.yaml)

コアセレクター クイックリファレンス

セレクター構文例
ドット記法foo.bar.bazcat f.json | dasel -i json 'foo.bar'
配列インデックス[0]、[2]cat f.json | dasel -i json 'items[0]'
配列スライス[0:3]cat f.json | dasel -i json 'items[0:2]'
再帰的降下..、..namecat f.json | dasel -i json '..name'
全値再帰..*cat f.json | dasel -i json '..*'
オブジェクト構築{ key1, key2 }cat f.json | dasel -i json '{ name, age }'
スプレッドobj...cat f.json | dasel -i json '{ defaults..., overrides... }'

主要関数 クイックリファレンス

DefaultFuncCollection内の19個の組み込み関数(ソース:execution/func.go:12-33)に加え、sortBy複合式。

関数目的例
filter(pred)配列のフィルタリングusers.filter(active == true)
map(expr)配列の変換users.map(name)
each(expr)各要素の変更each($this = $this * 2)
search(pred)再帰検索search(has("id"))
sortBy(expr)配列の並べ替えsortBy($this, desc)
has(key)キーの存在確認has("name")
get(key)キー/インデックスでの値取得get("name")
contains(val)スライスが値を含むか確認contains(42)
len(expr)長さlen($this)
join(sep)文字列に結合join(",")
sum(expr)数値配列の合計sum($this)
add(args...)数値の加算add(1, 2, 3)
max(args...)最大値max(1, 5, 3)
min(args...)最小値min(1, 5, 3)
merge(args...)マップのマージmerge(defaults, overrides)
keys(expr)マップのキー取得keys($this)
reverse(expr)配列の反転reverse($this)
typeOf(expr)型文字列の取得typeOf($this)
toString(expr)文字列にキャストtoString($this)
toInt(expr)整数にキャストtoInt($this)
toFloat(expr)浮動小数点数にキャストtoFloat($this)
base64e(str)Base64エンコードbase64e("hello")
base64d(str)Base64デコードbase64d("aGVsbG8=")
parse(fmt, data)ランタイムでのデータ解析parse("json", rawStr)
readFile(path)ファイル内容の読み取りreadFile("config.json")
ignore()ブランチから除外ignore()

変更構文

v3ではputとdeleteサブコマンドが削除されました。代入には--rootを使用します:

# 値の設定
echo '{"count": 1}' | dasel -i json --root 'count = 42'

# 真偽値の代入
echo '{"enabled": false}' | dasel -i json --root 'enabled = true'

# 配列への追加
echo '[1,2,3]' | dasel -i json --root '[$this..., 4]'

# キーの削除(再構築して除外)
echo '{"keep": "yes", "drop": "no"}' | dasel -i json --root '{ keep }'

フォーマット変換

# JSONからYAMLへ
cat data.json | dasel -i json -o yaml

# YAMLからTOMLへ
cat config.yaml | dasel -i yaml -o toml

# TOMLからJSONへ
cat config.toml | dasel -i toml -o json

特殊変数

  • $root — ルートドキュメントを参照
  • $this — 現在のノードを参照(each、map、filter、search内で使用)

変数代入

# セミコロンを使った複数ステートメント
cat data.json | dasel -i json '$active = users.filter(active == true); $active.map(name)'

条件

echo '{"count": 7}' | dasel -i json 'if(count > 5) { "many" } else { "few" }'

v3のv2からの破壊的変更

  • putとdeleteサブコマンドが削除されました。インライン代入に--rootを使用してください
  • -f/--fileフラグが削除されました。入力は常にパイプ経由でstdinから取得します
  • クエリ/セレクター構文が完全に刷新されました。v2の構文はv3と互換性がありません
  • CLIフレームワークがCobraからKongに変更されました
  • Goモジュールパスがgithub.com/tomwright/dasel/v3に変更されました

詳細リファレンス

ソース

  1. dasel README: https://raw.githubusercontent.com/TomWright/dasel/master/README.md(取得日:2026-02-19)
  2. dasel docs: https://daseldocs.tomwright.me(取得日:2026-02-19)
  3. クエリ構文: https://daseldocs.tomwright.me/syntax/query-syntax.md(取得日:2026-02-19)
  4. 関数インデックス: https://daseldocs.tomwright.me/functions(取得日:2026-02-19)
  5. CHANGELOG: https://raw.githubusercontent.com/TomWright/dasel/master/CHANGELOG.md(取得日:2026-02-19)
  6. リリース: https://github.com/TomWright/dasel/releases(取得日:2026-02-19)
  7. ソースコード解析: execution/func.go、internal/cli/query.go、internal/cli/run.go、internal/cli/config.go、execution/execute_binary.go、execution/execute_unary.go(解析日:2026-02-19)
  8. 事実確認: FACT_CHECK_REPORT.md(2026-02-23)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

Jamie-BitFlight/agentskill-kaizen-meta-docs

Agentskill kaizen plugin documentation index. Load when needing to read about cross-platform notes, improvement plans, or DuckDB integration.

Jamie-BitFlight/bash-51-features

Bash 5.1 release features and improvements with practical examples. Use when working with Bash 5.1 features, epoch time variables, redirection enhancements, or when user asks about Bash 5.1 changes, new features, or version-specific capabilities.

Jamie-BitFlight/bash-52-features

Bash 5.2 release features and improvements with practical examples. Use when working with Bash 5.2 features, variable handling enhancements, readline improvements, or when user asks about Bash 5.2 changes, new features, or version-specific capabilities.

Jamie-BitFlight/bash-53-features

Bash 5.3 release features and improvements with practical examples. Use when working with Bash 5.3 features, new command substitution, GLOBSORT, loadable builtins, or when user asks about Bash 5.3 changes, new features, or version-specific capabilities.

Jamie-BitFlight/bash-development

This skill should be used when the user asks to "write a bash script", "create a shell script", "implement bash function", "parse arguments in bash", "handle errors in bash", or mentions bash development, shell scripting, script templates, or modern bash patterns.

Jamie-BitFlight/bash-lint

This skill should be used when the user asks to "lint bash script", "run shellcheck", "format shell script", "use shfmt", "fix shellcheck errors", or mentions shell script linting, formatting, code quality, or pre-commit hooks for bash.

Jamie-BitFlight/bash-logging

This skill should be used when the user asks to "add logging to bash script", "colorize output", "implement log levels", "CI/CD sections", "terminal colors in bash", or mentions logging functions, emoji output, collapsible CI sections, or shlocksmith.

Jamie-BitFlight/bash-portability

This skill should be used when the user asks about "POSIX compatibility", "portable shell scripts", "cross-shell compatibility", "bashisms", "shebang selection", or mentions writing scripts that work on different shells (bash, sh, dash, zsh) or different systems.

Jamie-BitFlight/bash-testing

This skill should be used when the user asks to "test bash script", "write shell tests", "use shunit2", "use shellspec", "create test suite for bash", or mentions unit testing, test frameworks, mocking, or test-driven development for shell scripts.

Jamie-BitFlight/brainstorming-skill

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or when users request help with ideation, marketing, and strategic planning. Explores user intent, requirements, and design before implementation using research-validated prompt patterns.

Jamie-BitFlight/clang-format

Configure clang-format code formatting. Use when: user mentions clang-format or .clang-format, analyzing code style/patterns, creating/modifying formatting config, troubleshooting formatting, brace styles/indentation/spacing/alignment/pointer alignment, or codifying conventions.

Jamie-BitFlight/commitlint

When setting up commit message validation for a project. When project has commitlint.config.js or .commitlintrc files. When configuring CI/CD to enforce commit format. When extracting commit rules for LLM prompt generation. When debugging commit message rejection errors.

Jamie-BitFlight/conventional-commits

When writing a git commit message. When task completes and changes need committing. When project uses semantic-release, commitizen, git-cliff. When choosing between feat/fix/chore/docs types. When indicating breaking changes. When generating changelogs from commit history.

Jamie-BitFlight/data-exploration

Use when exploring unknown structured data files with dasel v3 — discover schema, list keys, find nested values, sample arrays, identify data types across JSON, YAML, TOML, XML, CSV, HCL, INI formats

Jamie-BitFlight/data-transformation

Use when modifying, converting, or transforming structured data with dasel v3 — in-place mutations, format conversion, batch operations, array manipulation, object construction, and merge patterns across JSON, YAML, TOML, XML, CSV, HCL, INI

Jamie-BitFlight/delegate

Decompose substantive work into phases, dispatch each phase to a sub-agent, and adjudicate what comes back. Use whenever a request asks for implementation, investigation, a fix, a review, or any change to files — including small ones — and whenever you are about to read source or run a diagnostic yourself instead of handing it off. Also use when a report from a sub-agent needs judging, when a phase needs re-dispatching, or when a user names one instance of a pattern. Does not apply when your own prompt begins "Your ROLE_TYPE is sub-agent." — then follow references/sub-agent-contract.md instead.

Jamie-BitFlight/enterprise-hibernate-hbm

Dasel v3 query patterns for Hibernate .hbm.xml mapping files — entity-table binding, Java property-to-column extraction, one-to-many set/list/bag relationship tracing, many-to-one foreign key discovery, batch scanning across 60+ HBM files. Use when querying Hibernate ORM class mappings, extracting schema metadata from Java persistence layer, or auditing entity-column relationships in enterprise legacy codebases.

Jamie-BitFlight/enterprise-installanywhere

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.

Jamie-BitFlight/enterprise-maven-pom

Dasel v3 selector patterns for Maven POM XML files — use when querying dependency versions, filtering by groupId or scope, extracting module hierarchy from parent POMs, or detecting version conflicts across enterprise multi-module Java projects. Load this skill when working with pom.xml files using dasel.

Jamie-BitFlight/enterprise-spring-xml

Dasel v3 selectors for Spring bean factory XML — use when querying any Spring ApplicationContext XML for bean discovery, dependency wiring, JMS destination mapping, property injection extraction, or cross-bean reference tracing. Load this skill before writing dasel selectors against Spring bean XML files (applicationContext.xml, *_beans.xml, spring-*.xml).

関連スキル