Install
openclaw skills install ds160-autofillClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Automates filling and resuming US DS-160 visa forms using CSV data, browser scripting, LLM for captchas, translations, missing data, and session persistence.
openclaw skills install ds160-autofillThis skill automates the filling of US nonimmigrant visa DS-160 forms by combining:
Provide CSV data: User must provide a CSV file with their personal information (use ds160-user-info.csv as template)
Open DS-160 website: Use browser tool to open https://ceac.state.gov/genniv/ with profile openclaw
Initialize session: Load and execute scripts/ds160-filler.js to parse mappings and CSV
Start filling: Begin with the home page, handle captcha with LLM, then proceed page by page
Load existing session: Check ds160/ds160-session.json for saved Application ID
Open application: Use the saved Application ID to resume on DS-160 website
Continue filling: Load CSV from saved location and continue from last page
Always check if session exists first:
// Read ds160/ds160-session.json
// If exists → Resume mode
// If not → New application mode
New application mode:
ds160/ds160-user-info.csv using write toolds160/ds160-session.json:
{
"applicationId": null,
"securityQuestion": null,
"securityAnswer": null,
"currentPageIndex": 0,
"completedPages": [],
"startDate": "2026-02-06T21:00:00Z"
}
Resume mode:
ds160/ds160-user-info.csvds160/ds160-session.json// Open browser with openclaw profile
browser_start: { profile: "openclaw", targetUrl: "https://ceac.state.gov/genniv/" }
// For resume mode, add Application ID to URL
// Example: https://ceac.state.gov/GenNIV/Common/ConfirmApplicationID.aspx
For each page in sequence:
Snapshot page to understand current state:
browser_snapshot: { refs: "role", profile: "openclaw" }
Load mappings from references/ds160-elements.yaml
Execute fill logic using browser act with evaluate:
// Load ds160-filler.js
// Call fillPage(page, currentUrl, userData, yamlData)
Handle results:
Captcha:
image tool to analyze captchaMissing element:
Translation needed:
Missing user data:
After completing a page:
Update session data:
{
"applicationId": "AA00FBLCQP",
"securityQuestion": "What is the given name of your mother's mother?",
"securityAnswer": "LiMei",
"currentPageIndex": 5,
"completedPages": ["home", "security_question", "personal_1", "personal_2"],
"startDate": "2026-02-06T21:00:00Z"
}
Save to file: write(ds160/ds160-session.json, JSON.stringify(sessionData))
Report progress to user:
Click "Continue" button to proceed to next page
The CSV must have these columns:
页面 - Page name字段名称 - Field identifier (matches YAML name field)英文说明 - English description中文说明 - Chinese description必填 - Required? (是/否)示例值 - Example value用户填写 - User-provided value (this is what gets filled)Important: Users can provide values in Chinese. The script includes a built-in translation dictionary for common fields (gender, marital status, countries, etc.). For fields not in the dictionary, LLM will be called for translation automatically.
Each page in ds160-elements.yaml contains:
page_id: Unique page identifierpage_name: Human-readable page nameurl: Page URL patternelements: Array of form elements with:
id: Element IDname: Field identifier (matches CSV)type: Element type (text, select, radio, checkbox, button)label: English labellabel_cn: Chinese labelrequired: Is required?options: Available options (for select)group: Radio group nameSymptoms: fillPage returns needsLLM: true
Action:
Symptoms: fillPage returns needsTranslation: true
Action:
Example LLM prompt for translation:
I need to translate this Chinese value for a DS-160 form field:
Field: ${elementName}
Type: ${elementType}
English label: ${label}
Chinese label: ${label_cn}
Chinese value: "${originalValue}"
Available options (if select): ${options}
Please provide the correct English value for this field. Consider:
- The field type and context
- Available options (if applicable)
- Standard DS-160 terminology
Return only the English value, no explanation.
Symptoms: fillPage returns needsUserInput: true
Action:
// Find and click "Save" button
browser_act: {
request: { kind: "click", ref: "save_button" }
}
write toolSymptoms: Captcha image detected on page
Action:
image tool:
image: {
image: "/path/to/captcha.png",
prompt: "What is the code shown in this captcha? Return only the code characters."
}
The pages are filled in this order:
Report to user after each page:
✓ Completed: Personal Information 1
📄 Next: Personal Information 2
🆔 Application ID: AA00FBLCQP
🔐 Security Question: What is the given name of your mother's mother?
🔑 Answer: LiMei
📊 Progress: 3/13 pages completed
Include in every report:
For element location:
I need to find this form element on a DS-160 page:
- Element ID: {elementId}
- Field name: {fieldName}
- Element type: {elementType}
- Current URL: {url}
Please analyze the page and provide:
1. The correct way to locate this element (CSS selector or JavaScript)
2. Any visible labels or text associated with it
For captcha:
Please read the captcha code from this image. Return only the code characters, no explanation.
The script includes a built-in translation dictionary for common Chinese values. This covers:
Gender:
Marital Status:
Yes/No:
Countries:
Visa Types:
Payment:
Relationship (US Point of Contact):
Other Values:
For values not in this dictionary, LLM will be automatically called for translation.
Session file location: ds160/ds160-session.json
Session data structure:
{
"applicationId": "AA00FBLCQP",
"securityQuestion": "What is the given name of your mother's mother?",
"securityAnswer": "LiMei",
"currentPageIndex": 5,
"completedPages": ["home", "security_question", "personal_1", "personal_2", "travel", "travel_companions"],
"startDate": "2026-02-06T21:00:00Z",
"lastUpdated": "2026-02-06T21:30:00Z"
}
When to save session:
Always use openclaw profile to maintain session across pages.
Use browser act with evaluate for form filling:
Use browser snapshot before each page:
Before using this skill with real data:
User says: "Help me fill DS-160 form with my data in this.csv"
Agent workflow:
User says: "Continue filling my DS-160 form"
Agent workflow: