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: CLAUDE.md
+37-1Lines changed: 37 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,12 +5,48 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
5
5
## Project Overview
6
6
7
7
XMOJ-Script is a browser userscript that enhances the XMOJ online judge platform (xmoj.tech). This repository consists of:
8
-
-**Main userscript** (`XMOJ.user.js`): ~5000 line single-file userscript with all features. As this file is very large you should use the xmoj-code-navigator agent to help you whenever possible.
8
+
-**Main userscript** (`XMOJ.user.js`): ~5000 line single-file userscript with all features. **See "Working with XMOJ.user.js" section below for CRITICAL instructions on using the xmoj-code-navigator agent.**
9
9
-**Update/version management scripts** (`Update/`): Automation for version bumping and releases
10
10
-**Metadata and documentation**: `Update.json` tracks version history, README and contributing guides
11
11
12
12
The `backend/` directory is a git submodule pointing to https://github.com/XMOJ-Script-dev/XMOJ-bbs and should be modified in that repository, not here.
13
13
14
+
## Working with XMOJ.user.js (CRITICAL)
15
+
16
+
**IMPORTANT: Due to the large size of XMOJ.user.js (~5000 lines), you MUST use the xmoj-code-navigator agent whenever you need to explore, search, or understand any part of this file.**
17
+
18
+
### When to use xmoj-code-navigator
19
+
20
+
Use the Task tool with `subagent_type="xmoj-code-navigator"` for:
21
+
22
+
-**Finding specific functions or features**: "Where is the auto-refresh functionality implemented?"
23
+
-**Understanding code sections**: "How does the login authentication work?"
24
+
-**Locating code patterns**: "Find all API calls to the backend"
25
+
-**Searching for specific implementations**: "Show me the dark mode toggle implementation"
26
+
-**Verifying if code exists**: "Does XMOJ.user.js have a function for parsing XML?"
27
+
-**ANY exploration task involving XMOJ.user.js**
28
+
29
+
### Why use this agent
30
+
31
+
Loading the entire XMOJ.user.js file into context:
32
+
- Wastes context window space
33
+
- Makes responses slower
34
+
- Is unnecessary when you only need specific sections
35
+
36
+
The xmoj-code-navigator agent efficiently locates and retrieves only the relevant code sections you need.
37
+
38
+
### Example usage
39
+
40
+
```
41
+
Instead of: Read tool on XMOJ.user.js (loads entire 5000 lines)
42
+
Use: Task tool with xmoj-code-navigator agent to find specific sections
43
+
```
44
+
45
+
**Exception**: Only use Read tool on XMOJ.user.js when:
46
+
- You need to edit a specific line number you already know
47
+
- You're making targeted edits and already know the exact location
48
+
- You need to verify a small, specific section (use offset and limit parameters)
Copy file name to clipboardExpand all lines: Update.json
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -3299,6 +3299,28 @@
3299
3299
}
3300
3300
],
3301
3301
"Notes": "Adds WebSocket-based real-time notification system for BBS mentions and mail notifications. Notifications now arrive within 1-2 seconds instead of requiring page focus. Includes automatic reconnection with exponential backoff and fallback to polling when WebSocket is unavailable."
"Notes": "Added a new toggleable \"极简黑白界面风格\" (Minimalist Monochrome UI) setting under Beautify options. Features serif typography, zero border-radius, line-based visual structure, and automatic dark mode support with charcoal tones."
"Notes": "Added a new toggleable \"极简黑白界面风格\" (Minimalist Monochrome UI) setting under Beautify options. Features serif typography, zero border-radius, line-based visual structure, and automatic dark mode support with charcoal tones."
0 commit comments