Token导航 LogoToken导航TokenDH.com
研究检索执行命令github未标认证来源可访问clear审计提醒

checking-files-with-lsp使用 lsp 检查文件

Agent Skill

checking-files-with-lsp 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,048

周安装

45

GitHub Stars

52

下载量

367
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:checking-files-with-lsp(使用 lsp 检查文件)
来源仓库:https://github.com/zenobi-us/dotfiles
仓库路径:skills/checking-files-with-lsp
安装命令:
npx skills add https://github.com/zenobi-us/dotfiles --skill checking-files-with-lsp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/zenobi-us/dotfiles --skill checking-files-with-lsp

简介

checking-files-with-lsp 用于根据文件类型自动选择语言服务器或 linter 工具进行代码校验,适合在 Codex、Claude、Cursor、Gemini CLI 中需要系统性验证语法、类型或风格问题时使用。

  • 适用于配置文件和代码文件的自动化质量检测,支持多语言智能匹配。
  • 核心能力是工具发现、选择与执行的一体化流程,避免人工干预。
  • 安装命令为 npx skills add https://github.com/zenobi-us/dotfiles --skill checking-files-with-lsp。
  • 使用前需确认 mise 工具已安装可用 LSP/linter 服务且项目目录可访问。

SKILL.md

Checking Files With LSP

Overview

When you need to validate, check, or understand a file's structure or code quality, use language servers and linters to do it systematically. This skill provides a reliable workflow: detect the file type, search mise for available LSP/linter tools, intelligently choose one, and run the check.

Core principle: Let the appropriate tool for the language do the validation work, not manual inspection. Automate tool discovery and selection.

When to Use

Use this skill when:

  • Checking code files for syntax errors, type issues, or style problems
  • Validating configuration files (YAML, TOML, JSON, KDL, etc.)
  • Understanding code structure or quality of unfamiliar files
  • Verifying Markdown files for formatting/link issues
  • Need to quickly understand what problems exist in a file

Don't use when:

  • Just reading a file to understand its contents (no validation needed)
  • Running full test suites (that's testing, not validation)
  • Analyzing code behavior (that's debugging, not validation)

The Workflow

Step 1: Detect File Type

Determine the language/type from file extension:

.lua     → lua
.ts/.tsx → typescript
.py      → python
.go      → go
.rs      → rust
.md      → markdown
.json    → json
.yaml    → yaml
.toml    → toml
.kdl     → kdl

If extension is unclear or missing, inspect file shebang or content patterns.

Step 2: Search Mise for LSP/Linters

Run: mise search <filetype>

This returns all available language servers, linters, and formatters for that language.

Example outputs:

mise search lua
lua-language-server    (most popular)
stylua                 (formatter)

mise search python
pyright
pylance
python-language-server
black
ruff

Step 3: Make Smart Selection

Prioritize by tool type: Language Server (LSP) > Linter > Formatter

LSPs provide the most comprehensive validation. Linters catch style/quality issues. Formatters are secondary for validation purposes.

If ONE obvious choice exists:

  • Auto-select it (e.g., only lua-language-server for Lua)
  • Verify installation: mise list | grep <tool> (if not listed, install it)
  • Install: mise install lua-language-server
  • Run it on the file

If MULTIPLE choices exist:

  • Filter by priority: Show LSPs first, linters second, skip formatters
  • Rank by popularity: Most-used tools first (measured by GitHub stars, then npm/PyPI downloads as tiebreaker)
  • Show ranked list to user (with tool type and brief descriptions)
  • Let user pick by number/letter
  • Verify and install selected tool
  • Run it on the file

If NO tools found:

  • Inform user explicitly: "No LSP/linter available in mise for [filetype]"
  • Suggest alternatives in order:

1. Check online package managers (npm, PyPI, cargo, etc.) if not in mise 2. Look for generic validators (jq for JSON, yamllint for YAML, etc.) 3. Basic syntax checking (built-in language checkers) 4. Manual validation with structured guidance

  • Offer: "Would you like me to help install from another source?"

Step 4: Run Validation

Execute the selected tool against the file and return results: errors, warnings, style issues, and suggestions.

Quick Reference

TaskAction
Detect file typeUse file extension as primary signal
Find toolsmise search <filetype>
Install obvious choicemise install <tool> (auto-selected)
Show optionsPresent ranked list for user choice
Run validationExecute tool with file path

Common Mistakes

Mistake: Skip file type detection

  • Wrong: "It's a code file, any language server works"
  • Right: File type determines which LSP applies. Wrong LSP = wrong errors

Mistake: Pick random LSP when multiple exist

  • Wrong: "I'll just try the first one" or "They're all the same"
  • Right: Different LSPs check different aspects. Use ranking: most popular > less common. Filter by type: LSP > Linter > Formatter
  • No exceptions: You must present options to user when multiple exist, not guess

Mistake: Assume LSP is installed

  • Wrong: "Let me just run lua-language-server..."
  • Right: Always verify with mise search first. Check mise list before installing. Install if needed

Mistake: Don't check system requirements

  • Wrong: "Install the LSP and it'll work"
  • Right: Some LSPs need runtime dependencies (Python, Node, etc.). Test LSP runs before reporting results

Mistake: When LSP unavailable, give up

  • Wrong: "No tool for this language, can't validate"
  • Right: Explore alternatives in order: online package managers → generic validators → syntax checking → manual guidance

Mistake: Mixing tool categories

  • Wrong: Showing formatters and linters equally for validation
  • Right: Prioritize LSP > Linter > Formatter. Use tool type as first filter

Fallback Validation Options

When LSP/linter not available in mise:

  1. Check online package managers (npm, PyPI, cargo, etc.) if not in mise
  2. Look for generic validators - JSON validators, YAML checkers work across projects
  3. Basic syntax checking - Some languages have built-in syntax checkers
  4. Manual validation - Provide structured review guidance
  5. Suggest installation - "Would you like me to help install from another source?"

Implementation Steps

When helping a user check a file:

  1. Ask or determine: "What file are we checking?"
  2. Detect the file type from extension
  3. Run: mise search <filetype>
  4. Decide: obvious choice or show ranked options?
  5. Verify installation: mise list | grep <tool> (check if already installed)
  6. Install if needed: mise install <selected-tool>
  7. Test tool runs: Verify LSP/linter executes without errors
  8. Run: Execute tool against file with appropriate flags
  9. Report: Show user the validation results
  10. Offer next steps: "Fix these issues?" or "Run checks again?"

Troubleshooting

Tool installs but won't run:

  • Some LSPs need runtime dependencies (Python for some tools, Node for others)
  • Check LSP documentation for runtime requirements
  • Example: python-language-server needs Python installed
  • Verify with: mise exec <tool> -- <tool> --version

Mise search returns no results:

  • Language might not be in mise database
  • Try alternative package managers: npm (JavaScript), PyPI (Python), cargo (Rust)
  • Or use generic validators: jq (JSON), yamllint (YAML)

LSP finds errors but tool isn't right for the job:

  • Wrong tool selected (formatter instead of LSP)
  • Go back to Step 3, filter by type priority (LSP > Linter)
  • Ask user to pick a different option from the list

File has unusual extension:

  • Use file content inspection (shebang, headers) as fallback
  • Example: Executable shell scripts often lack .sh extension
  • Check content to confirm type before searching mise

Real-World Impact

  • Fast validation: No manual code review for common issues
  • Consistent checking: Same tool, same criteria, every time
  • Discovery: Find issues you'd miss with manual inspection
  • Automation: Can be integrated into workflows, CI/CD, pre-commit hooks
  • Language agnostic: Same pattern works for any language with an LSP available

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenCode

30.92%
按下载量换算113

Claude Code

24.55%
按下载量换算90

Antigravity

19.19%
按下载量换算70

Gemini CLI

11.75%
按下载量换算43

moltbot

7.19%
按下载量换算26

windsurf

3.07%
按下载量换算11

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/zenobi-us/dotfiles --skill checking-files-with-lsp;npx skills add zenobi-us/dotfiles --skill "checking-files-with-lsp" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills