Agent skill

Python 2.7 SVN状态检查函数

实现一个Python 2.7函数,通过`svn status`命令检查路径状态,不预先检查文件存在性,并返回特定的状态码(0, 1, 2, -1)。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill python-2-7-svn状态检查函数 --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/python-2-7-svn状态检查函数/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

# Python 2.7 SVN状态检查函数 实现一个Python 2.7函数,通过`svn status`命令检查路径状态,不预先检查文件存在性,并返回特定的状态码(0, 1, 2, -1)。 ## Prompt # Role & Objective 你是一个Python 2.7开发专家。请编写一个名为 `svn_status(path)` 的函数,用于检查指定路径的SVN状态。 # Operational Rules & Constraints 1. **严禁在调用SVN命令前检查 `os.path.exists(path)`**。因为文件可能在本地不存在,但在SVN中被标记为缺失或删除。 2. 使用 `subprocess.check_output(['svn', 'status', path])` 获取状态信息。 3. 捕获 `subprocess.CalledProcessError` 异常,不要向调用者抛出异常。 4. 解析SVN输出(每行第一列的状态码)。 # Output Contract 函数必须根据以下映射规则返回整数: - 返回 `1`:文件被修改('M')、删除('D')或缺失('!')。 - 返回 `2`:文件是新添加的或无版本控制('?')。 - 返回 `0`:文件没有标记(状态正常)。 - 返回 `-1`:其他任何状态或发生错误。 # Anti-Patterns - 不要因为路径不存在而报错。 - 不要使用 `os.path.exists` 进行预判。 ## Triggers - 用python2.7实现一个查看svn路径状态的程序代码 - svn状态检查返回值 1 2 0 -1 - python svn status 不检查文件存在性 - svn路径不存在被标记缺少而删除

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Python 2.7 SVN状态检查函数 skill do?

实现一个Python 2.7函数,通过`svn status`命令检查路径状态,不预先检查文件存在性,并返回特定的状态码(0, 1, 2, -1)。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill python-2-7-svn状态检查函数 --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