
delegating-to-cdn-agent
by ryancnelson
AI Assistant Delegation Framework - Keep your context clean by delegating API queries to specialized sub-agents ๐
SKILL.md
name: Delegating to CDN Agent description: Recognize Fastly CDN queries and delegate to specialized sub-agent to avoid context pollution keywords: fastly, cdn, cache, vcl, backends, purge, origin, varnish, delegate, agent when_to_use: When user mentions "fastly", "cdn", "cache purge", "vcl", "backends", or asks about CDN services. ALWAYS delegate to sub-agent. version: 1.0.0
Delegating to CDN Agent
Core Principle
Never handle Fastly CDN operations directly. Always delegate to a specialized sub-agent to keep your context clean and costs low.
Recognition Patterns
Delegate when user says:
- "query fastly for..."
- "list fastly services"
- "show cdn configuration"
- "purge cache"
- "describe fastly service"
- "list backends"
- "show VCL"
- "clear cdn cache"
- Any mention of: fastly, cdn, cache, vcl, backends, purge, origin servers, varnish
ExampleJobInc-Specific Triggers
Also delegate when user mentions these ExampleJobInc domains:
- "pi.examplejobinc-cdn.com"
- "images.examplejobinc.com"
- "hls.examplejobinc.com"
- "assets.examplejobinc.com"
- "embed.examplejobinc.com"
- "crushinator" (image processing backend)
How to Delegate
Use the Task tool with a specialized prompt:
Task(
subagent_type: "general-purpose",
description: "Query Fastly CDN",
prompt: "<full agent instructions from AGENT-INSTRUCTIONS.md>"
)
Agent Prompt Template
When delegating, include:
- The complete agent instructions (see AGENT-INSTRUCTIONS.md)
- The user's specific request
- Clear output format requirements
Example:
You are a Fastly CDN specialist. Your job is to query Fastly using shell wrappers and return clean results.
<AGENT INSTRUCTIONS HERE>
USER REQUEST: List all Fastly services
Return a clean summary with:
- Service names
- Service IDs
- Service types
- Last updated dates
After Agent Returns
- Present results cleanly to user
- Offer follow-up if relevant (e.g., "Would you like to see backends for pi.examplejobinc-cdn.com?")
- Don't expose mechanics (API calls, tokens, CLI commands) to user
Benefits
- โ Main context stays clean
- โ Cheaper queries (sub-agent uses less expensive model)
- โ Specialized knowledge isolated
- โ Scalable pattern for other CDN operations
Example Flow
User: "list fastly services"
Main Assistant: [Recognizes Fastly query]
โ Invokes Task tool with agent instructions
โ Agent runs cdn-services wrapper
โ Agent returns formatted results
Main Assistant: "Found 8 Fastly services:
1. pi.examplejobinc-cdn.com - Image processing CDN
2. images.examplejobinc.com - Static images
3. hls.examplejobinc.com - Video streaming
...
Would you like details on any of these?"
Common Query Types
Service Management:
- "list fastly services"
- "describe pi.examplejobinc-cdn.com service"
- "show cdn configuration"
Backend Investigation:
- "list backends for pi.examplejobinc-cdn.com"
- "show origin servers"
- "describe crushinator backend"
VCL Configuration:
- "list VCL configurations"
- "show VCL content for version 42"
- "view custom VCL"
Cache Management:
- "purge all cache for pi.examplejobinc-cdn.com"
- "clear cdn cache"
- "invalidate surrogate key image-cache"
- "purge specific URL"
Red Flags
DON'T:
- โ Try to run fastly-* scripts yourself
- โ Attempt Fastly API calls directly
- โ Load detailed Fastly CLI knowledge
- โ Handle authentication directly
- โ Parse complex CDN configurations
DO:
- โ Immediately delegate on Fastly keywords
- โ Trust the sub-agent's results
- โ Present clean summaries to user
- โ Suggest relevant follow-up queries
- โ Warn about cache purge impact
Cache Purge Safety
When user requests cache purging:
- Always delegate to sub-agent (never do yourself)
- Confirm service before agent purges
- Warn about impact of full cache purges
- Prefer specific purges (URL/key) over --all
The sub-agent handles this, but you should reinforce warnings in your response.
ExampleJobInc Infrastructure Context
ExampleJobInc uses Fastly for:
- Image CDN (pi.examplejobinc-cdn.com) - Crushinator-powered image processing
- Video CDN (hls.examplejobinc.com) - HLS streaming
- Static assets (images.examplejobinc.com, assets.examplejobinc.com)
- Website CDN (www.examplejobinc.com)
When user mentions investigating these systems, delegate to Fastly agent.
Version History
- 1.0.0 (2025-10-15): Initial delegation skill created to reduce context pollution
Score
Total Score
Based on repository quality metrics
SKILL.mdใใกใคใซใๅซใพใใฆใใ
ใฉใคใปใณในใ่จญๅฎใใใฆใใ
100ๆๅญไปฅไธใฎ่ชฌๆใใใ
GitHub Stars 100ไปฅไธ
3ใถๆไปฅๅ ใซๆดๆฐใใใ
10ๅไปฅไธใใฉใผใฏใใใฆใใ
ใชใผใใณIssueใ50ๆชๆบ
ใใญใฐใฉใใณใฐ่จ่ชใ่จญๅฎใใใฆใใ
1ใคไปฅไธใฎใฟใฐใ่จญๅฎใใใฆใใ
Reviews
Reviews coming soon