wifi
Skill21 starsChanged 4 months agoMITView on GitHub
Guide an Android Agent to inspect Wi-Fi status, scan nearby Wi-Fi networks, read configured Wi-Fi entries, connect with saved or provided credentials, disconnect, forget Wi-Fi, and use Wi-Fi settings fallbacks when Android app-layer APIs cannot complete the action.
In this repository8 other files it gives its agents.
- bluetoothSkill
- daily-device-briefSkill
- mailSkill
- RoutePlanningNavigationSkillSkill
- OpenAppSkillSkill
- shoppingSkill
- my-skillSkill
- web researchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 14 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Search nearby Wi-Fi networks and help choose a target by signal strength.
- Very specific: line 43
If the security type is known, pass it as security.
- Distinctive: line 46
If the tool says a password is needed or the connection was not verified, ask the user to confirm the password or connect manually.
- Very specific: line 50
Call wifi_scan_networks to get nearby networks.
- Distinctive: line 51
Prefer the SSID explicitly requested by the user.
- Distinctive: line 52
If the user asks to search for a public password, use web search for the SSID, store name, or venue name.
- Very specific: line 53
After finding a candidate password, try wifi_connect once.
- Distinctive: line 54
If it fails, explain likely causes: wrong password, wrong security type, weak signal, Android rejection, or vendor ROM limitation.
- Very specific: line 58
Call wifi_configured_networks to inspect saved entries.
- Distinctive: line 59
If the user provided an SSID, match that SSID directly.
- Very specific: line 60
Call wifi_connect(ssid) for a clear candidate.
- Distinctive: line 61
If the tool says a password is needed, Android has no verified saved credential for that SSID.
- Distinctive: line 66
If the tool says Wi-Fi is disconnected or disconnecting, confirm the action.
- Distinctive: line 67
If Android rejects the request or settings are opened, tell the user to disconnect from the Wi-Fi settings page.
- Very specific: line 71
If the user specified an SSID, call wifi_forget(ssid).
- Very specific: line 72
If the user asks to forget the current Wi-Fi but did not provide an SSID, call wifi_status first, then call wifi_forget.
- Distinctive: line 73
Do not claim that the forgotten Wi-Fi password can be read or displayed.
- Distinctive: line 74
If the tool fails or opens settings, tell the user to forget the network manually in Android Wi-Fi settings.
- Very specific: line 89
Use action-oriented wording: "Wi-Fi opened", "connected", "password needed", "please confirm manually".
- Distinctive: line 90
If both SSID and password are already known, do not scan first.
- Distinctive: line 91
Use configured Wi-Fi entries only to decide whether a saved-connect attempt is worth trying.
- Distinctive: line 93
When the user must enter a password, say that clearly.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Wi-Fi Tool Guide
Scope
Use this skill when the user wants the Agent to inspect, scan, connect, switch, disconnect, or forget Wi-Fi. The Wi-Fi tools operate at the normal Android app layer and prefer legacy WifiManager APIs available to targetSdk=28 apps. If Android rejects the action, permissions are missing, the connection cannot be verified, or the user must enter a password, follow the tool result and guide the user accordingly.
Good fits:
- Parse a photo or text showing a store Wi-Fi name and password, then connect automatically.
- Search nearby Wi-Fi networks and help choose a target by signal strength.
- Switch to an already configured Wi-Fi network.
- Disconnect the current Wi-Fi.
- Forget a specified or current Wi-Fi network.
Not good fits:
- Reading the plaintext password of a saved or connected Wi-Fi network.
- Guaranteeing silent connect or forget behavior across all Android versions and vendor ROMs.
- Treating an SSID in
configuredNetworksas proof that the password is valid. It only means Android has a configuration record. - Treating
enableNetwork,addNetwork, orupdateNetworksuccess as proof that Wi-Fi is connected. Only trust the tool's final verified result.
Available Tools
wifi_status: Check Wi-Fi power and current connection.wifi_set_enabled: Open or close Wi-Fi. The tool waits for state verification and opens Wi-Fi settings if needed.wifi_scan_networks: Scan nearby Wi-Fi networks. The tool ensures Wi-Fi is on before scanning.wifi_configured_networks: Read Android configured/saved Wi-Fi entries. It returns SSID, security type, whether credentials appear configured, and whether the entry is connected. It never returns passwords.wifi_connect: Connect to Wi-Fi. It checks whether the phone is already connected, tries saved configuration first, then uses the provided password to add/update and connect, or returns that a password is needed.wifi_disconnect: Disconnect the current Wi-Fi. Falls back to Wi-Fi settings if Android rejects the request.wifi_forget: Forget a specified or current Wi-Fi. Falls back to Wi-Fi settings if Android rejects the request.
Recommended Workflows
1. Photo or Text Contains Wi-Fi Name and Password
- Extract
ssidandpassphrasefrom the photo or text. - If the security type is known, pass it as
security; otherwise usewpa2. - Call
wifi_connect(ssid, security, passphrase). - Tell the user Wi-Fi is connected only when the tool reports a verified connection.
- If the tool says a password is needed or the connection was not verified, ask the user to confirm the password or connect manually.
2. Search Nearby Wi-Fi and Try a Publicly Found Password
- Call
wifi_scan_networksto get nearby networks. - Prefer the SSID explicitly requested by the user. If none is provided, choose candidates by signal strength, name similarity, or user context.
- If the user asks to search for a public password, use web search for the SSID, store name, or venue name. Explain that public results are not guaranteed to be correct.
- After finding a candidate password, try
wifi_connectonce. Do not brute-force or repeatedly try passwords. - If it fails, explain likely causes: wrong password, wrong security type, weak signal, Android rejection, or vendor ROM limitation.
3. Switch to an Existing Wi-Fi
- Call
wifi_configured_networksto inspect saved entries. - If the user provided an SSID, match that SSID directly. If the user says something vague such as "home Wi-Fi", combine configured entries, scan results, and context to choose the best candidate.
- Call
wifi_connect(ssid)for a clear candidate. No password is needed for this attempt. - If the tool says a password is needed, Android has no verified saved credential for that SSID. Ask the user for the password or instruct them to connect manually.
4. Disconnect Wi-Fi
- Call
wifi_disconnect. - If the tool says Wi-Fi is disconnected or disconnecting, confirm the action.
- If Android rejects the request or settings are opened, tell the user to disconnect from the Wi-Fi settings page.
5. Forget Wi-Fi
- If the user specified an SSID, call
wifi_forget(ssid). - If the user asks to forget the current Wi-Fi but did not provide an SSID, call
wifi_statusfirst, then callwifi_forget. - Do not claim that the forgotten Wi-Fi password can be read or displayed.
- If the tool fails or opens settings, tell the user to forget the network manually in Android Wi-Fi settings.
Permissions and System Boundaries
- Common requirements include
ACCESS_WIFI_STATE,CHANGE_WIFI_STATE, location permission, and system Location being enabled. - Nearby Wi-Fi scanning may require location permission and system Location.
- targetSdk=28 can use legacy
WifiManagerAPIs, but behavior still depends on the device OS version and vendor ROM. - On Android 10/API 29 and later, apps targeting API 29+ are restricted from modifying Wi-Fi configuration with legacy APIs.
- Normal apps cannot read saved Wi-Fi plaintext passwords.
- Normal apps cannot reliably know that a password is definitely wrong. They can only infer failure when the phone does not connect to the target SSID after a connect attempt.
Agent Behavior Rules
- Minimize tool calls. Goal-oriented tools such as scan and connect already handle required Wi-Fi prerequisites.
- Trust the tool's action result. Do not explain intermediate API return values to the user.
- Use action-oriented wording: "Wi-Fi opened", "connected", "password needed", "please confirm manually". Do not expose function-level details such as
setEnabled=falseorenableNetwork=true. - If both SSID and password are already known, do not scan first.
- Use configured Wi-Fi entries only to decide whether a saved-connect attempt is worth trying. They do not prove the password is valid.
- On connection failure, do not assert that the password is wrong. Mention possible causes: wrong password, wrong security type, weak signal, Android rejection, or vendor limitation.
- When the user must enter a password, say that clearly. Do not attempt to read a saved password.
Completion Criteria
The task is complete when one of the following is true:
- The current Wi-Fi status or connection has been confirmed.
- Nearby Wi-Fi or configured Wi-Fi entries have been shown with their limitations.
- Wi-Fi has been connected, switched, disconnected, or forgotten.
- The user has been clearly told that a password, permission, system confirmation, or manual action is required.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

