修理某事

其他 社区

技能解读

当前原文的自动摘译,尚未人工审校。

为了让您更轻松地完成此过程,我们的 FIXME 具有特殊格式:

哪里description是需要修复的简短描述,并且N是先前尝试修复该问题的次数(如果有)。如果之前没有尝试过,[attempts=N]部分可以省略。优先级只是一个整数,0 表示最高优先级。优先级可能存在也可能不存在。如果不存在,则假设优先级=3

在执行以下任何操作之前,第一步是通过运行“uv run pytest”来检查测试是否通过

如果测试未全部通过(包括所有 linter、棘轮、类型检查等),那么这就是您需要修复的问题。特别是,您必须遵循以下流程:

通过调用“git revert --no-commit HEAD”恢复上次提交的更改(以便更改位于当前工作树中,但尚未提交) 2. 更新上次提交中尝试的 FIXME,将尝试计数增加 1(如果之前没有尝试,则添加“[attempts=1]”,如果之前有一些尝试,则将数字增加 1)。请注意,它应该看起来像这样:# FIXME[attempts=1]: (original description)或# FIXME0[attempts=2]: (original description),即[attempts=N]部分位于“:”之前 3. 扩展 FIXME 的可选附加上下文,并简要说明您无法修复它的原因 4. 提交所有这些。 5. 直接进行下面的“#The Final Step”。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
通用
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
94 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@imbue-ai · NOASSERTION
上下文用量评级
低消耗
接入复杂程度
即装即用
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
Python
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

Your task is to make ONE improvement to the codebase by fixing a random thing about the codebase (eg, normally a FIXME).

In order to make this process easier for you, our FIXMEs are specially formatted:

```python
# FIXME(priority)[attempts=N]: (description)
#  (optional additional context)
```

where `description` is a short description of what needs to be fixed, and `N` is the number of prior attempts made to fix it (if any). 
If there have been no prior attempts, the `[attempts=N]` part may be omitted.
The priority is simply an integer, with 0 being the highest priority. priority may or may not be present. 
If not present, assume priority=3

Before doing any of the below, the first step is to check that the tests are passing by running "uv run pytest"

If the tests are not ALL passing (including all linters, ratchets, type checks, etc), *then this is the thing for you to fix*. In particular, you must follow this process:

1. revert the changes from the previous commit by calling "git revert --no-commit HEAD" (so that the changed are in your current working tree, but not yet committed)
2. update the FIXME that was attempted in the previous commit to increment the attempts count by 1 (if there were no prior attempts, add "[attempts=1]", if there were some prior attempts, increment the number by 1). Note that it should then look something like this: `# FIXME[attempts=1]: (original description)` or `# FIXME0[attempts=2]: (original description)`, ie, the `[attempts=N]` part goes before the ":"
3. extend the optional additional context of the FIXME with a brief note about why you were unable to fix it
4. commit all of this.
5. proceed directly to "# The Final Step" below.

If the tests start out passing, then you must select and fix a random FIXME by following this process:

1. Simply run this bash command, and it will give you a random FIXME line: "./scripts/random_fixme.sh $1". If no lines are returned, then there are no more remaining FIXMEs, so use your "think-of-something-to-fix" skill to come up with something else to fix instead.
2. Find that FIXME and be sure to read the surrounding context (the optional additional context lines below the FIXME line may be important). This is the task you will be working on.
3. Go gather all the context for the library that contains that FIXME (per instructions in CLAUDE.md).
4. Think carefully about how best to fix that FIXME
5. Implement the fix
6. Get all the tests passing (use "uv run pytest" to run them, and be sure to fix any issues, no matter how small)

Once the tests are passing, be sure that you have removed ONLY that FIXME, then commit your changes.

If you were unable to fix the issue and get all the tests passing, do the following instead:

1. Revert any changes you made while attempting to fix the issue
2. Update the FIXME to increment the attempts count by 1 (if there were no prior attempts, add "[attempts=1]", if there were some prior attempts, increment the number by 1). Note that it should then look something like this: `# FIXME[attempts=1]: (original description)` or `# FIXME0[attempts=2]: (original description)`, ie, the `[attempts=N]` part goes before the ":"
3. Extend the optional additional context with a brief note about why you were unable to fix it this time.
4. Commit this updated FIXME (be sure that nothing else is being changed!)

# The Final Step

Finally, as the *very* last thing you do (after committing, regardless of whether you succeeded or not), run this command: "touch $2" (to indicate that you have completed your fix task).

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。