Xms login
Automates XMS customer service system SSO login via browser automation. Handles navigation to the XMS portal, SSO redirection detection, DOM-based credential injection with event triggering, and login confirmation. Use when the user needs to log into XMS, authenticate with cs-packet.i4px.com, or perform any XMS workflow requiring a valid session.From its SKILL.md
npx -y skills add xuluoforcainiao/xms-login --skill xms-loginAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.7 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
XMS 登录自动化
Overview
Automates SSO login for the XMS customer service management system. Unauthenticated users are redirected from cs-packet.i4px.com to sso.i4px.com. The login form is invisible to the accessibility tree, so credentials must be injected via JavaScript DOM manipulation.
Login Workflow
Step 1: Navigate
Open http://cs.packet.i4px.com/ in the browser.
Step 2: Window Health Check
Before proceeding, verify the browser window:
- Check:
window.innerWidth + ',' + window.innerHeight - JS resize: If broken,
window.moveTo(0,0); window.resizeTo(1440,900), wait 2s, recheck - New tab:
tabs_create_mcp, check size - Recreate: Close tabs one by one (
tabs_close_mcponly accepts singletabId), thentabs_context_mcpwithcreateIfEmpty:true - Small fallback: 256x116 is functional. DOM operations work. Only abort at
0,0.
Step 3: Detect SSO
Check current URL:
- Contains
sso.i4px.com-> proceed to Step 4 - Already
cs-packet.i4px.com/index-> already logged in, skip to Step 5
Step 4: Inject Credentials
const username = document.getElementById('username');
const passwordOrg = document.getElementById('passwordOrg');
if (username && passwordOrg) {
username.value = 'USERNAME';
passwordOrg.value = 'PASSWORD';
['input', 'change', 'keyup'].forEach(evt => {
username.dispatchEvent(new Event(evt, { bubbles: true }));
passwordOrg.dispatchEvent(new Event(evt, { bubbles: true }));
});
document.getElementById('signbtn').click();
}
Replace USERNAME/PASSWORD with actual credentials. Element IDs are
username,passwordOrg,signbtn— notloginName,loginPwd, orloginBtn.
Step 5: Handle Post-Login Dialogs
After clicking the login button, the system may present additional dialogs before completing the login:
5.1 "Already logged in elsewhere" dialog
If a confirmation dialog appears saying "此账号已在别的地方登录" or similar:
const confirmBtn = Array.from(document.querySelectorAll('button, .ant-btn, .next-btn'))
.find(el => ['是', '确定', '确认', 'OK', 'Yes'].includes(el.textContent.trim()));
if (confirmBtn) confirmBtn.click();
Action: Click "是" / "确定" to continue login and dismiss the dialog.
5.2 QR code / device verification / slider captcha
If the page shows a QR code scan, mobile device authentication popup, or slider captcha that cannot be completed automatically:
- Do NOT retry the login repeatedly
- Notify the user immediately via IM (e.g., 小Q channel:
978802e0-d724-46b2-841e-70a4ed3c32ae) with a message like:"XMS login requires manual verification (QR code/device auth). Please complete the verification on your computer and reply to me."
- Wait 3 minutes, then recheck if the page has redirected to
cs-packet.i4px.com/index - If still not redirected, notify again and record error:
last_error = "Login requires manual verification, user notified but not completed within time limit"
5.3 Login timeout
If the URL does not change within 3 minutes and no special scenario above occurs:
- Set
last_error = "XMS login timeout" - Handle via the outer retry logic
Step 6: Handle "Server Exception" Error
After navigating or during the login process, the page may display a "服务器异常" (server exception) error. This is a transient server-side error that can be resolved by refreshing the page:
// Check if the page contains server exception message
const hasServerError = document.body.innerText.includes('服务器异常') ||
document.body.innerText.includes('系统异常') ||
document.body.innerText.includes('服务异常');
if (hasServerError) {
// Record the error for logging
console.log('Server exception detected, will recreate tab and retry login');
}
Action when server exception detected:
- Close current tab: Use
tabs_close_mcpto close the current tab - Create new tab: Use
tabs_create_mcpto open a fresh tab - Re-navigate: Open
http://cs.packet.i4px.com/again in the new tab - Re-login: Go back to Step 3 (Detect SSO) and retry the entire login flow
- This retry counts toward the outer loop's
max_retries
Note: Do NOT repeatedly click the same error page. Always close the tab and create a new one. The server exception is typically transient and resolves on a fresh page load.
Step 7: Confirm Login Success
Wait for redirect to cs-packet.i4px.com/index. Verify by checking URL and page title.
- If redirected successfully → login complete
- If still on
sso.i4px.comafter handling all dialogs above → record error and retry via outer loop - If "服务器异常" appears at any point → go to Step 6, close tab and retry
Verified Element IDs
| Element | Correct ID | Incorrect (old) |
|---|---|---|
| Username input | username | loginName |
| Password input | passwordOrg | loginPwd |
| Login button | signbtn | loginBtn |
Critical Rules
- DOM injection only: The login form is invisible to accessibility trees.
javascript_toolis the only reliable method. - Trigger events: Setting
.valuealone is insufficient. Always dispatchinput/change/keyupevents so the frontend framework detects the change. - Already logged in: Always check URL first to avoid unnecessary re-login.
What ships with it: 1 file
689 B alongside SKILL.md
- README.md689 B
Gives 0 of the 12 instructions most automation workflows skills give in ~1.3k tokens
Counted across 745 of the 1,008 authors here whose files we hold, read 2026-08-07
- Write conventional commit messagesin 36 of 745, across 35 files
- Delete branches after mergein 30 of 745, across 21 files
- Make atomic commitsin 25 of 745, across 15 files
- Write minimal code to pass testsin 22 of 745, across 10 files
- Re-snapshot after navigation or DOM changesin 21 of 745, across 13 files
- Use try-catch for error handlingin 20 of 745, across 8 files
- Run tests before committingin 20 of 745, across 12 files
- Write tests before implementationin 20 of 745, across 8 files
- Configure branch protection rulesin 19 of 745, across 5 files
- Explain the why in commit messagesin 19 of 745, across 9 files
- Refactor code while tests remain greenin 19 of 745, across 6 files
- Interact with elements using refsin 19 of 745, across 11 files
Said here and by no other author read
- check current URL before attempting login
- resize the browser window if broken
- inject credentials via javascript DOM manipulation
- dispatch input change and keyup events after setting values
- use username passwordOrg and signbtn element IDs
- click confirm button if already logged in elsewhere
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.