skills/crazyswami/siteground-cache/SKILL.md
Bypass SiteGround caching (SG CachePress + LiteSpeed) for WordPress development. Adds cache-busting code to child themes for real-time development testing.
npx skillsauth add aiskillstore/marketplace siteground-cacheInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Bypass SiteGround caching (SG CachePress + LiteSpeed) for WordPress development. Adds cache-busting code to child themes for real-time development testing.
Claude is FORBIDDEN from deploying to production sites.
| Action | Allowed? | |--------|----------| | Deploy to staging | ✅ YES | | Deploy to production | ❌ ABSOLUTELY NEVER | | Read from production | ✅ YES (read-only) | | Write to production | ❌ ABSOLUTELY NEVER |
If user asks to deploy to production:
Production paths are BLOCKED. Any path that does NOT contain "staging" is off-limits for writes.
Before using this skill, Claude will ask for:
FTP/SFTP Credentials
ftp.example.com)Site URLs
https://staging.example.com)Theme Path
theme-child)Store credentials in project's CLAUDE.local.md (gitignored) for future sessions.
Local Development → Staging Site → [USER MANUALLY] → Production
↑ ↑ ↑
Claude edits Claude deploys USER deploys
Claude handles: Local editing + Staging deployment User handles: Production deployment (via SiteGround, FTP client, or manually)
/**
* SiteGround Cache Buster for Development
* Disables caching for logged-in administrators
* REMOVE OR DISABLE IN PRODUCTION when done testing
*/
// Development mode banner (shows version to confirm theme is active)
add_action('wp_head', 'sg_dev_mode_banner');
function sg_dev_mode_banner() {
if (current_user_can('administrator')) {
$theme = wp_get_theme();
$version = $theme->get('Version');
$name = $theme->get('Name');
echo '<style>
.sg-dev-banner {
position: fixed;
bottom: 20px;
right: 20px;
background: #34889A;
color: white;
padding: 10px 20px;
border-radius: 8px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: 12px;
z-index: 999999;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
</style>
<div class="sg-dev-banner">
' . esc_html($name) . ' v' . esc_html($version) . ' - ' . date('M j, H:i') . '
</div>';
}
}
// Disable all caching for administrators
add_action('init', 'sg_disable_cache_for_dev');
function sg_disable_cache_for_dev() {
if (current_user_can('administrator')) {
// Disable LiteSpeed Cache
if (!defined('LSCACHE_NO_CACHE')) {
define('LSCACHE_NO_CACHE', true);
}
// Disable SG Optimizer/CachePress
if (!defined('SG_CACHEPRESS_NO_CACHE')) {
define('SG_CACHEPRESS_NO_CACHE', true);
}
// Send no-cache headers
nocache_headers();
// Additional headers for CDN bypass
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
header('Pragma: no-cache');
header('Expires: Thu, 01 Jan 1970 00:00:00 GMT');
}
}
// Bust browser cache by adding timestamp to theme CSS/JS
add_filter('style_loader_src', 'sg_bust_asset_cache', 999);
add_filter('script_loader_src', 'sg_bust_asset_cache', 999);
function sg_bust_asset_cache($src) {
if (current_user_can('administrator')) {
// Only bust cache for theme assets
$theme_uri = get_stylesheet_directory_uri();
$parent_uri = get_template_directory_uri();
if (strpos($src, $theme_uri) !== false || strpos($src, $parent_uri) !== false) {
$src = add_query_arg('v', time(), $src);
}
}
return $src;
}
# Navigate to your project
cd /path/to/wordpress-project
# Run the injector script
/root/.claude/skills/siteground-cache/add-cache-buster.sh ./wp-content/themes/your-child-theme
functions.phpJust ask:
Claude will only deploy to staging.
Before deploying, ask the user:
I need FTP credentials to deploy to STAGING. Please provide:
1. FTP Host (e.g., ftp.yourdomain.com)
2. FTP Username
3. FTP Password
4. Staging site path (e.g., staging.yourdomain.com/public_html)
# STAGING ONLY - Never production!
lftp -u "user,password" -e "
set ssl:verify-certificate no
mirror -R ./child-theme staging.example.com/public_html/wp-content/themes/child-theme
bye
" ftp://ftp.example.com
Claude does NOT do this step. Tell the user:
The changes are ready on staging. To deploy to production:
Option 1: SiteGround Site Tools
- Go to Site Tools > WordPress > Staging
- Click "Push to Live"
Option 2: FTP Client (FileZilla, Cyberduck, etc.)
- Download from staging
- Upload to production
Option 3: Manual file copy via FTP
define('LSCACHE_NO_CACHE', true);
LiteSpeed Cache plugin checks for this constant and skips caching when set.
define('SG_CACHEPRESS_NO_CACHE', true);
SiteGround's caching plugin respects this constant.
nocache_headers();
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
Tells browsers and CDNs not to cache the response.
add_query_arg('v', time(), $src);
Adds ?v=1704567890 to CSS/JS URLs. Since the timestamp changes every second, browsers always fetch fresh files.
?v= timestamp is on CSS URLs/root/.claude/skills/siteground-cache/
├── SKILL.md # This documentation
├── add-cache-buster.sh # Auto-inject script
├── cache-buster.php # Standalone PHP snippet
└── remove-cache-buster.sh # Removal script
Store this in your project (gitignored):
# SiteGround Credentials (DO NOT COMMIT)
## FTP Access
- Host: ftp.example.com
- User: [email protected]
- Pass: your-password
- Port: 21
## Site URLs
- Staging: https://staging.example.com
- Production: https://example.com (READ-ONLY for Claude)
## Theme Paths
- Staging: staging.example.com/public_html/wp-content/themes/theme-child
- Production: OFF-LIMITS (user deploys manually)
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.