Token导航 LogoToken导航

Agent Skill · 开发规范

nixos-best-practices(尼克斯最佳实践)

nixos-best-practices 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

nixos-best-practices 是开发规范类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证为 MIT,第三方扫描有提醒项,按安装量在开发规范类的 1,265 个 Skill 里排第 372。

总安装 2,350周安装 96GitHub Stars 2下载 760核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/lihaoze123/my-skills --skill nixos-best-practices

这个 Skill 是做什么的

开发规范类 Skill 用来统一代码风格、目录结构和评审口径,产出多为检查清单或改写建议。

nixos-best-practices 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中整理仓库状态与协作事项。适用于围绕代码变更、项目进度或团队协作进行信息梳理的场景。

通过 npx skills add 命令从 GitHub 仓库安装,需确认权限与维护状态。使用前应核实是否会触发联网、命令执行或文件读写操作。建议结合原始 README 和仓库路径进一步了解具体功能与限制。

来源仓库内路径:skills/nixos-best-practices

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/lihaoze123/my-skills --skill nixos-best-practi…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

nixos-best-practices 怎么安装?

在终端执行 npx skills add https://github.com/lihaoze123/my-skills --skill nixos-best-practices。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

nixos-best-practices 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

nixos-best-practices 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

nixos-best-practices 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

nixos-best-practices 用的人多吗?

公开数据是累计安装 2,350 次,近一周安装 96 次,下载 760 次,GitHub 2 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

nixos-best-practices 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发规范类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发规范类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
vercel-react-best-practices

Vercel React 最佳实践 · Codex、Claude

8,490,72025,918操作浏览器MIT通过
web-design-guidelines

网页设计指南 · Codex、Claude

6,686,01625,885需要联网MIT有提醒
remotion-best-practices

Remotion 最佳实践 · Codex、Claude

6,505,6323,027操作浏览器MIT有提醒
supabase-postgres-best-practices

Supabase Postgres 最佳实践 · Codex、Claude

3,175,5232,030需要联网MIT通过
next-best-practices

Next.js 最佳实践 · Codex、Claude

1,848,240841操作浏览器MIT通过
nixos-best-practices

尼克斯最佳实践 · 本页

2,3502只读MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Configuring NixOS Systems with Flakes

Configure NixOS systems with flakes, manage overlays properly, and structure configurations for maintainability.

⚠️ CRITICAL: Read Before Making Changes

BEFORE making ANY NixOS configuration changes, you MUST:

  1. Review relevant rule files from the Quick Reference below
  2. Check common-mistakes.md to avoid known pitfalls
  3. Check troubleshooting.md for systematic debugging approach
  4. Follow existing patterns in the codebase

Do NOT start coding until you've read the applicable documentation.

Most configuration errors happen from not reading the rules first. The 5 minutes you spend reading will save hours of debugging.

Red Flags - STOP BEFORE CODING

  • "I can just try this option" → Check if it exists in nixpkgs/Home Manager first
  • "Let me experiment with different approaches" → Read the docs, don't guess
  • "This should work" → Verify syntax and availability in nixpkgs
  • Making multiple rebuild attempts → You're missing systematic debugging
  • "I remember this works" → Docs change, verify current approach

Core Principle

Understand the interaction between NixOS system configuration and Home Manager overlays.

When useGlobalPkgs = true, overlays must be defined at the NixOS configuration level, not in Home Manager configuration files.

When to Use

  • Configuring NixOS with flakes and Home Manager
  • Adding overlays that don't seem to apply
  • Using useGlobalPkgs = true with custom overlays
  • Structuring NixOS configurations across multiple hosts
  • Package changes not appearing after rebuild
  • Confused about where to define overlays

Don't use for:

  • Packaging new software (use nix-packaging-best-practices)
  • Simple package installation without overlays
  • NixOS module development (see NixOS module documentation)

Quick Reference

TopicRule File
Overlay scope and useGlobalPkgsoverlay-scope
Flakes configuration structureflakes-structure
Host configuration organizationhost-organization
Package installation best practicespackage-installation
Common configuration mistakescommon-mistakes
Debugging configuration issuestroubleshooting

Essential Pattern: Overlay with useGlobalPkgs

# ❌ WRONG: Overlay in home.nix (doesn't apply)
# home-manager/home.nix
{
  nixpkgs.overlays = [ inputs.claude-code.overlays.default ];  # Ignored!
  home.packages = with pkgs; [ claude-code ];  # Not found!
}

# ✅ CORRECT: Overlay in NixOS home-manager block
# hosts/home/default.nix
{
  home-manager.useGlobalPkgs = true;
  home-manager.useUserPackages = true;
  home-manager.users.chumeng = import ./home.nix;
  home-manager.extraSpecialArgs = { inherit inputs pkgs-stable system; };
  # Overlay must be HERE when useGlobalPkgs = true
  nixpkgs.overlays = [ inputs.claude-code.overlays.default ];
}

Common Tasks

TaskSolution
Add flake inputAdd to inputs in flake.nix
Add overlay for system packagesDefine in nixpkgs.overlays in system configuration
Add overlay for home-manager (useGlobalPkgs=true)Define in home-manager.nixpkgs.overlays in host config
Add overlay for home-manager (useGlobalPkgs=false)Define in home.nix with nixpkgs.overlays
Pass inputs to modulesUse specialArgs in nixosSystem or home-manager
Multiple host configurationsCreate separate host files in hosts/
Shared configuration modulesCreate modules in modules/ and import in each host
Package not found after overlayCheck overlay scope vs useGlobalPkgs setting

Overlay Scope Decision Matrix

useGlobalPkgsOverlay Definition LocationAffects
truehome-manager.nixpkgs.overlaysSystem + Home Manager packages
truehome.nix with nixpkgs.overlaysNothing (ignored!)
falsehome.nix with nixpkgs.overlaysHome Manager packages only
falsehome-manager.nixpkgs.overlaysHome Manager packages only
AnySystem nixpkgs.overlaysSystem packages only

Configuration Layers (Bottom to Top)

  1. System configuration (/etc/nixos/configuration.nix or host files)

- System-wide services - System packages - System overlays only affect this layer

  1. Home Manager (useGlobalPkgs=true)

- Uses system pkgs (includes system overlays) - Home Manager overlays affect both system and user packages - Most efficient for single-user systems

  1. Home Manager (useGlobalPkgs=false)

- Creates separate pkgs instance - Home Manager overlays affect user packages only - Useful for multi-user systems with different needs

Red Flags - STOP

  • "Overlay in home.nix isn't working" → Check if useGlobalPkgs=true, move to host config
  • "I'll just add overlays everywhere" → Define once at appropriate scope
  • "Package works in nix repl but not installed" → Check overlay scope
  • "Changes don't apply after rebuild" → Verify overlay is in correct location
  • "useGlobalPkgs=false for no reason" → Use true unless you need separate package sets

How to Use

Read individual rule files for detailed explanations and code examples:

rules/overlay-scope.md       # The core overlay scope issue
rules/flakes-structure.md    # How to organize flake.nix
rules/host-organization.md   # How to structure host configs
rules/common-mistakes.md     # Pitfalls and how to avoid them

Each rule file contains:

  • Brief explanation of why it matters
  • Incorrect code example with explanation
  • Correct code example with explanation
  • Additional context and references

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

平台分布

OpenCode

27.14%
按下载量换算206

Gemini CLI

19.16%
按下载量换算146

Claude Code

17.71%
按下载量换算135

Cursor

12.9%
按下载量换算98

Antigravity

7.82%
按下载量换算59

windsurf

3.49%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills