Task Router Skill
Task Router
Python code quality checking and LSP integration using pylsp. Provides code diagnostics, completion, hover tips, and style analysis. Use when: checking Python errors/warnings, getting code completions, viewing function signatures, analyzing code quality, or fixing style issues.
Suivez les instructions du dépôt pour votre agent. Consultez les fichiers et dépendances avant l’installation.
SkillHub CLI
skillhub install genify/lsp-pythonExaminez la source et la compatibilité, puis suivez les étapes d’installation.
Donnez le lien à votre agent et demandez-lui d’examiner instructions et dépendances avant d’expliquer les étapes.
使用 Python Language Server Protocol (LSP) 进行代码质量检查和智能分析。
# 单个文件
python3 scripts/lsp-service.py check <文件路径>
# 批量检查 (推荐)
python3 scripts/check_python.py <文件或目录>
# 批量检查并自动修复
python3 scripts/check_python.py --auto-fix <文件或目录>
示例:
python3 scripts/lsp-service.py check my_script.py
python3 scripts/check_python.py src/
python3 scripts/check_python.py --auto-fix src/
python3 scripts/lsp-service.py complete <文件> <行号> <字符位置>
python3 scripts/lsp-service.py info <文件> <行号> <字符位置>
pip install python-lsp-server
pip install python-lsp-server[all] - 完整插件集pip install pylsp-mypy - 类型检查pip install pylsp-black - black 格式化检查 Python 文件中的错误和警告:
输出示例:
⚠️ 第 3 行 [pyflakes]: 'os' imported but unused
⚠️ 第 6 行 [pycodestyle]: E302 expected 2 blank lines, found 1
✅ 没有发现问题
获取指定位置的代码补全建议:
python3 scripts/lsp-service.py complete script.py 5 10
输出:
补全建议:
• json (模块)
• jsonpatch (模块)
• requests (模块)
查看函数签名、文档字符串等信息:
python3 scripts/lsp-service.py info script.py 10 5
查找符号的定义位置:
python3 scripts/lsp-service.py goto script.py 15 10
pip install autoflake
autoflake --remove-all-unused-imports --in-place --recursive .
pip install black
black .
# 1. 备份
cp -r project/ project.backup
# 2. 清理导入
autoflake --remove-all-unused-imports --in-place --r...
Ces informations proviennent de l’analyse indexée et peuvent être anciennes. Vérifiez les fichiers actuels.
# LSP Python 技能 使用 Python Language Server Protocol (LSP) 进行代码质量检查和智能分析。 ## 快速开始 ### 1. 检查代码问题 ```bash # 单个文件 python3 scripts/lsp-service.py check <文件路径> # 批量检查 (推荐) python3 scripts/check_python.py <文件或目录> # 批量检查并自动修复 python3 scripts/check_python.py --auto-fix <文件或目录> ``` 示例: ```bash python3 scripts/lsp-service.py check my_script.py python3 scripts/check_python.py src/ python3 scripts/check_python.py --auto-fix src/ ``` ### 2. 获取代码补全 ```bash python3 scripts/lsp-service.py complete <文件> <行号> <字符位置> ``` ### 3. 查看符号信息 ```bash python3 scripts/lsp-service.py info <文件> <行号> <字符位置> ``` ## 依赖 - **Python 3.x** - **pylsp**: `pip install python-lsp-server` - **可选插件**: - `pip install python-lsp-server[all]` - 完整插件集 - `pip install pylsp-mypy` - 类型检查 - `pip install pylsp-black` - black 格式化 ## 核心功能 ### 代码诊断 (check) 检查 Python 文件中的错误和警告: - **pyflakes** - 代码错误检测 (未使用导入、未定义变量等) - **pycodestyle** - PEP8 风格检查 (格式、行长、空白等) 输出示例: ``` ⚠️ 第 3 行 [pyflakes]: 'os' imported but unused ⚠️ 第 6 行 [pycodestyle]: E302 expected 2 blank lines, found 1 ✅ 没有发现问题 ``` ### 代码补全 (complete) 获取指定位置的代码补全建议: ```bash python3 scripts/lsp-service.py complete script.py 5 10 ``` 输出: ``` 补全建议: • json (模块) • jsonpatch (模块) • requests (模块) ``` ### 悬停提示 (info) 查看函数签名、文档字符串等信息: ```bash python3 scripts/lsp-service.py info script.py 10 5 ``` ### 跳转定义 (goto) 查找符号的定义位置: ```bash python3 scripts/lsp-service.py goto script.py 15 10 ``` ## 自动修复代码问题 ### 清理未使用的导入 ```bash pip install autoflake autoflake --remove-all-unused-imports --in-place --recursive . ``` ### 格式化代码 ```bash pip install black black . ``` ### 完整修复流程 ```bash # 1. 备份 cp -r project/ project.backup # 2. 清理导入 autoflake --remove-all-unused-imports --in-place --r...
Task Router
Register, communicate, and earn on the x402hub AI agent marketplace. Use when an agent needs to register on x402hub, browse or claim bounties, submit deliverables, send messages to other agents via x402 Relay,...
Real-time event bus for AI agents. Publish, subscribe, and share live signals across a network of agents with Unix-style simplicity.
OpenClaw integration guidance for CAPTCHAS Agent API, including OpenResponses tool schemas and plugin tool registration.