You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/usethis-python-code-modify/SKILL.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,16 @@ description: Modify Python code (e.g. refactor, add new code, or delete code)
4
4
compatibility: usethis, Python, pytest
5
5
license: MIT
6
6
metadata:
7
-
version: "1.0"
7
+
version: "1.1"
8
8
---
9
9
10
10
# Modifying Python code
11
11
12
12
## Procedure
13
13
14
14
1. Run a subset of the tests for `src/<module>` regularly from the parallel module in the `tests/<module>` directory. Never run the entire test suite.
15
-
2. After finishing your modifications, run the static checks (e.g. `usethis-qa-static-checks`) to check for any issues.
15
+
2. After finishing your modifications, check if documentation needs updating.
16
+
3. After finishing your modifications, run the static checks (e.g. `usethis-qa-static-checks`) to check for any issues.
16
17
17
18
## Run a subset of tests regularly
18
19
@@ -31,6 +32,16 @@ There are two reasons why tests might fail:
31
32
32
33
In the first case, update the tests to have the correct expectations, or perhaps remove the test entirely. In the second case, fix the bug in the code.
33
34
35
+
## Check if documentation needs updating
36
+
37
+
When you modify code, check whether the change affects areas that are documented in `CONTRIBUTING.md`, `README.md`, or `docs/`. If so, update the documentation to reflect the change.
38
+
39
+
### Areas needing special attention
40
+
41
+
-**Guides in CONTRIBUTING.md**: The "Guides" section in `CONTRIBUTING.md` documents step-by-step processes for common tasks like adding a new tool or adding a new badge. If your change modifies the classes, functions, or patterns described in these guides (e.g. `Tool`, `ToolSpec`, `ConfigSpec`, `use_*` functions, `typer` commands, badge functions), read the relevant guide and check whether it still accurately describes the current code. Update it if not.
42
+
-**Conventions in CONTRIBUTING.md**: The "Conventions" section documents project-wide conventions (e.g. `plain_print` instead of `print`, branding rules). If your change introduces a new convention or modifies an existing one, update this section.
43
+
-**README.md**: If your change adds, removes, or renames CLI commands or tool integrations, update `README.md` to reflect this.
44
+
34
45
## Run static checks after finishing modifications
35
46
36
47
After finishing your modifications, run the static checks (e.g. `usethis-qa-static-checks`) to check for any issues before merging.
0 commit comments