Detection Configuration
Pattern detection behavior is controlled by theDetectionConfig interface:
DetectionConfig Interface
Default Values
minOccurrences
Default:
3A tool sequence must appear at least 3 times across different sessions to be considered a pattern.minSequenceLength
Default:
2Sequences must contain at least 2 tools. Single-tool patterns are too generic.maxSequenceLength
Default:
10Sequences longer than 10 tools are truncated. Very long patterns are often noise.lookbackDays
Default:
7Analyzes the last 7 days of sessions. Older patterns may be stale.minConfidence
Default:
0.7Only patterns with 70%+ confidence are suggested for skill generation.ignoredTools
Default:
["AskUserQuestion"]These tools are excluded from pattern detection (too interactive).Configuration File
You can override defaults using a project-local configuration file:.claude/auto-skill.local.md
The configuration file uses YAML frontmatter, similar to SKILL.md files. The body content is optional and ignored.
Loading Configuration
Configuration is loaded with project-specific overrides:Loading Config
- Starts with default values
- Looks for
.claude/auto-skill.local.mdin the project directory - Parses YAML frontmatter
- Merges overrides into the default config
- Returns the merged
Configobject
Confidence Scoring
Auto-Skill calculates confidence using a weighted formula:Occurrence Score (40%)
Logarithmic scaling rewards frequent patterns:
- 3 occurrences → ~0.60
- 5 occurrences → ~0.78
- 10 occurrences → ~1.00
Success Score (25%)
Ratio of successful executions:
- 100% success → 1.0
- 80% success → 0.8
- 50% success → 0.5
Ignoring Tools
Some tools should be excluded from pattern detection because they:- Are too interactive (
AskUserQuestion) - Fetch external content (
WebFetch) - Delegate to other agents (
Task) - Are Auto-Skill commands themselves
- Configuration
- Runtime Filtering
Tuning for Your Workflow
I want more aggressive pattern detection
I want more aggressive pattern detection
Lower the occurrence threshold and minimum confidence:Tradeoff: You may see more false positives and noise.
I only want high-confidence patterns
I only want high-confidence patterns
Raise the confidence threshold and occurrence requirement:Tradeoff: You may miss useful patterns that haven’t repeated enough yet.
I work on multiple projects simultaneously
I work on multiple projects simultaneously
Increase the lookback period:Tradeoff: Older patterns may no longer be relevant.
I want to detect longer workflows
I want to detect longer workflows
Increase the max sequence length:Tradeoff: Very long sequences are harder to match and may be too specific.
Pattern Detection Pipeline
Advanced: Per-Tool Weights
Coming in v6.0: Per-tool weighting will allow you to assign importance scores to specific tools, influencing confidence calculations.
Example Patterns by Confidence
Next Steps
Configuration Reference
Complete reference for all config options
Integration Guide
Learn how patterns are detected in real-time