assimilate-popular-wor…
This skill should be used when the user asks to "find skills in the wild", "assimilate popular workflows", "discover SKILL.md…
Comprehensive Content Security Policy audit for MCP Apps in sandboxed iframes. Discovers all network origins, traces them to source, and generates CSP configuration for registerAppResource.
Claude Code
$ npx -y skills add a5c-ai/babysitter --skill mcp-csp-investigation --agent claude-code
Codex
$ npx skills add a5c-ai/babysitter --skill mcp-csp-investigation -a codex -y
Cursor
$ npx skills add a5c-ai/babysitter --skill mcp-csp-investigation -a cursor -y
Gemini CLI
$ npx skills add a5c-ai/babysitter --skill mcp-csp-investigation -a gemini-cli -y
GitHub Copilot
$ npx skills add a5c-ai/babysitter --skill mcp-csp-investigation -a github-copilot -y
OpenCode
$ npx skills add a5c-ai/babysitter --skill mcp-csp-investigation -a opencode -y
Windsurf
$ npx skills add a5c-ai/babysitter --skill mcp-csp-investigation -a windsurf -y
name: mcp-csp-investigation description: Comprehensive Content Security Policy audit for MCP Apps in sandboxed iframes. Discovers all network origins, traces them to source, and generates CSP configuration for registerAppResource. allowed-tools: Read, Bash, Glob, Grep graph: domains: [domain:software-engineering] specializations: [specialization:ai-agents-conversational] skillAreas: [skill-area:mcp-server-implementation, skill-area:web-security] roles: [role:backend-engineer, role:fullstack-engineer] workflows: [workflow:feature-development] topics: [topic:api-design]
Perform exhaustive Content Security Policy audits for MCP Apps running in sandboxed iframes where all network requests fail SILENTLY without proper CSP declarations.
MCP Apps run in sandboxed iframes with no same-origin server. This means:
This skill provides a systematic methodology for discovering every network origin an app uses, tracing each to its source, and generating the correct CSP configuration.
# Build to produce final output files npm run build # Identify all output files find dist/ -type f \( -name "*.html" -o -name "*.js" -o -name "*.css" \)
# Search for URL patterns in build output
grep -rEoh 'https?://[a-zA-Z0-9._-]+[a-zA-Z0-9._/-]*' dist/ | sort -u
# Search for protocol-relative URLs
grep -rEoh '//[a-zA-Z0-9._-]+\.[a-zA-Z]{2,}' dist/ | sort -u
# Search for fetch/XHR patterns in source
grep -rn 'fetch\|XMLHttpRequest\|axios\|\.get\(\|\.post\(' src/
# Search for WebSocket connections
grep -rn 'new WebSocket\|wss://\|ws://' src/
# Search for dynamic imports and lazy loading
grep -rn 'import(\|require(\|loadScript' src/For each discovered origin, determine:
| Origin | Source Type | Environment | Category | |--------|-----------|-------------|----------| | `https://cdn.example.com` | Hardcoded constant | Universal | resourceDomains | | `https://api.example.com` | Environment variable (`API_URL`) | Conditional | connectDomains | | `https://fonts.googleapis.com` | Third-party library | Universal | resourceDomains | | `wss://realtime.example.com` | Conditional (feature flag) | Prod-only | connectDomains |
# Check node_modules for hidden network requests grep -rn 'fetch\|XMLHttpRequest\|beacon\|sendBeacon' node_modules/<lib>/dist/ 2>/dev/null # Common hidden request sources: # - Analytics (Google Analytics, Segment, Mixpanel) # - Error tracking (Sentry, Bugsnag, Datadog) # - Font loading (Google Fonts, Adobe Fonts) # - CDN fallbacks (jQuery CDN, unpkg) # - Map tiles (Mapbox, Google Maps, Leaflet)
The CSP object goes in the `contents[]` return from `registerAppResource`:
import { registerAppResource, RESOURCE_MIME_TYPE } from '@modelcontextprotocol/ext-apps';
registerAppResource(server, {
uri: 'app:///my-app',
name: 'My App',
mimeType: RESOURCE_MIME_TYPE,
async read() {
return {
contents: [{
uri: 'app:///my-app',
mimeType: RESOURCE_MIME_TYPE,
text: bundledHtml,
// CSP configuration goes HERE, in contents[]
resourceDomains: [
'https://cdn.example.com',
'https://fonts.googleapis.com',
'https://fonts.gstatic.com',
],
connectDomains: [
'https://api.example.com',
...(process.env.NODE_ENV === 'development'
? ['http://localhost:3000']
: []),
],
frameDomains: [],
}],
};
},
});For every origin that depends on configuration or environment:
// WRONG: Runtime URL uses config but CSP doesn't include it const apiUrl = process.env.API_URL || 'https://api.example.com'; fetch(apiUrl); // Works for default, fails for custom API_URL // RIGHT: Same config controls both runtime URL and CSP entry const apiUrl = process.env.API_URL || 'https://api.example.com'; // In registerAppResource: connectDomains: [apiUrl], // CSP matches runtime URL
1. **Silent failures**: Missing CSP origin = resource silently doesn't load. No console error, no network error. 2. **CSP in wrong location**: CSP goes in `contents[]` from `registerAppResource` read callback, NOT in `_meta` on the tool. 3. **Forgetting localhost*
Enforce obedience on agentic workforces. Manage extremely complex workflows through deterministic, hallucination-free self-orchestration.
This skill should be used when the user asks to "find skills in the wild", "assimilate popular workflows", "discover SKILL.md…
This skill should be used when the user asks to "babysit issues", "work on assigned issues", "check a5c-agent issues", "process…
Discover public GitHub repositories that import defineTask from @a5c-ai/babysitter-sdk and maintain a deduplicated catalog of…
This skill should be used when the user asks to "fix pipelines", "fix CI", "check staging pipelines", "fix failing workflows",…
Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase…
For a repository in the babysitter-users catalog, locate its babysitter processes and any committed runs (.a5c/runs/<runId>/) and…
Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…