agentleFS
emilianoeloiemilianoeloi/ios-WK-UI-WebView/.github/skills/legacy-webview-implementation/SKILL.md

legacy-webview-implementation

Skill3 starsChanged 4 months agoMITView on GitHub

Use when: implementing Objective-C changes in WKWebView/UIWebView flow, JavaScript bridge, and navigation behavior with minimal risk.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 8 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the runtime flow or bridge contract is unclear, run legacy-webview-analysis first

    line 15
  2. Distinctive:

    Keep WKWebView and fallback expectations aligned

    line 24
  3. Distinctive:

    Add focused tests when behavior can be isolated

    line 26
  4. Distinctive:

    If the build cannot run in your environment, state the limitation explicitly — never claim validation that did not happen

    line 39
  5. Distinctive:

    Keep architecture simple and focused on requested behavior

    line 43
  6. Distinctive:

    Do not change unrelated files or flows

    line 44
  7. Distinctive:

    Prefer centralized constants over duplicated literals

    line 45
  8. Distinctive:

    Add comments only for non-obvious bridge/navigation edge cases

    line 46
  9. Distinctive:

    No accidental API or contract breakage

    line 59

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Legacy WebView Implementation

Purpose

Implement production-safe fixes and enhancements in this legacy iOS WebView project.

Phase 0 — Read (no edits)

  1. Confirm target behavior from README and the current code path
  2. If the runtime flow or bridge contract is unclear, run legacy-webview-analysis first

Gate

  1. State the minimal file touch set before editing. If the request is ambiguous, stop and ask instead of guessing scope.

Phase 1 — Implement

  1. Patch minimally in Objective-C and preserve existing conventions
  2. Keep WKWebView and fallback expectations aligned
  3. Preserve bridge contract (handler names, protocol queue semantics)
  4. Add focused tests when behavior can be isolated

Phase 2 — Validate

  1. Build with the canonical command from AGENTS.md:
xcodebuild -project ios-WK-UI-Webview.xcodeproj \
  -scheme ios-WK-UI-Webview \
  -destination 'generic/platform=iOS Simulator' \
  IPHONEOS_DEPLOYMENT_TARGET=12.0 build
  1. If the build cannot run in your environment, state the limitation explicitly — never claim validation that did not happen

Quality Rules

  • Keep architecture simple and focused on requested behavior
  • Do not change unrelated files or flows
  • Prefer centralized constants over duplicated literals
  • Add comments only for non-obvious bridge/navigation edge cases

Anti-example (do not do)

"While fixing the redirect, I also modernized the delegate wiring and renamed two handlers for clarity."

Unrequested scope. Handler names are a public contract; renames are a migration, not a fix.

Definition of Done

  • Change is scoped and understandable
  • Core navigation/bridge flow remains stable
  • Validation completed (build/test or explicit limitation note)
  • No accidental API or contract breakage

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.