Skip to content
Agentmart
Submit a tool

nih-audit

Scan a codebase for custom code that duplicates what open-source libraries already do, then recommend which libraries to adopt.

Skill by paulnsorensen

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/paulnsorensen-nih-audit

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Scan a codebase for custom code that duplicates what open-source libraries already do, then recommend which libraries to adopt. Detects hand-rolled utility functions, custom retry logic, manual validation, DIY date handling, home-grown argument parsers, and other reinvented wheels. Cross-checks against installed dependencies and open specs. Returns scored migration recommendations with effort estimates. Use when the user mentions reinventing the wheel, asks if there is a library for something they built, wants a build-vs-buy audit, asks "should we just use lodash for this", or wants to find dependency opportunities.

Use cases: security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/nih-audit

What's inside

Skill name
nih-audit
Description
Scan a codebase for custom code that duplicates what open-source libraries already do, then recommend which libraries to adopt. Detects hand-rolled utility functions, custom retry logic, manual validation, DIY date handling, home-grown argument parsers, and other reinvented wheels. Cross-checks against installed dependencies and open specs. Returns scored migration recommendations with effort estimates. Use when the user mentions reinventing the wheel, asks if there is a library for something they built, wants a build-vs-buy audit, asks "should we just use lodash for this", or wants to find dependency opportunities.
License
MIT
Compatibility
Requires tilth MCP for AST-aware search. Library discovery delegates to /research; if /research is unavailable, the audit reports candidates without library recommendations.
Metadata
owner: cheese-flow · category: review
Instructions
233 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • allowed-tools: must be a space-separated string

Files (3)

  • SKILL.md
  • categories.md · references/
  • finding-template.md · references/

SKILL.md (first lines)

# NIH Audit — Not Invented Here

Find code reinventing the wheel. Recommend libraries. Score with evidence.

`/nih-audit [scope]` — `scope` defaults to repo root.

## Phase 0 — Manifest discovery (no LLM)

Find dependency manifests anywhere in scope, excluding `node_modules/`,
`vendor/`, `.git/`, build artefacts:

- `package.json`, `Cargo.toml`, `pyproject.toml`, `go.mod`, `Gemfile`,
  `requirements.txt`, `composer.json`, `build.gradle`, `pom.xml`, `mix.exs`.

Extract dependency names per ecosystem:

| Manifest | Extract |
|----------|---------|
| `package.json` | `jq -r '(.dependencies + .devDependencies) // {} \| keys[]'` |
| `Cargo.toml` | parse `[dependencies]` table |
| `pyproject.toml` | `[project.dependencies]` or `[tool.poetry.dependencies]` |
| `go.mod` | `require` block module paths |
| `requirements.txt` | line-by-line package names |

Build a `depManifest`:

```json
{
  "workspaces": [
    { "root": ".", "ecosystem": "node", "deps": ["express", "zod"] }
  ],
  "primaryLanguages": ["typescript"]
}
```

If no manifest is found anywhere in scope, abort with a clear message —
without an installed-deps list there is nothing to cross-reference.

## Phase 1 — Structural NIH scan

Spawn the `nih-scanner` sub-agent:

```
inputs:
  languages   = primaryLanguages from Phase 0
  scope       = $ARGUMENTS or repo root
  depManifest = JSON from Phase 0
  slug        = <derived slug>
```

The scanner returns a JSON candidate list inline plus a one-paragraph
summary. Parse the candidates from the response. If 0 candidates, report
clean and stop.

## Phase 2 — Library discovery (parallel, /research)

Group candidates by `category` (RETRY, UUID, VALIDATION, DATE, DEBOUNCE,
CLONE, ARGPARSE, STRING, HTTP, SERIALIZATION, ERROR, CRYPTO, SECURITY,
FORMAT, COMPARE).

For each category, dispatch `/research` with a focused question shape:

```
/research "best <category> library for <language>; must be MIT/Apache/BSD;
list weekly downloads or crates.io downloads, GitHub stars, last commit
date, contributor count; flag if functionality is in the standard library"
```

Cap: max 5 parallel research dispatches. If `/research` is unavailable,
emit candidates with `recommendation: null` and a note.

For each library returned, capture:

- name + latest version
- license (flag GPL; prefer MIT/Apache-2.0/BSD)
- weekly/monthly download count
- GitHub stars, last commit date, contributor count
- whether it is stdlib, micro-library, or framework
- one-sentence API example showing replacement shape

Drop recommendations whose name is already in `depManifest`. Stdlib
alternatives (no new dep) are the highest-value class — keep them
prioritized.

See `references/categories.md` for the canonical category-to-library map.

## Phase 3 — Spec and intent alignment

Find spec directories within scope: `**/specs/*.md`, `.cheese/specs/*.md`.
Filter out `node_modules/`, `vendor/`, `.git/`.

For each candidate, look for signals that the NIH choice was deliberate:

- **In specs**: keywords like "intentionally", "we chose to build", "build
  vs buy", "don't use", "avoid dependency on" near the candidate's concept.
- **In the candidate file**: comments like `intentionally`, `deliberately`,
  `we chose`, `NOTE:`, `DECISION:`, `instead of`, `rather than`.

Apply scoring modifiers:

| Signal | Modifier |
|--------|----------|
| Spec explicitly chose NIH | -30 |
| Code comment explains NIH choice | -20 |
| Library covers planned spec features | +10 |

## Phase 4a — Score

For every candidate with a library recommendation, run the 4-step
confidence chain:

### Step 1 — classify finding type

| Type | Base | Cap |
|------|------|-----|
| `REPLACE_WITH_STDLIB` | 55 | 100 |
| `REPLACE_WITH_MICRO_LIB` | 45 | 95 |
| `REPLACE_WITH_FRAMEWORK` | 35 | 85 |
| `EXTRACT_TO_EXISTING_DEP` | 50 | 95 |

From paulnsorensen/cheese-flow, MIT.

More from paulnsorensen/cheese-flow

Signals

Stars
1
Forks
1
Open issues
25
Last commit (this folder)
May 2, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from paulnsorensen

Cite this page

nih-audit skill. Agent Mart. https://agentmart.dev/skills/paulnsorensen-nih-audit (last updated 2026-10-24)