feat(settings-audit): Add Claude Code settings optimizer skill
- Add new 00-claude-code-setting skill for token usage optimization - Includes audit scripts for MCP servers, CLAUDE.md, and extensions - Auto-fix capability with backup for serverInstructions and frontmatter - Add YAML frontmatter to 17 command files - Target: keep baseline under 30% of 200K context limit Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,26 @@ description: Automated Google Tag Manager audit and validation toolkit. Use when
|
||||
|
||||
Automated audit workflow for GTM containers using **Chrome DevTools MCP** for browser inspection and **DTM Agent MCP** for GTM API operations.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Chrome GTM Debug Profile (Required)
|
||||
|
||||
Before starting any GTM audit, launch the dedicated Chrome GTM Debug profile:
|
||||
|
||||
```bash
|
||||
chrome-gtm
|
||||
```
|
||||
|
||||
This launches Chrome with remote debugging enabled on port 9222, which is required for the chrome-devtools MCP server to connect.
|
||||
|
||||
| Item | Value |
|
||||
|------|-------|
|
||||
| **Profile Location** | `~/Library/Application Support/Chrome-GTM-Debug` |
|
||||
| **Debug Port** | 9222 |
|
||||
| **Launch Script** | `~/Utilities/chrome-gtm-debug.sh` |
|
||||
|
||||
**Note**: This is a separate Chrome instance from your regular browser. Install GTM-related extensions (Tag Assistant, etc.) in this profile for debugging work.
|
||||
|
||||
## Required MCP Servers
|
||||
|
||||
This skill requires the following MCP servers to be configured:
|
||||
@@ -16,6 +36,8 @@ This skill requires the following MCP servers to be configured:
|
||||
| **chrome-devtools** | Browser debugging & inspection | `navigate_page`, `evaluate_script`, `list_network_requests`, `list_console_messages`, `click`, `hover`, `take_screenshot`, `performance_start_trace` |
|
||||
| **dtm-agent** | GTM API operations | `dtm_status`, `dtm_list_tags`, `dtm_get_tag`, `dtm_list_triggers`, `dtm_get_trigger`, `dtm_list_variables`, `dtm_debug_performance`, `dtm_debug_preview` |
|
||||
|
||||
**Important**: The chrome-devtools MCP server requires Chrome to be running with `--remote-debugging-port=9222`. Always run `chrome-gtm` first before attempting to use chrome-devtools tools.
|
||||
|
||||
## Critical Workflow Rule
|
||||
|
||||
**ALWAYS use Chrome DevTools MCP FIRST before making GTM configuration changes.**
|
||||
@@ -31,6 +53,13 @@ GTM triggering and parameter capturing issues are highly dependent on:
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ PHASE 0: SETUP │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Run `chrome-gtm` to launch Chrome GTM Debug profile │
|
||||
│ Verify: curl http://127.0.0.1:9222/json/version │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
↓
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ PHASE 1: INSPECT (Chrome DevTools MCP) │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ 1. navigate_page → Load target URL │
|
||||
|
||||
Reference in New Issue
Block a user