agentsclimarketplace

Xms login

Skill xuluoforcainiao/xms-login/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

Install
npx -y skills add xuluoforcainiao/xms-login --skill xms-login

Assembled 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:

  1. Check: window.innerWidth + ',' + window.innerHeight
  2. JS resize: If broken, window.moveTo(0,0); window.resizeTo(1440,900), wait 2s, recheck
  3. New tab: tabs_create_mcp, check size
  4. Recreate: Close tabs one by one (tabs_close_mcp only accepts single tabId), then tabs_context_mcp with createIfEmpty:true
  5. 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 — not loginName, loginPwd, or loginBtn.

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:

  1. Do NOT retry the login repeatedly
  2. 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."

  3. Wait 3 minutes, then recheck if the page has redirected to cs-packet.i4px.com/index
  4. 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:

  1. Close current tab: Use tabs_close_mcp to close the current tab
  2. Create new tab: Use tabs_create_mcp to open a fresh tab
  3. Re-navigate: Open http://cs.packet.i4px.com/ again in the new tab
  4. Re-login: Go back to Step 3 (Detect SSO) and retry the entire login flow
  5. 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.com after 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

ElementCorrect IDIncorrect (old)
Username inputusernameloginName
Password inputpasswordOrgloginPwd
Login buttonsignbtnloginBtn

Critical Rules

  • DOM injection only: The login form is invisible to accessibility trees. javascript_tool is the only reliable method.
  • Trigger events: Setting .value alone is insufficient. Always dispatch input/change/keyup events 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

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.

Keep looking

Skills are one crate of 326,851. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.