Skip to content
Conduit

skill

shader-cache-optimization-agent-skill

๐ŸŽฎโšก Game Shader Cache & Stutter Elimination Engine | Production-grade Claude Code skill & Python harness (v2.0.0) for graphics optimization. Features PSO pre-compilation, driver cache tuning, & crawl4

Set up

Skills are installed by placing their folder where your agent loads skills.

The download comes from github.com/dungnotnull/shader-cache-optimization-agent-skill itself, not from our server, so what you get is exactly what its author published.

Install instructions come from the README

Skills do not use an MCP config. Follow the steps in the README below.

README

synced Oct 22, 2026

shader-cache-optimization

Shader Cache Optimization to Eliminate Game Stuttering

Claude Skill License: MIT Python 3.11+ Production Ready

A bulletproof production-grade Claude Code harness for Shader Compilation & Cache Performance Engineering โ€” features flexible agent architecture with hooks system, type-safe configuration management, graceful degradation, and comprehensive automation. Gathers real-time authoritative data from GPU vendors, applies systematic optimization methods, integrates academic research, and delivers evidence-backed, risk-disclosed outputs to eliminate shader-compilation stutter in games.


Table of Contents


Why This Skill

Shader Compilation & Cache Performance Engineering practitioners face three structural problems:

  1. Data Fragmentation: Authoritative driver documentation, API specifications, and engine guidelines are scattered across vendor websites, Khronos registry, and game engine docs.
  2. Methodology Gaps: Most stutter-fix advice lacks systematic evidence, tiered sources, or quantitative benchmarks.
  3. No Self-Improvement: Static tools don't learn from new research, driver updates, or community discoveries.

shader-cache-optimization addresses all three by unifying real-time data aggregation, recognized optimization frameworks, and a continuously-updated academic knowledge base into one evidence-backed, risk-disclosed workflow.


Features

Core Capabilities

  • Real-Time Data Aggregation: Fetches current driver cache configurations, API specifications, and engine documentation from authoritative sources
  • Systematic Analysis Methods: Applies structured profiling, PSO trigger identification, and cache optimization strategies
  • Academic Research Integration: Tier-labeled evidence hierarchy (Tier 1: Systematic Review โ†’ Tier 4: News) with automatic citation
  • Risk-Disclosed Outputs: Every recommendation includes probability assessment, impact analysis, and mitigation strategies
  • Self-Improving Knowledge Pipeline: Weekly academic crawl + daily news feed automatically updates SECOND-KNOWLEDGE-BRAIN.md
  • Multi-Scenario Analysis: Best/Base/Worst case modeling with probability estimates
  • Graceful Degradation: 5-level fallback chain (Level 0: Full โ†’ Level 4: Data Unavailable) with explicit LIMITATION banners
  • Bilingual Support: Vietnamese and English output with automatic language detection

Analysis Types

  • Profile-Focused: Identify shader compilation bottlenecks with frametime quantification
  • Strategy-Focused: Develop comprehensive optimization plans (async/pre-build/cache/warm-up)
  • Config-Focused: Driver and engine cache tuning with platform-specific settings
  • Combined: Full analysis with all above components

Installation

Prerequisites

  • Python 3.11 or higher
  • Claude Code CLI or compatible harness
  • Git (for cloning)

Install Dependencies

pip install -r requirements.txt

Install Skill

Option 1: Project-Level (Recommended)

# Clone or navigate to project directory
cd D:\972026\255-shader-cache-optimization

# Skill is available via project CLAUDE.md
# No additional installation needed

Option 2: Global Installation

