AGENT SKILL

audit-package-version

Audit dependency manifests for non-exact versions — flag ^, ~, ranges, wildcards, and 'latest'; require exact pins (e.g. 9.17.0, not ^9.17.0). Covers npm (package.json) and .NET (.csproj).

License 许可
MIT
最近更新
2026-11-12
Stars
★ 0
Forks
0

01 前言 Front Matter

name
audit-package-version
tags
[ "dependencies", "versioning", "quality", "audit", "npm", "dotnet" ]
type
skill
agents
[ "claude", "codex", "cursor", "gemini", "copilot" ]
author
Aliendreamer
version
0.1.0
description
Audit dependency manifests for non-exact versions — flag ^, ~, ranges, wildcards, and 'latest'; require exact pins (e.g. 9.17.0, not ^9.17.0). Covers npm (package.json) and .NET (.csproj).
user-invocable
true
disable-model-invocation
false

03 SKILL.md 正文

Audit Package Versions (exact pins only)

Overview

Enforce exact dependency versions everywhere: 9.17.0, never ^9.17.0, ~9.17.0, >=9.17.0, 9.*, or latest. Exact pins make installs reproducible and remove silent minor/patch drift. Run each check from the repo root, report PASS or FLAG per check, and fix every FLAG.

Input: the manifests to audit. If omitted, audit every package.json and *.csproj in the repo (excluding node_modules).

When to use

  • After adding or bumping any dependency (mandatory quality gate).
  • Before committing changes to package.json, *.csproj, or lockfiles.
  • When reviewing a PR that touches dependencies.

Checks

1. npm — no range specifiers in package.json

Every value under dependencies, devDependencies, peerDependencies, and optionalDependencies must be a single exact version. FLAG any ^, ~, >, <, >=, <=, ||, an x/* wildcard, a hyphen range, or a latest/next dist-tag. The workspace: and catalog: protocols are allowed (they are not version ranges).

# FLAG: a caret/tilde/range/wildcard at the start of any version value
grep -rnoE '"[^"]+":[[:space:]]*"[\^~><*]' --include=package.json . | grep -v node_modules

PASS when every value reads like "react": "19.2.7".

2. npm — pin new installs by default

.npmrc should set save-exact=true (and an empty save-prefix=) so npm install <pkg> writes an exact version instead of a caret range.

grep -q '^save-exact=true' .npmrc && echo PASS || echo "FLAG: add save-exact=true to .npmrc"

3. .NET — no floating PackageReference versions

Every <PackageReference> must use an exact Version. FLAG floating notations: a * wildcard (9.*, 9.0.*), a version range bracket ([9.0,), (,10.0)), or a missing Version attribute.

grep -rnoE 'PackageReference[^>]*Version="[^"]*[*,()[]][^"]*"' --include=*.csproj .

PASS when every reference reads like Version="9.17.0".

4. .NET — central package versions are also exact

If central package management is used (Directory.Packages.props), every <PackageVersion> must be exact too — the same rule as check 3.

grep -rnoE 'PackageVersion[^>]*Version="[^"]*[*,()[]][^"]*"' --include=Directory.Packages.props .

Common mistakes

Mistake Fix
"eslint": "^9.17.0" "eslint": "9.17.0"
"typescript": "~5.7.2" "typescript": "5.7.2"
npm install x adds a caret set save-exact=true in .npmrc
Version="9.*" in a .csproj Version="9.17.0"
Flagging workspace:* allowed — workspace/catalog protocols are not version ranges

04 同仓库更多 Skills

Aliendreamer
Aliendreamer/ai.skills

setup-git-credentials

Use when the user wants Git to stop using a PAT in the remote URL or a plain-text credential store, wants Git Credential Manager (GCM) with OAuth for GitHub, GitLab or Azure DevOps on Ubuntu/Debian or WSL2, or sees 'cannot persist Microsoft authentication token cache securely' / 'using plain-text fallback token cache'. Asks whether this is WSL, which Git hosts and which parts to set up, checks what is already done, sets git config itself after confirmation and hands every sudo or interactive step (apt, gpg, pass init, secret-tool, first sign-in) to the user. Bundles gcm-keyring-session.sh to start or reuse a D-Bus + GNOME Keyring session without systemd. Trigger terms - git credentials, PAT in URL, token in remote, git credential manager, gcm, github auth, gitlab auth, azure devops auth, pass, gpg store, secret service, gnome keyring, msal token cache, wsl git auth.

★ 0
Aliendreamer
Aliendreamer/ai.skills

setup-flow

Use when onboarding a repository or agent to the standard development workflow — installs the required skills from the ai.skills store, installs or updates a MANDATORY workflow block in the agent's instruction file (CLAUDE.md, AGENTS.md, GEMINI.md, Copilot or Cursor rules), AND configures .claude/settings.json with Serena MCP, sandbox, permissions, hooks, and plugins. Hooks are wired to the context-hooks kit, which speaks once per session instead of injecting text on every turn; re-running replaces earlier inline hooks rather than adding to them. Also writes .vscode/settings.json to hide the empty shell dotfiles an agent sandbox leaves in the repo root. Use when setting up a new repo, switching agents, or refreshing the workflow rules.

★ 0
Aliendreamer
Aliendreamer/ai.skills

developer-flow

Use when starting, implementing, or completing any feature, change, or fix in any software project — at feature start, before writing code, and before claiming a change is done, fixed, working, or green. A strict ordered flow with a gate per phase; stack-agnostic and repo-agnostic (OpenSpec optional, gates discovered).

★ 0
Aliendreamer
Aliendreamer/ai.skills

daily-log-check

Use to check whether everyone on duty filed their Azure DevOps time-log Tasks for a given day, per platform — reports tickets, hours and activities per person against the headcount you give. Fires on "did everyone log yesterday", "check web 4 mobile 3", "who is missing for 8.09", "daily log check". Read-only. Org and project come from configuration.

★ 0
Aliendreamer
Aliendreamer/ai.skills

daily-activity-log

Use at end of day to file the Azure DevOps time-log Tasks — one closed Task per Activity worked that day, Original Estimate in decimal hours, parented to the current sprint's Feature. Fires on "log my day", "fill my tasks", "close my daily tasks", "I had 2h meetings and 4h development". Org and project come from configuration.

★ 0
Aliendreamer
Aliendreamer/ai.skills

conventional-commits

Write commit messages that follow the Conventional Commits specification so tooling can derive versions and changelogs.

★ 0