android-webview-debug
Skill6 starsChanged 6 days agoMITView on GitHub
Unified WebView remote debugging toggle for Android projects. `android-webview-debug-enable` sets all `setWebContentsDebuggingEnabled` calls to `true` and records modified locations with their original content; `android-webview-debug-revert` restores from the record, listing any mismatched entries at the end for manual confirmation. Triggers: 「开启 WebView 调试」「恢复 WebView 调试」 / android-webview-debug-enable, android-webview-debug-revert. Suitable for Android projects that need to uniformly enable or restore WebView debugging.
In this repository79 other files it gives its agents.
- AGENTS.mdAGENTS.md
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-bulk-archive-changeSkill
- openspec-continue-changeSkill
- openspec-exploreSkill
- openspec-ff-changeSkill
- openspec-new-changeSkill
- openspec-onboardSkill
- openspec-sync-specsSkill
- openspec-verify-changeSkill
- ai-proxy-disciplineSkill
- analysis-coreSkill
- article-writerSkill
- astrill-controlSkill
- brainstorm-workflowSkill
- browser-debug-toolkitSkill
- clarifying-question-disciplineSkill
- code-design-reviewSkill
- competitive-researchSkill
- completion-evidence-disciplineSkill
- context-budget-disciplineSkill
- decision-fog-disciplineSkill
- delivery-disciplineSkill
- design-approval-gateSkill
- domain-language-disciplineSkill
- effective-web-researchSkill
- essence-diagnosisSkill
- evolution-reviewSkill
- explain-clearlySkill
- feature-branch-closeoutSkill
- figma-pixel-implementSkill
- figma-pixel-verifySkill
- git-branch-protectSkill
- git-commitSkill
- git-conflict-resolveSkill
- git-release-finishSkill
- git-release-startSkill
- git-worktree-disciplineSkill
- goal-driven-queueSkill
- goal-driven-workflowSkill
- go-deploySkill
- hybrid-debugSkill
- intake-interview-disciplineSkill
- jira-fix-queueSkill
- jira-fix-workflowSkill
- jira-readSkill
- jira-status-lifecycleSkill
- jira-status-writebackSkill
- jira-wiki-markupSkill
- known-issue-researchSkill
- learn-and-improveSkill
- merge-disciplineSkill
- multi-agent-debateSkill
- node-version-disciplineSkill
- opsx-jira-fix-queueSkill
- opsx-jira-fix-workflowSkill
- opsx-solve-workflowSkill
- opsx-workspace-gateSkill
- perf-optimize-workflowSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Creation timing: Only created or overwritten when android-webview-debug-enable runs.
- Very specific: line 37
Note: Only entries actually changed in this enable session are recorded (calls already set to true are not included).
- Very specific: line 43
Search: Use grep or codebase search to find all setWebContentsDebuggingEnabled occurrences (including commented lines), list all locations.
- Distinctive: line 45
Optional confirmation: If user input is needed, present 1–2 quick choices (e.g., "Change all to true?" "Also modify commented-out calls?").
- Very specific: line 46
Existing state: If .android-webview-debug-state.json already exists in the project root, first prompt: "An enable record already exists.
- Very specific: line 55
Read state file: Read .android-webview-debug-state.json from the project root.
- Distinctive: line 59
Mismatch: Do not auto-revert; add to the "mismatched" list (record file, line, current line summary).
- Distinctive: line 60
Complete all restorable items first: Only apply replacements for entries where the current line matches the record.
- Distinctive: line 69
revert: Only restores entries recorded in the state file.
- Distinctive: line 70
State file: Only one copy in the project root.
- Very specific: line 76
After enable: All non-commented setWebContentsDebuggingEnabled calls in the project should be true, and .android-webview-debug-state.json …
- Very specific: line 77
After revert: Restored lines should match the original in the state file.
≈ “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
Android WebView Debug Toggle
Triggers
- 「开启 WebView 调试」 / android-webview-debug-enable: Change all
setWebContentsDebuggingEnabledcalls in the project totrue, and record modified locations with their original content for later revert. - 「恢复 WebView 调试」 / android-webview-debug-revert: Restore previously modified locations from the record; entries that don't match the record are not auto-reverted — they are listed at the end for user confirmation.
State File Convention
- Path:
.android-webview-debug-state.jsonin the project/workspace root directory. - Creation timing: Only created or overwritten when android-webview-debug-enable runs; revert only reads (can be deleted or archived after restore is complete).
- Format:
{
"version": 1,
"createdAt": "ISO8601",
"projectRoot": "/absolute/path/to/project",
"entries": [
{
"file": "app/src/main/java/.../CoreWebView.kt",
"line": 42,
"original": "setWebContentsDebuggingEnabled(AppContext.isDebug())",
"replaced": "setWebContentsDebuggingEnabled(true)"
}
]
}- Note: Only entries actually changed in this enable session are recorded (calls already set to
trueare not included). Recommend adding.android-webview-debug-state.jsonto.gitignoreto avoid accidental commits.
android-webview-debug-enable Flow
- Search: Use grep or codebase search to find all
setWebContentsDebuggingEnabledoccurrences (including commented lines), list all locations. - Classify: Mark each location as "already true", "conditional or other expression", or "commented out".
- Optional confirmation: If user input is needed, present 1–2 quick choices (e.g., "Change all to true?" "Also modify commented-out calls?"). User can answer briefly like "1A 2B".
- Existing state: If
.android-webview-debug-state.jsonalready exists in the project root, first prompt: "An enable record already exists. Overwrite and continue?" Wait for user confirmation before overwriting. - Write state file: Before making any code replacements, generate
entriesfor items about to be changed and write.android-webview-debug-state.json(path: project root). - Execute replacements: Change "conditional or other expression" calls to
setWebContentsDebuggingEnabled(true). Do not modify commented-out calls by default, unless the user explicitly says "also change commented ones" or "uncomment them". - Summary: Briefly list modified files and entry count.
android-webview-debug-revert Flow
- Read state file: Read
.android-webview-debug-state.jsonfrom the project root. If not found, prompt: "No enable record found, cannot revert" and exit. - Iterate entries:
- For each entry: read the corresponding file/line and compare with
replaced(or check if it containssetWebContentsDebuggingEnabled(true)). - Match: Replace the line with
original(restore pre-modification content). - Mismatch: Do not auto-revert; add to the "mismatched" list (record file, line, current line summary).
- For each entry: read the corresponding file/line and compare with
- Complete all restorable items first: Only apply replacements for entries where the current line matches the record.
- Final prompt and manual confirmation: If there are mismatched entries, output the list at the end: "The following N entries don't match the enable record (may have been manually modified). Confirm whether to restore per the record or skip." Restore or skip each entry based on user choice.
- Summary: Report number of restored entries; if all restored, prompt: "You can now delete .android-webview-debug-state.json or add it to .gitignore."
Default Rules
- enable: Does not modify commented-out
setWebContentsDebuggingEnabledcalls by default; user can override with a single phrase (e.g., "also change commented ones"). - revert: Only restores entries recorded in the state file; mismatched entries are not auto-reverted — always listed at the end for manual confirmation.
- State file: Only one copy in the project root; enable overwrites, revert only reads.
Verification Checklist
- After enable: All non-commented
setWebContentsDebuggingEnabledcalls in the project should betrue, and.android-webview-debug-state.jsonshould exist in the root withentriesmatching this session's modifications. - After revert: Restored lines should match the
originalin the state file; mismatched entries should be listed and processed per user confirmation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

