Development
ruleset-optimization - Claude MCP Skill
Guidelines for optimizing Claude rulesets and instruction files (CLAUDE.md, settings.json) using context efficiency principles. Includes strategies for skill extraction, progressive disclosure, token savings calculation, and deduplication. Manually invoke when optimizing rulesets, reducing context size, extracting content to skills, or improving ruleset organization.
SEO Guide: Enhance your AI agent with the ruleset-optimization tool. This Model Context Protocol (MCP) server allows Claude Desktop and other LLMs to guidelines for optimizing claude rulesets and instruction files (claude.md, settings.json) using con... Download and configure this skill to unlock new capabilities for your AI workflow.
Documentation
SKILL.md# Ruleset Optimization Guidelines
**Auto-activate when:** Working with `CLAUDE.md`, `settings.json`, `SKILL.md` files, `.claude/` directory, or when user mentions ruleset optimization, context efficiency, skill extraction, token savings, or improving Claude Code configuration.
This skill provides comprehensive guidelines for optimizing Claude rulesets to minimize context usage while maximizing effectiveness.
## Context Efficiency Philosophy
**PRIMARY GOAL**: Minimize baseline context, maximize signal-to-noise ratio.
**Core Strategy:**
- **Skills for domain-specific rules** (git, python, web, containers): auto-load when relevant, 30-70% context reduction when inactive
- **CLAUDE.md minimal**: project overview, quick start, project-specific patterns, skill references only
- **Progressive disclosure**: baseline=always-needed (~20%), details=on-demand via skills (~80%)
## Decision Framework
### Extraction Decision Tree
```
Is content >200 tokens?
āā No ā Keep in CLAUDE.md
āā Yes ā Is it procedural?
āā No ā Keep in CLAUDE.md (policy)
āā Yes ā Is it used <70% of sessions?
āā No ā Keep in CLAUDE.md (always needed)
āā Yes ā Extract to skill (saves tokens)
```
### Move to Skills (Procedural "How-To")
- Step-by-step procedures, domain workflows, tool patterns, decision trees
- Language/framework-specific rules, optional best practices
### Keep in CLAUDE.md (Policy "What/Why")
- Core values, always-applicable preferences, security requirements
- File operation policies, communication style, project overview
### Token Savings Calculation
**Formula:** tokens Ć (1 - usage_frequency)
**Priority thresholds:**
- High: 500+ tokens, used <50% of time
- Medium: 200-500 tokens, used <30% of time
- Low: <200 tokens or used >70% of time
**Report format:**
- Before: X tokens baseline
- After: Y tokens baseline, Z with skills (when needed)
- Savings: (X - Y) tokens baseline (N% reduction)
## Deduplication Strategy
**Personal vs Project Rulesets:**
- Personal (~/.claude/CLAUDE.md): universal defaults
- Project (.claude/CLAUDE.md): project-specific overrides, takes precedence
- Never duplicate between them
**Across Skills:**
- Clear, non-overlapping scope per skill
- Reference other skills vs duplicating content
## Creating Effective Skills
### Structure Template
```markdown
---
name: skill-name
description: Clear description of when to activate and what it contains.
---
# Skill Title
Brief introduction and purpose.
## Core Content
[Domain-specific guidance]
```
### Activation Patterns
**Auto-activation triggers:**
- File patterns: .py, package.json, Dockerfile
- Git operations: commit, push, version control
- Project structure: directories, files present
**Manual invocation:**
- Slash commands: /optimize-prompt, /commit
- Explicit requests: "optimize this ruleset"
### Anti-Patterns
- Over-extraction: No skills for <100 tokens
- Under-referencing: Always add reference when removing content
- Duplication: Never duplicate between personal/project or across skills
- Poor organization: Don't mix domains in one skill
## Optimization Impact Examples
**Before:** 6,000 tokens baseline (all loaded)
**After:** 4,000 tokens baseline + 1,500 tokens in skills (selective)
**Result:** 33% baseline reduction, 25-33% typical session savings
**Compound benefits:**
- Optimization helps ALL projects using shared skills
- Clearer organization improves maintainability
- Faster context loading and better reasoning
- More room for project-specific context
## Maintenance Guidelines
### Regular Review
- Quarterly token usage review
- Check for new extraction opportunities
- Verify skill activation patterns
- Remove stale or unused skills
### Skill Evolution
- Update content as practices evolve
- Merge overlapping skills
- Split skills >1000 tokens
- Archive deprecated skills with notes
---
**This skill is manually invoked when optimizing rulesets or organizing Claude instructions.**
For command usage, see:
- `/optimize-ruleset` - Analyze and optimize current ruleset
- `/analyze-permissions` - Review permission patternsSignals
Information
- Repository
- ilude/claude-code-config
- Author
- ilude
- Last Sync
- 3/12/2026
- Repo Updated
- 2/15/2026
- Created
- 1/12/2026
Reviews (0)
No reviews yet. Be the first to review this skill!
Related Skills
cursorrules
CrewAI Development Rules
CLAUDE
CLAUDE.md
fastmcp-client-cli
Query and invoke tools on MCP servers using fastmcp list and fastmcp call. Use when you need to discover what tools a server offers, call tools, or integrate MCP servers into workflows.
browser-use
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, or extract information from web pages.
Related Guides
Python Django Best Practices: A Comprehensive Guide to the Claude Skill
Learn how to use the python django best practices Claude skill. Complete guide with installation instructions and examples.
Mastering Python and TypeScript Development with the Claude Skill Guide
Learn how to use the python typescript guide Claude skill. Complete guide with installation instructions and examples.
Mastering Data Science with Claude: A Complete Guide to the Pandas Scikit-Learn Skill
Learn how to use the pandas scikit learn guide Claude skill. Complete guide with installation instructions and examples.