upstream-audit

upstream-audit is a skill for Claude Code, Codex from Kihara777/NixKits. It costs 240 tokens per session (14,952 once invoked), scanned B, original, MIT.

A read-only audit workflow for deciding whether a self-built software package is ready to contribute to nixpkgs, a large collection of packages for the Nix operating system and package manager.

In plain words
What is it for?
Use it to distinguish a new package from a version update, inspect upstream requirements, run the permitted dry-run checks, build and test the result, and review the final diff.
Why use it?
It prevents submission mistakes by checking the current upstream rules, package status, licence evidence, dependencies, maintainer details, formatting, and the actual proposed changes before any write or submission action.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to distinguish a new package from a version update, inspect upstream requirements, run the permitted dry-run checks, build and test the result, and review the final diff.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kihara777/nixkits/upstream-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Kihara777/NixKits --skill upstream-audit
Clone the repo
git clone --depth 1 https://github.com/Kihara777/NixKits

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for upstream-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/kihara777/nixkits/upstream-audit/github.svg)](https://agentmods.dev/skills/kihara777/nixkits/upstream-audit)
Your own site
<a href="https://agentmods.dev/skills/kihara777/nixkits/upstream-audit"><img src="https://agentmods.dev/badge/skills/kihara777/nixkits/upstream-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for upstream-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/kihara777/nixkits/upstream-audit"><img src="https://agentmods.dev/badge/skills/kihara777/nixkits/upstream-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 240 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 14,952 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00240 $0.14952
Opus 5.5 $0.00096 $0.05981
Sonnet 5.5 $0.00048 $0.02990
Haiku 4.5 $0.00024 $0.01495

Measured today against content hash 9eed568b806e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

upstream-audit scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variablesmediumData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

env = os.environ.copy()

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/upstream-audit/SKILL.md · 992 lines

How it starts

The opening of the file, as written. The whole thing — 992 lines — stays where its author put it; the contents beside it link to each section on GitHub.

上游贡献审计(到 dry-run 为止)

本技能的边界:它只读。不 git push、不 gh pr create、不以任何人的名义评论或回复。 它回答的是「这个包能不能提交,证据是什么」,而不是替谁提交。

需要真正提交时,那些动作属于带授权与账号约束的那一层(本机是本机的一份私有预设 (不随本仓库分发)),不在这里。

顺序不能换:评估 → 审计 → dry-run。跳步的代价见陷阱清单。


第 0 步:先同步,再采信

任何「现在的 nixpkgs 是什么样」的结论,都要现取。

gh api repos/NixOS/nixpkgs/commits --jq '.[0].sha'   # 取 HEAD,写进你的报告

走过的坑:本地那份 nixpkgs 快照的 CONTRIBUTING.md 里没有 AI 政策一节, 而 upstream master 里有。凭快照下结论就会漏掉整条最关键的硬要求。 文档结构会漂移——doc/contributing/ 目录现在已不存在, 只剩一个跳转存根 doc/contributing.md。路径必须实测,不能凭记忆。

同时把基线写进报告:哪一刻、哪个 commit。这决定了你的结论什么时候过期。


第 0.5 步:先确定走哪条路(四条,别走错)

这一步放在评估之前 —— 因为你走的路决定了后面哪几节根本不用读, 也决定这次要不要动 maintainer-list.nix。

两个正交的轴:

全新添加(init) 版本更新(update)
首次贡献(名单里还没有你) ① 两个 commit:maintainers: add <handle><包名>: init at <版本>走全部评估与审计 ② 一个 commit:<包名>: <旧> -> <新>除非你想顺便加入名单,否则不动它
再次贡献(名单里已有你) ③ 一个 commit:<包名>: init at <版本>名单不要再动 ④ 一个 commit:<包名>: <旧> -> <新>最短路径

关键:维护者条目是一次性的

名单是「你是谁」的登记,不是「这次做了什么」的记录。 一旦 maintainers: add <handle> 被合并,以后每次贡献都不再碰这个文件 —— 再往列表里插一遍是重复登记,会与已合并的那条冲突。

判断方法(别靠记):

gh api "repos/NixOS/nixpkgs/contents/maintainers/maintainer-list.nix?ref=master" \
  -H 'Accept: application/vnd.github.raw' | grep -n '^  <你的handle> = {' \
  || echo "不在名单里 → 走首次贡献"

init 与 update 的差异不止 commit 标题

init update
可行性六问(§1) 必做 跳过——包已在树上,位置由既有文件决定
放哪(§2.1) 必做 跳过——文件已存在,只改里面的字段
meta 必填项(§2.2) 必做 只在顺手修 meta 时看
取源与 hash(§2.3) 要,且要选对 fetcher 要,但只换 hash 与 version
维护者条目 首次贡献要 不要
commit 标题 <包名>: init at <版本> <包名>: <旧> -> <新>
commit 正文 为什么需要这个包、特殊选择的理由 必须给 release notes / changelog 链接(pkgs/README.md 明写)
CI 自动构建 由包名前缀驱动 同左
版本语义变化时 — 文档要重写,不是机械替换(见姊妹技能 nix-flake-update-check)

最常见的一种走法:包是我们先提交上去的,之后自己跟版本。 那就是 ③④ 那一行 —— 一个 commit,名单不碰,比首次贡献少一半工序。 别把首次那套(评估 → 审计 → 双 commit)不假思索地重放一遍。

Read the full file on GitHub · 992 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +72 lines 9eed568b806e
  2. 3d ago First seen · 920 lines · 240 tokens per session scan B 30465ab475aa

Subscribe to this mod's changes

upstream-audit is a skill published in the GitHub repository Kihara777/NixKits (29 stars, last pushed yesterday), licensed MIT. It adds 240 tokens to every session and 14,952 once invoked, about $0.0010 per session on Opus 5.5. A static security scan graded it B with 1 finding (harvests environment variables). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-21.

Related

Other skills, from other repositories

add-session-recording

Add privacy-aware session recording and replay to React applications using the Temps SDK. Captures user interactions for playback while respecting privacy through input masking, element blocking, and GDPR-compliant consent flows. Use when the user wants to: (1) Add session recording to their app, (2) Implement session…

gotempsh/temps · 148 tokens

compliance-testing

Test for regulatory compliance: GDPR/CMP consent verification, Google Consent Mode v2, Global Privacy Control (GPC), CCPA/US state opt-out, EU AI Act Article 50 transparency, Better Ads Standards, and cookie-inventory auditing. Covers automated consent-flow testing, policy-based script blocking before consent, and…

petrkindlmann/qa-skills · 183 tokens

accessibility-testing

Test for WCAG 2.2 AA compliance with axe-core + Playwright, keyboard navigation audits, screen reader testing, ARIA pattern validation, and legal compliance mapping (ADA, EAA, Section 508). Automated tools catch 30-40% of issues — this skill covers automated and manual testing together. Use when: "accessibility,"…

petrkindlmann/qa-skills · 145 tokens

devops-expert

Expert-level DevOps practices, culture, automation, and continuous delivery. Use when the user mentions CI/CD, automation, infrastructure, or culture, or when the task involves DevOps Culture or Culture & Process.

personamanagmentlayer/pcl · 47 tokens

insurance-expert

Expert-level insurance systems, underwriting, claims processing, actuarial analysis, risk assessment, and insurtech solutions. Use when the user mentions underwriting, claims, actuarial, risk, or insurtech, or when the task involves Insurance Systems, Insurance Types, Standards and Regulations, or Claims Processing.

personamanagmentlayer/pcl · 65 tokens

standards-expert

Expert-level ISO standards, quality management, compliance, and certification. Use when the user mentions ISO standards, quality management, compliance, or certification, or when the task involves Compliance & Certification, Auditing, or Continuous Improvement.

personamanagmentlayer/pcl · 50 tokens