一键导入
add-package
Scaffold a custom Nix package derivation — `perSystem.packages` entry + additions overlay registration as `pkgs.<name>`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffold a custom Nix package derivation — `perSystem.packages` entry + additions overlay registration as `pkgs.<name>`.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
After `nix flake update`, sync `input_rev` and `input_hash` metadata in all flake-input skill files to match new `flake.lock`.
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.
Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.
Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.
基于 SOC 职业分类
| name | add-package |
| description | Scaffold a custom Nix package derivation — `perSystem.packages` entry + additions overlay registration as `pkgs.<name>`. |
| metadata | {"when_to_use":"add package, new derivation, custom package, add pkg, scaffold package"} |
modules/packages/<name>.nix:{
perSystem = { pkgs, ... }: {
packages.<name> = pkgs.stdenv.mkDerivation {
pname = "<name>"; version = "<version>";
src = pkgs.fetchFromGitHub { owner = "<owner>"; repo = "<repo>"; rev = "<rev>"; hash = "<hash>"; };
};
};
}
additions overlay in modules/overlays.nix:additions = _: prev: withSystem prev.stdenv.hostPlatform.system (
{ config, ... }: { <name> = config.packages.<name>; }
);
perSystem.apps.<name> = { type = "app"; program = "${config.packages.<name>}/bin/<binary>"; };withSystem bridges perSystem (system-scoped) to overlay (cross-system) — forgetting it causes eval errorsconfig.packages.<name>, not pkgs.<name> (doesn't exist yet)pkgs.buildGoModule, pkgs.buildRustPackage, etc. for language-specific buildersmodifications overlay, not a custom packagenix build .#<name> && ls result/bin/