Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计提醒

nix-flakes尼克斯片

Agent Skill

nix-flakes 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,236

周安装

50

GitHub Stars

40

下载量

388
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:nix-flakes(尼克斯片)
来源仓库:https://github.com/knoopx/pi
仓库路径:skills/nix-flakes
安装命令:
npx skills add https://github.com/knoopx/pi --skill nix-flakes
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/knoopx/pi --skill nix-flakes

简介

nix-flakes 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于关键词搜索、任务场景匹配或来源线索筛选等研究检索场景。
  • 通过 npx skills add 命令从 GitHub 仓库安装,需确认权限与维护状态。
  • 使用前应核实是否会触发联网、命令执行或文件读写操作。
  • 建议结合原始 README 和仓库路径进一步了解具体功能与限制。

SKILL.md

Nix Flakes

Modern Nix project management with hermeticity and reproducibility through flake.lock.

Core Commands

Project Management

# Initialize a new flake in the current directory
nix flake init

# Create a new flake from template
nix flake new hello -t templates#hello

# Update flake.lock (updates all inputs)
nix flake update

# Update specific input only
nix flake update nixpkgs

# Lock without updating (create missing entries)
nix flake lock

# Check flake for syntax and common errors
nix flake check

# Show flake outputs
nix flake show

# Show flake metadata (inputs, revisions)
nix flake metadata path:.
nix flake info path:.  # Alias for metadata

# Prefetch flake and inputs into store
nix flake prefetch github:NixOS/nixpkgs
nix flake prefetch-inputs path:.

# Clone flake repository
nix flake clone nixpkgs --dest ./nixpkgs

Running and Building

Always prefix local flake paths with path: (e.g., path:.) to ensure Nix uses all files in the directory without requiring them to be staged in Git.

# Build the default package
nix build path:.

# Build a specific output
nix build path:.#packageName

# Run the default app
nix run path:.

# Run a specific app from a flake
nix run path:.#appName

# Run an app from a remote flake
nix run github:numtide/treefmt

Development Environments

In a headless environment, use nix develop with --command to run tasks within the environment.

# Run a command inside the devShell
nix develop path:. --command make build

# Check if current environment matches devShell
nix develop path:. --command env

Flake Structure (flake.nix)

A basic flake.nix pattern:

{
  description = "A basic flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
  };

  outputs = { self, nixpkgs }:
    let
      system = "x86_64-linux";
      pkgs = nixpkgs.legacyPackages.${system};
    in {
      packages.${system}.default = pkgs.hello;

      devShells.${system}.default = pkgs.mkShell {
        buildInputs = [ pkgs.git pkgs.vim ];
      };
    };
}

Best Practices

  • Locking: Manage the flake.lock file to ensure reproducibility.
  • Purity: Flakes are "pure" by default. They cannot access files outside the flake directory unless they are tracked (e.g. in the git tree if using git).
  • Non-Interactive: When using nix develop, always use the --command flag to ensure scripts remain non-interactive.

Debugging Flakes

# Inspect inputs
nix flake metadata path:.

# Evaluate a specific output
nix eval path:.#packages.x86_64-linux.default.name

Related Skills

  • nix: Run applications without installation and create development environments using Nix.
  • nh: Manage NixOS and Home Manager operations with improved output using nh.

Related Tools

  • search-nix-packages: Search for packages available in the NixOS package repository when working with flakes.
  • search-nix-options: Find configuration options available in NixOS for flake configurations.
  • search-home-manager-options: Find configuration options for Home Manager in flake setups.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

25.78%
按下载量换算100

OpenCode

21.01%
按下载量换算82

Codex

19.48%
按下载量换算76

Antigravity

13.19%
按下载量换算51

Gemini CLI

7.31%
按下载量换算28

windsurf

3.4%
按下载量换算13

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills