Agent Skill · Webflow

webflow-mcp:custom-code-management

Add, review, or remove inline custom scripts on a Webflow site (up to 10,000 chars). Use for analytics, tracking pixels, chat widgets, or any custom JavaScript. Also manages page-level scripts.

Provider: Webflow Path in repo: plugins/webflow-skills/skills/custom-code-management/SKILL.md

Skill body

Custom Code Management

Add, review, and manage inline custom scripts on a Webflow site — analytics, tracking pixels, chat widgets, or any custom JavaScript.

Important Note

ALWAYS use Webflow MCP tools for all operations:

Instructions

Phase 1: Discovery

  1. Call webflow_guide_tool first — always the first MCP tool call
  2. Get the site: Use data_sites_tool with action list_sites. If only one site, use it automatically.

Phase 2: Analysis

  1. List scripts: Call list_registered_scripts and list_applied_scripts in parallel
  2. Check page-level scripts (if relevant): Use get_page_script for specific pages
  3. Present findings: Name, version, location (header/footer), registration vs application status

Phase 3: Planning & Confirmation

Before any mutation, present the plan and require explicit confirmation:

Phase 4: Execution

  1. Add site script: add_inline_site_script with displayName, sourceCode, version, location, canCopy
  2. Remove all site scripts: delete_all_site_scripts
  3. Add/update page script: upsert_page_script
  4. Remove page scripts: delete_all_page_scripts

Phase 5: Verification

  1. Re-list scripts to confirm success
  2. Report what changed (name, location, version, char count)
  3. Remind user to publish — suggest using safe-publish skill

Examples

Example 1: View scripts

User: “What scripts are on my site?”

  1. webflow_guide_tooldata_sites_toollist_registered_scripts + list_applied_scripts in parallel
  2. Present summary of all scripts

Example 2: Add Google Tag Manager

User: “Add GTM to my site”

  1. webflow_guide_tooldata_sites_tool → ask for GTM container ID
  2. Preview script, require “add” → add_inline_site_script (header, version “1.0.0”)
  3. Verify and remind to publish

Example 3: Remove all scripts

User: “Remove all scripts”

  1. webflow_guide_tooldata_sites_tool → list current scripts
  2. Warn: removes ALL scripts. Require “delete all” → delete_all_site_scripts
  3. Verify and remind to publish

Example 4: Page-specific tracking

User: “Add conversion tracking to my thank-you page”

  1. webflow_guide_tooldata_sites_toolget_page_script to check existing
  2. Preview, require “update” → upsert_page_script
  3. Verify and remind to publish

Guidelines