AGENT SKILL

universal-lint

User-invoked. Takes a free-text description of a set of files ("all files in src/", "files changed in PR 123", or an explicit list) and lints each of them exactly as this plugin's Write/Edit hook would — read-only, no autofix — printing one aggregated findings report. Self-contained: depends on no other plugin.

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

01 前言 Front Matter

name
universal-lint
description
User-invoked. Takes a free-text description of a set of files ("all files in src/", "files changed in PR 123", or an explicit list) and lints each of them exactly as this plugin's Write/Edit hook would — read-only, no autofix — printing one aggregated findings report. Self-contained: depends on no other plugin.
allowed-tools
[ "Glob", "Read", "Write", "AskUserQuestion", "Bash(git:*)", "Bash(gh:*)", "Bash(node:*)", "Bash(mktemp:*)" ]
argument-hint
[files description, e.g. 'all files in src/' or 'files changed in PR 123']
disable-model-invocation
true

02 资源文件 2

03 SKILL.md 正文

universal-lint

Lints every file you name — in natural language — exactly as this plugin's always-on Write/Edit hook would: each language's standard linter, read-only, findings only, never a change to any file. The whole trailing text of the command binds to $ARGUMENTS. Reuses the plugin's own tested hook logic through a colocated driver — no new linting logic, no other plugin.

Steps

  1. Resolve $ARGUMENTS into a concrete file list, deterministically, yourself:

    • an explicit list ("these files: a b c") → use the named paths as-is;
    • "all files in <folder-or-glob>" → in a git repo git -c core.quotePath=false ls-files --cached --others --exclude-standard -- <folder> (a glob goes in as ':(glob)<glob>'; paths come out cwd-relative, with no cap). Outside a repo use the Glob tool, which lists at most 100 files: when its result says it shows only part of the matches, split the pattern by subdirectory until no result is truncated — never pass a truncated list on;
    • "files changed in PR <N>" → run gh auth status first (it exits non-zero for both a missing PR and a dead token, so auth is checked before the diff), then gh pr diff <N> --name-only; the driver lints the working tree, not the PR, so compare gh pr view <N> --json headRefOid -q .headRefOid with git rev-parse HEAD: if they differ, stop and tell the user to run gh pr checkout <N> first (files the PR adds would be dropped and the rest linted at this checkout's version) — lint the local copies only if the user explicitly agrees;
    • "files changed on this branch / in the working tree" → git -c core.quotePath=false diff --relative --name-only <base>...HEAD or git -c core.quotePath=false status --porcelain --untracked-files=all (without core.quotePath=false git prints non-ASCII names as quoted octal escapes, which the driver drops as missing files; without --untracked-files=all git shows a new directory as one dir/ entry, whose files the driver never lints); a path git still wraps in double quotes (it contains a space, a quote, a backslash or a control character) must be unquoted before it goes into the list;
    • gh pr diff and git status --porcelain print repo-root-relative paths, but the driver resolves each path against the cwd: put $(git rev-parse --show-toplevel)/ in front of each of their paths (absolute) before writing the list;
    • empty or genuinely ambiguous $ARGUMENTS → ask with AskUserQuestion (offer 2-3 example scopes as options; the real answer arrives via "Other"). Never guess a scope.

    If a gh/git command fails (no auth, PR not found, not a repo), surface its own error and stop — do not run the driver on a partial or empty list.

  2. Announce the resolved list (count + paths) so the user sees what will be linted, then proceed. There is no confirmation gate — linting is read-only and was explicitly invoked.

  3. Read lint-files.reference.md (colocated) for the driver's invocation contract, per its table.

  4. Write the list to a temp file, then run the driver. Get a unique directory with mktemp -d (a directory, not a file: Write refuses to overwrite an existing file it has not read, and mktemp -u would bring back the create race), then use the Write tool to create <dir>/list.txt with one resolved path per line (the Write tool authors the file content, so no path text is ever interpolated into a shell command), then run:

    node ${CLAUDE_SKILL_DIR}/lint-files.mjs "<dir>/list.txt"
    

    ${CLAUDE_SKILL_DIR} is the bare pre-injection substitution token — never a live shell environment variable.

  5. Report the driver's printed findings report verbatim.

04 同仓库更多 Skills

kwitsch
kwitsch/claude-plugins-development

solve

Single entry point for any coding task (change, feature, refactor, bug). Triages the task through the jev-api tools and routes it to the right track, loading the phase references it needs. Flags --headless (the decider agent answers every question) and --size=<S|M|L|XL>. Use when the user hands over a task to implement or fix.

★ 0
kwitsch
kwitsch/claude-plugins-development

dprint

Runs dprint for the project. The first argument selects the action - init checks for the plugin's minimum dprint version, installs or updates dprint at user level after confirmation via AskUserQuestion, offers to create a dprint config when none exists and to add dprint plugins for file types the config does not cover; check [scope] runs dprint check; fmt [scope] runs dprint fmt and rewrites files; without an argument it runs fmt on the whole current directory. Use init when the user wants dprint set up, installed, updated, checked or its plugins completed; check when they want formatting verified with dprint; fmt only when they ask to format files with dprint. When invoking this skill yourself, always pass init, check or fmt as the first argument.

★ 0
kwitsch
kwitsch/claude-plugins-development

split-hooks-lib

Split the hooks module of a function-hooks plugin of this repository into a readable entry register.mts plus helper modules that the build bundles into one compressed plugin/hooks/lib.mjs, to keep the shipped size small. Use when the user asks to split a plugin's register.mts, to make a plugin smaller, to move a plugin to register.mjs plus lib.mjs, or when a hooks module has grown too large for one file.

★ 0
kwitsch
kwitsch/claude-plugins-development

__SKILL_NAME__

__SKILL_DESCRIPTION__ Use when the user asks to …

★ 0
kwitsch
kwitsch/claude-plugins-development

scaffold-plugin

Scaffold a new Claude Code plugin in this repository with the repo layout (<name>/package.json, plugin/, src/, tests/). Use when the user asks to create, add, scaffold or start a new plugin here.

★ 0
kwitsch
kwitsch/claude-plugins-development

refactor-plugin

Refactor one plugin of this repository end to end in a fresh worktree on its own branch cut from a freshly fetched origin/main - perf-worklist, then bughunt, then a merge-ready PR. Use when the user asks to refactor, overhaul or run the full performance and bug hunt pass on a plugin.

★ 0