No slash command · from nix-tasuke
Nix writer functions (writeShellApplication, writeText, etc.) for generating scripts, text files, and data. Use when creating derivations that produce scripts or configuration files.
Ships in nix-tasuke. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
ファイルやスクリプトを生成するderivationを作るための関数群です。
Binサフィックスの違い多くのwriter関数には無印版とBinサフィックス版があります。
writeShellScript等)$outがファイルそのもの。
${myScript}でバイナリパスを直接参照できる。
Bin(writeShellScriptBin等):$out/bin/<name>にファイルを出力しmeta.mainProgramを設定する。
lib.getExe myPkgや${myPkg}/bin/<name>でパスを得る。
lib.getExeの使用を推奨します。
ファイルそのものではないので、
environment.systemPackagesやruntimeInputsに入れて$PATHに載せられます。
writeShellApplicationは名前にBinが付いていませんが$out/bin/<name>に出力するためBin系と同じ構造です。
pkgs.*)nixpkgs/pkgs/build-support/trivial-builders/default.nix に定義されています。
writeTextFile: 全テキスト系writerの基盤関数writeText name text: テキストファイルを生成writeTextDir path text: ディレクトリ構造付きでテキストファイルを生成writeScript name text / writeScriptBin name text: 実行可能スクリプト、シバンは手動で記述するwriteShellScript name text / writeShellScriptBin name text: シバン自動付与、構文チェックありwriteShellApplication: シェルスクリプト用の最高機能writerwriteCBin pname code: Cソースをコンパイルしてバイナリを生成concatTextFile: 複数ファイルを連結concatText name files: concatTextFileのラッパーconcatScript name files: 実行可能な連結ファイルを生成writeClosure paths: ランタイム依存クロージャのパス一覧を書き出すwriteDirectReferencesToFile path: 直接参照のパス一覧を書き出すwriteStringReferencesToFile string: 文字列コンテキストの依存パスを書き出すpkgs.writers.*)nixpkgs/pkgs/build-support/writers/scripts.nix
配下に定義されています。
各関数にBinサフィックス版があり、
$out/bin/に配置します。
makeScriptWriter: インタープリタ言語用スクリプトの基盤makeBinWriter: コンパイル言語用バイナリの基盤writeBash / writeBashBinwriteDash / writeDashBinwriteFish / writeFishBinwriteNu / writeNuBinwriteBabashka / writeBabashkaBinwriteGuile / writeGuileBinwriteJS / writeJSBinwriteLua / writeLuaBinwritePerl / writePerlBinwritePyPy2 / writePyPy2BinwritePyPy3 / writePyPy3BinwritePython3 / writePython3BinwriteRuby / writeRubyBinwriteFSharp / writeFSharpBinwriteHaskell / writeHaskellBinwriteNim / writeNimBinwriteRust / writeRustBinnixpkgs/pkgs/build-support/writers/data.nix に定義されています。
writeJSON name data: Nixの値をJSONファイルとして書き出すwriteTOML name data: Nixの値をTOMLファイルとして書き出すwriteYAML name data: Nixの値をYAMLファイルとして書き出すwriteShellApplicationを優先する理由シェルスクリプトを書く場合はwriteShellApplicationを優先的に使用します。
writeShellApplication {
name = "my-script";
runtimeInputs = with pkgs; [ curl jq ];
text = ''
response=$(curl -s "https://api.example.com/data")
echo "$response" | jq '.items[]'
'';
}
writeShellScript/writeShellScriptBinと比較した利点:
set -o errexit, set -o nounset, set -o pipefailが自動適用されること。
いわゆるset -euo pipefailがデフォルトで有効になります。
bashOptionsで制御可能です。runtimeInputsでPATH管理ができ、実行時依存が明示的になるruntimeEnvで環境変数を設定できるWhat SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
6 skills in this plugin
/naming-conventionNix naming conventions for files, variables, packages, and NixOS options based on nixpkgs official coding standards. Use when writing or reviewing Nix code./nix-commandNix CLI command guidelines. Use new unified CLI (nix subcommand) instead of legacy commands (nix-build, nix-env, nix-shell, etc.). Use when running or suggesting Nix commands./nix-fast-buildnix-fast-build command reference. Parallel Nix evaluation and build tool using nix-eval-jobs. Use when running or configuring nix-fast-build./nix-store-scanNever scan /nix/store without limits, such as shell wildcard/glob expansion or recursive search over the whole store, because it contains hundreds of thousands of entries and can crash the agent process via OOM. Resolve the exact store path with nix commands first and operate scoped to that single path, or cap depth and result count like fd --max-depth 1 --max-results. Use when searching, listing, or accessing files under /nix/store./treefmttreefmt-nix and nix fmt guide. Unified formatting and linting with treefmt. Use when configuring or running nix fmt, treefmt, or adding formatters/linters to a Nix project.npx claudepluginhub ncaq/konoka --plugin nix-tasuke