@yeongjaeyou/claude-code-config 0.21.1 → 0.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -176,7 +176,7 @@ When Built-in LSP returns "No LSP server available" error:
176
176
  - **MUST** execute code after writing, not just write and report
177
177
  - For Python scripts: run with appropriate interpreter
178
178
  - For tests: run pytest or equivalent
179
- - For notebooks: execute cells via `mcp__ide__executeCode`
179
+ - For notebooks: add/edit cells with NotebookEdit, user executes in Jupyter
180
180
 
181
181
  #### Error-Free Loop
182
182
  1. Write code
@@ -223,12 +223,9 @@ If pip install errors occur, try in order:
223
223
  3. `pip install --no-cache-dir -r requirements.txt` (install packages one by one)
224
224
 
225
225
  ### Jupyter Notebook Editing
226
- - **ALWAYS** use the `edit_notebook` tool exclusively for editing .ipynb files
227
- - **NEVER** use `search_replace`, `write`, or any other text editing tools on .ipynb files
228
- - After modifying .ipynb files, verify:
229
- - JSON syntax validity
230
- - Original cell execution order/outputs preserved (unless explicitly instructed to clear)
231
- - Changes are correct, no missing functions/imports/dependencies
226
+ - Use `edit-notebook` skill for .ipynb editing guidelines
227
+ - NotebookEdit tool only, no text editing tools
228
+ - After modification: verify cell order and outputs preserved
232
229
 
233
230
  ### Output Standards
234
231
  - **Minimal Output**: Avoid unnecessary print statements in code - only include meaningful debug output when explicitly requested
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: edit-notebook
3
+ description: Safely edit Jupyter Notebook (.ipynb) files. Use when (1) adding/modifying/deleting cells in .ipynb files, (2) working with notebook structure, (3) any .ipynb file modification. Triggered by notebook editing requests.
4
+ ---
5
+
6
+ # Notebook Editing
7
+
8
+ Edit Jupyter Notebook files using NotebookEdit tool only.
9
+
10
+ ## Rules
11
+
12
+ ### Tool Selection
13
+ - .ipynb = NotebookEdit only
14
+ - Edit, Write, search_replace 사용 금지
15
+
16
+ ### Cell Insertion: cell_id Tracking (Required)
17
+
18
+ NotebookEdit returns inserted cell's id. Track it for sequential insertion:
19
+
20
+ ```
21
+ NotebookEdit(edit_mode="insert", cell_type="code", new_source="...")
22
+ -> Returns cell_id='abc123'
23
+
24
+ NotebookEdit(edit_mode="insert", cell_id="abc123", cell_type="code", new_source="...")
25
+ -> Returns cell_id='def456'
26
+
27
+ NotebookEdit(edit_mode="insert", cell_id="def456", ...)
28
+ ```
29
+
30
+ **cell_id omitted**: Cell inserted at BEGINNING -> reverse order bug
31
+
32
+ ### Execution Policy
33
+ - NotebookEdit = edit only, no execution
34
+ - After adding cells: "Please run the cells in Jupyter"
35
+ - Do NOT use mcp__ide__executeCode (causes notebook state corruption)
36
+
37
+ ### Post-Edit Verification
38
+ - Read first 30 lines to verify cell order
39
+ - Confirm existing outputs preserved
40
+
41
+ ## edit_mode Options
42
+
43
+ | Mode | Purpose | cell_id |
44
+ |------|---------|---------|
45
+ | replace | Update existing cell | Required |
46
+ | insert | Add new cell | Recommended (omit = top insertion) |
47
+ | delete | Remove cell | Required |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeongjaeyou/claude-code-config",
3
- "version": "0.21.1",
3
+ "version": "0.21.2",
4
4
  "description": "Claude Code CLI custom commands, agents, and skills",
5
5
  "bin": {
6
6
  "claude-code-config": "./bin/cli.js"
@@ -1,79 +0,0 @@
1
- ---
2
- description: Safely edit Jupyter Notebook (.ipynb) files
3
- ---
4
-
5
- # Notebook Editing
6
-
7
- Safely edit Jupyter Notebook files using the correct tools.
8
-
9
- ## Required Rules
10
-
11
- 1. **Tool usage**: Use only the `NotebookEdit` tool
12
- - Do not use text editing tools like `Edit`, `Write`, `search_replace`
13
- - .ipynb files are JSON structures and require dedicated tools
14
-
15
- 2. **Cell insertion order**: Ensure correct order when creating new notebooks
16
- - **Important**: Cells are inserted at the beginning if `cell_id` is not specified
17
- - **Method 1 (recommended)**: Track previous cell's cell_id for sequential insertion
18
- ```
19
- Insert first cell -> Returns cell_id='abc123'
20
- Insert second cell with cell_id='abc123' -> Inserted after first cell
21
- Insert third cell with cell_id='def456' -> Inserted after second cell
22
- ```
23
- - **Method 2**: Insert in reverse order (from last cell to first)
24
- - **Never**: Insert sequentially without cell_id (causes reverse order)
25
-
26
- 3. **Source format**: Source may be saved as string when using NotebookEdit
27
- - **Problem**: `"line1\\nline2"` (string) -> `\n` displayed literally in Jupyter
28
- - **Correct**: `["line1\n", "line2\n"]` (list of strings)
29
- - **Solution**: When creating new notebooks, directly write JSON using Python
30
-
31
- 4. **Post-edit verification**: Always verify after modifications
32
- - Validate JSON syntax
33
- - Confirm cell execution order is preserved (check first 30 lines with Read)
34
- - Check for missing functions/imports/dependencies
35
- - Preserve cell outputs unless explicitly instructed otherwise
36
-
37
- 5. **Key Insights verification**: Verify outputs before documenting
38
- - **Required steps**:
39
- 1. Read notebook output cells (use Read tool)
40
- 2. Read generated data files (CSV, JSON, etc.)
41
- 3. Check visualizations/images if any
42
- - **Never**: Write insights based only on code flow
43
- - **Required**: Document data source (e.g., "Source: outputs/analysis.csv")
44
-
45
- ## Guidelines
46
-
47
- - **Use dedicated tool only**: Never use editing tools other than NotebookEdit
48
- - **Preserve structure**: Maintain existing cell order and outputs
49
- - **Verification required**: Immediately verify changes after editing
50
- - **Follow CLAUDE.md**: Adhere strictly to project guidelines
51
-
52
- ## Path Compatibility
53
-
54
- Notebooks in `notebooks/` cannot use project-root relative paths directly.
55
-
56
- ```python
57
- # First code cell - set PROJECT_ROOT
58
- from pathlib import Path
59
-
60
- PROJECT_ROOT = Path.cwd().parent
61
- if not (PROJECT_ROOT / 'outputs').exists():
62
- PROJECT_ROOT = Path.cwd()
63
-
64
- # Use PROJECT_ROOT for all file paths
65
- data = np.load(PROJECT_ROOT / 'outputs/data.npz')
66
- ```
67
-
68
- ## Computation Efficiency
69
-
70
- ### Avoid
71
- - Repeated model loading across cells
72
- - Re-running inference when results exist
73
- - Computing without caching
74
-
75
- ### Required patterns
76
- 1. **Cache-first**: Load cached results if exist, compute only if missing
77
- 2. **Single instance**: Load model once in early cell, reuse throughout
78
- 3. **Filter over recompute**: Filter cached results instead of re-running with different parameters
79
-