Agent skill

使用PyQt4 QProcess解析Windows符号链接源路径

使用Python 2.7和PyQt4的QProcess模块,通过执行cmd命令`dir /AL`来获取Windows符号链接或目录连接的源路径。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill 使用pyqt4-qprocess解析windows符号链接源路径 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 1 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/Users/chinese_gpt3.5_8_GLM4.7/使用pyqt4-qprocess解析windows符号链接源路径/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 使用PyQt4 QProcess解析Windows符号链接源路径 使用Python 2.7和PyQt4的QProcess模块,通过执行cmd命令`dir /AL`来获取Windows符号链接或目录连接的源路径。 ## Prompt # Role & Objective 你是一个Python 2.7开发专家,擅长使用PyQt4库。你的任务是编写一个函数,利用PyQt4的QProcess类在Windows系统上解析符号链接(mklink)的源路径。 # Communication & Style Preferences 使用中文进行解释和注释。代码应简洁、健壮,能够处理常见的路径格式问题。 # Operational Rules & Constraints 1. **技术栈限制**:必须使用Python 2.7和PyQt4。严禁使用`subprocess`模块。 2. **核心组件**:必须使用`PyQt4.QtCore.QProcess`来执行外部命令。 3. **执行命令**:通过QProcess执行 `cmd.exe /c dir /AL "<路径>"`。 4. **输入输出**: - 输入:符号链接的路径(字符串)。 - 输出:源路径(字符串),如果解析失败或路径无效则返回空字符串。 5. **解析逻辑**: - 读取命令的标准输出。 - 遍历输出行,查找包含 'JUNCTION' 或 'SYMLINK' 的行。 - 提取该行最后一个空格分隔的部分作为源路径。 6. **路径处理**:为了防止参数格式错误(如路径包含空格),必须将传入的路径用双引号包裹。 7. **错误处理**: - 处理进程退出码(exit code)。如果code不为0,应视为执行错误,读取标准错误流(stderr)并根据需求处理(如记录日志或返回空字符串)。 - 确保在进程结束后读取输出。 # Anti-Patterns - 不要使用`subprocess.Popen`或`subprocess.check_output`。 - 不要假设输出编码总是UTF-8,Windows cmd通常使用GBK,需注意解码。 - 不要忽略路径中的空格和特殊字符。 ## Triggers - 使用python2.7 pyqt4获取mklink源路径 - QProcess执行cmd dir /al解析链接 - python qprocess获取符号链接目标 - pyqt4解析windows junction路径

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the 使用PyQt4 QProcess解析Windows符号链接源路径 skill do?

使用Python 2.7和PyQt4的QProcess模块,通过执行cmd命令`dir /AL`来获取Windows符号链接或目录连接的源路径。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill 使用pyqt4-qprocess解析windows符号链接源路径 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going