# Copy skill files to global skills directory
mkdir -p ~/.claude/skills
cp -r skills/* ~/.claude/skills/

# Copy knowledge base
cp SECOND-KNOWLEDGE-BRAIN.md ~/.claude/

Verify Installation

# Check skill is available
/shader-cache-optimization --help

# Run validation
python tools/validate_project.py

Quick Start

Basic Usage

/shader-cache-optimization Analyze shader compilation stutter in Cyberpunk 2077 on NVIDIA RTX 3080 with Vulkan API

With Profiling Data

/shader-cache-optimization Optimize shader cache for Elden Ring. Frametime spikes 150ms on new area loads. DXVK on Linux.

Vietnamese Language

/shader-cache-optimization Tแป‘i ฦฐu shader cache cho game GTA V bแป‹ stutter khi chuyแปƒn cแบฃnh. GPU AMD RX 6800 XT.

Usage

Standard Analysis

/shader-cache-optimization [query in English or Vietnamese]

Required Information (if not provided, skill will ask):

  • Game/application name
  • Graphics API (Vulkan/DX11/DX12/OpenGL)
  • GPU vendor (NVIDIA/AMD/Intel)
  • Stutter pattern (first-play, intermittent, consistent)

With Profiling Data

Provide frametime measurements or profiling logs:

/shader-cache-optimization Analyze stutter in [game]. PresentMon shows 200ms spikes on shader compilation. RenderDoc logs attached.

Comparison Analysis

/shader-cache-optimization Compare shader cache strategies between Vulkan and DX11 for [game]

Feasibility Assessment

/shader-cache-optimization Assess feasibility of eliminating shader stutter in [game] with [constraints]

Architecture

Harness Flow

USER INPUT
    โ”‚
    โ–ผ
[main.md โ€” Pre-Flight: Language Detection]
    โ”‚
    โ”œโ”€โ–บ Step 1: sub-gather-requirements
    โ”‚   โ†’ Object, scope, stutter profile, inputs, constraints
    โ”‚
    โ”œโ”€โ–บ Step 2: sub-evidence-collector
    โ”‚   โ†’ Driver docs, API specs, engine docs, benchmarks
    โ”‚
    โ”œโ”€โ–บ Step 3: sub-core-analysis
    โ”‚   โ†’ Profiling, PSO triggers, async/pre-build, cache config
    โ”‚
    โ”œโ”€โ–บ Step 4: sub-knowledge-updater
    โ”‚   โ†’ Academic citations with tier labels, gap flags
    โ”‚
    โ”œโ”€โ–บ Step 5: sub-advisor
    โ”‚   โ†’ Verdict, scenarios, risks, evidence chain, remediation
    โ”‚
    โ””โ”€โ–บ Step 6: Quality Gate Review
        โ†’ Verify U1-U6 + G1-G4 โ†’ Auto-fix โ†’ Limitation flags

File Structure

255-shader-cache-optimization/
โ”œโ”€โ”€ SKILL.md                          # Skill registry documentation
โ”œโ”€โ”€ CLAUDE.md                         # Skill identity card
โ”œโ”€โ”€ PROJECT-detail.md                 # Full technical specification
โ”œโ”€โ”€ PROJECT-DEVELOPMENT-PHASE-TRACKING.md  # Build roadmap
โ”œโ”€โ”€ DEVELOPMENT-TRACKING.md          # Session development tracking
โ”œโ”€โ”€ README.md                         # This file
โ”œโ”€โ”€ SECOND-KNOWLEDGE-BRAIN.md         # Living knowledge base
โ”œโ”€โ”€ requirements.txt                  # Python dependencies
โ”œโ”€โ”€ pyproject.toml                    # Python package configuration
โ”œโ”€โ”€ LICENSE                           # MIT license
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ config/                           # Configuration management
โ”‚   โ”œโ”€โ”€ default.yaml                  # Base configuration
โ”‚   โ”œโ”€โ”€ production.yaml               # Production overrides
โ”‚   โ”œโ”€โ”€ development.yaml              # Development overrides
โ”‚   โ””โ”€โ”€ hooks.yaml                    # Hooks configuration
โ”œโ”€โ”€ scripts/                          # Automation scripts
โ”‚   โ”œโ”€โ”€ setup.sh                      # Unix/Linux setup
โ”‚   โ”œโ”€โ”€ setup.bat                     # Windows setup
โ”‚   โ””โ”€โ”€ deploy.sh                     # Deployment script
โ”œโ”€โ”€ references/                       # Reference documentation
โ”‚   โ”œโ”€โ”€ domain-knowledge.md           # Domain reference material
โ”‚   โ””โ”€โ”€ prompt-templates.md           # Reusable prompt templates
โ”œโ”€โ”€ assets/                           # Static resources
โ”‚   โ”œโ”€โ”€ schemas.json                  # JSON validation schemas
โ”‚   โ””โ”€โ”€ system-diagram.md             # Architecture documentation
โ”œโ”€โ”€ skills/                           # Sub-skill files
โ”‚   โ”œโ”€โ”€ main.md                       # Primary harness orchestrator
โ”‚   โ”œโ”€โ”€ sub-gather-requirements.md    # Intake specialist
โ”‚   โ”œโ”€โ”€ sub-evidence-collector.md     # Data librarian
โ”‚   โ”œโ”€โ”€ sub-core-analysis.md          # Cache performance engineer
โ”‚   โ”œโ”€โ”€ sub-knowledge-updater.md      # Research librarian
โ”‚   โ””โ”€โ”€ sub-advisor.md                # Senior advisor
โ”œโ”€โ”€ src/                              # Python package
โ”‚   โ””โ”€โ”€ shader_cache_optimization/
โ”‚       โ”œโ”€โ”€ __init__.py               # Package exports
โ”‚       โ”œโ”€โ”€ hooks.py                  # Hooks implementation
โ”‚       โ”œโ”€โ”€ config.py                 # Configuration management
โ”‚       โ””โ”€โ”€ degradation.py            # Degradation management
โ”œโ”€โ”€ tools/                            # Validation and crawl tools
โ”‚   โ”œโ”€โ”€ knowledge_updater.py          # Knowledge crawl pipeline
โ”‚   โ”œโ”€โ”€ test_knowledge_updater.py     # Unit tests
โ”‚   โ”œโ”€โ”€ validate_project.py          # 8-File Contract validator
โ”‚   โ””โ”€โ”€ run_test_scenarios.py        # End-to-end test runner
โ”œโ”€โ”€ tests/                            # Test scenarios
โ”‚   โ”œโ”€โ”€ test-scenarios.md            # Test scenario definitions
โ”‚   โ””โ”€โ”€ TEST_RESULTS.md              # Test results
โ””โ”€โ”€ logs/                             # Runtime logs (created at runtime)

Quality Gates

Universal Gates (U1-U6)

GateRequirement
U1โ‰ฅ3 sources cited, โ‰ฅ1 academic/authoritative (Tier 1-2)
U2Disclosure/limitations before recommendation
U3Evidence hierarchy stated per source (Tier 1-4)
U4Language matches user preference
U5Output uses declared template (all sections)
U6Every claim traceable to โ‰ฅ1 source or flagged

Domain Gates (G1-G4)

GateRequirement
G1Compile spikes profiled with severity quantification
G2Async/pre-build compilation strategy applied
G3Cache persistence & invalidation configured
G4First-play warm-up addressed with method and time budget

Enforcement Logic

  • Each gate checked in order (U1โ†’U2โ†’...โ†’U6โ†’G1โ†’...โ†’G4)
  • Auto-fix procedure runs on failure
  • 2 retry attempts per gate
  • After 2 failures: explicit limitation notice emitted, continue to next gate
  • Final output: Post-Execution Gate Checklist showing pass/fail/limited status

Data Sources

Domain Authoritative Sources

GPU Driver Documentation:

API Specifications:

Game Engine Documentation:

Open Source Projects:

Academic & Research Sources

Journals:

  • IEEE Transactions on Visualization and Computer Graphics (TVCG)
  • ACM Transactions on Graphics (TOG)
  • Computers & Graphics (Elsevier)
  • Journal of Computer Graphics Techniques (JCGT)
  • Entertainment Computing (Elsevier)

Conferences:

  • SIGGRAPH / SIGGRAPH Asia
  • Eurographics
  • i3D (Interactive 3D Graphics and Games)
  • GDC (Game Developers Conference)

Knowledge Update Schedule

# Weekly academic update (Mondays 8:00 AM)
0 8 * * 1 python D:/972026/255-shader-cache-optimization/tools/knowledge_updater.py >> logs/knowledge_update.log 2>&1

# Daily news update (Daily 7:00 AM)
0 7 * * * python D:/972026/255-shader-cache-optimization/tools/knowledge_updater.py --news-only >> logs/knowledge_news.log 2>&1

Testing

Run All Tests

# Validate 8-File Contract
python tools/validate_project.py

# Unit tests for knowledge updater
python tools/test_knowledge_updater.py

# End-to-end scenario tests
python tools/run_test_scenarios.py --all

Test Scenarios

The test suite (tests/test-scenarios.md) defines 5 comprehensive scenarios:

  1. Scenario 1: Standard analysis with complete inputs
  2. Scenario 2: Minimal-input analysis (defaults applied)
  3. Scenario 3: Comparison scenario (two objects/cases)
  4. Scenario 4: Risk/feasibility or conflict scenario
  5. Scenario 5: Degraded-mode scenario (missing data)

Expected Results

All scenarios should:

  • Complete without harness failure
  • Exercise all universal gates (U1-U6)
  • Exercise all domain gates (G1-G4)
  • Cover all verdict categories (Stutter-Free, Conditional, Persistent, Inconclusive)
  • Include proper LIMITATION banners when applicable

Knowledge Base

SECOND-KNOWLEDGE-BRAIN.md is the living knowledge base automatically updated by the crawl pipeline. It contains:

  1. Core Concepts & Frameworks โ€” Foundational methods for shader compilation and cache optimization
  2. Key Research Papers & Standards โ€” Peer-reviewed sources with DOIs and tier labels
  3. State-of-the-Art Methods & Tools โ€” Current best practices and emerging techniques
  4. Authoritative Data Sources โ€” Curated list of domain-specific resources
  5. Analytical Frameworks โ€” Structured approaches to common problems
  6. Self-Update Protocol โ€” Crawl configuration and dedup rules
  7. Knowledge Update Log โ€” Automated entries with relevance scores

Manual Knowledge Query

# View knowledge base
cat SECOND-KNOWLEDGE-BRAIN.md

# Search for specific topic
grep -i "pipeline cache" SECOND-KNOWLEDGE-BRAIN.md

Development

Project Status

Version: 2.0.0 Status: BULLETPROOF PRODUCTION READY Phase: Phase 6 (Production-Grade Architecture Upgrade) โ€” 100% Complete

Build & Validation

# Clone repository
git clone https://github.com/972026-skill-library/255-shader-cache-optimization.git
cd 255-shader-cache-optimization

# Install dependencies
pip install -r requirements.txt

# Run validation suite
python tools/validate_project.py
python tools/test_knowledge_updater.py
python tools/run_test_scenarios.py

Project Structure Compliance

This project adheres to the 972026 Skill Library Standard v1.0:

  • 8-File Contract: โœ… All required files present
  • Sub-skills: โœ… 5 production-grade sub-skills
  • Quality gates: โœ… U1-U6 + G1-G4 defined and enforced
  • Knowledge pipeline: โœ… Crawl, dedup, scoring implemented
  • Test coverage: โœ… 5 scenarios with full gate coverage

Roadmap

Completed (v2.0.0)

  • Phase 0: Architecture & source mapping
  • Phase 1: Core sub-skills (production-grade)
  • Phase 2: Main harness + quality gates
  • Phase 3: Knowledge pipeline + tests
  • Phase 4: Testing & validation
  • Phase 5: Integration & polish
  • Phase 6: Production-grade architecture upgrade

Future Enhancements (v2.1+)

  • Real-time shader compilation profiling integration
  • GPU-specific cache tuning automation
  • Community shader cache sharing platform
  • Multi-game batch analysis
  • Mobile graphics API support (Metal, GLES)
  • Web service wrapper for REST API
  • Real-time monitoring dashboard

Contributing

Contributions are welcome! Please ensure:

  1. Code Style: Follow PEP 8 for Python; Markdown for documentation
  2. Testing: Add test scenarios for new features
  3. Documentation: Update relevant sections in CLAUDE.md, README.md
  4. Validation: Run python tools/validate_project.py before submitting

Submission Process

  1. Fork repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

License

MIT License โ€” see LICENSE for details.

Copyright (c) 2026 972026 Skill Library

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.


Acknowledgments

  • Khronos Group โ€” Vulkan specification and pipeline cache documentation
  • GPUOpen (AMD) โ€” Open-source graphics optimization resources
  • NVIDIA Developer โ€” Shader cache best practices
  • DXVK Project โ€” Vulkan-based DX11 implementation and caching
  • Mesa3D โ€” Open-source OpenGL/Vulkan drivers
  • 972026 Skill Library โ€” Standard and scaffold tools

Citation

If you use this skill in research or production, please cite:

@software{shader_cache_optimization,
  title = {shader-cache-optimization: Shader Cache Optimization to Eliminate Game Stuttering},
  author = {{972026 Skill Library}},
  year = {2026},
  version = {2.0.0},
  url = {https://github.com/972026-skill-library/255-shader-cache-optimization}
}

Contact


Built with โค๏ธ for the graphics programming community

โ†‘โ†“ navigate openesc close