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
- 脚本lint-files.mjs812 B
- 参考文档lint-files.reference.md2.9 KB
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
-
Resolve
$ARGUMENTSinto 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 theGlobtool, 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 statusfirst (it exits non-zero for both a missing PR and a dead token, so auth is checked before the diff), thengh pr diff <N> --name-only; the driver lints the working tree, not the PR, so comparegh pr view <N> --json headRefOid -q .headRefOidwithgit rev-parse HEAD: if they differ, stop and tell the user to rungh 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>...HEADorgit -c core.quotePath=false status --porcelain --untracked-files=all(withoutcore.quotePath=falsegit prints non-ASCII names as quoted octal escapes, which the driver drops as missing files; without--untracked-files=allgit shows a new directory as onedir/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 diffandgit status --porcelainprint 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 withAskUserQuestion(offer 2-3 example scopes as options; the real answer arrives via "Other"). Never guess a scope.
If a
gh/gitcommand 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. -
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.
-
Read
lint-files.reference.md(colocated) for the driver's invocation contract, per its table. -
Write the list to a temp file, then run the driver. Get a unique directory with
mktemp -d(a directory, not a file:Writerefuses to overwrite an existing file it has not read, andmktemp -uwould bring back the create race), then use theWritetool to create<dir>/list.txtwith one resolved path per line (theWritetool 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. -
Report the driver's printed findings report verbatim.
04 同仓库更多 Skills
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.
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.
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.
__SKILL_NAME__
__SKILL_DESCRIPTION__ Use when the user asks to …
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.
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.