Skip to main content
Auto-Skill is designed to work out-of-the-box with sensible defaults, but provides extensive configuration options for customization.

Configuration Structure

Configuration is defined by the Config interface:
Config Interface
export interface Config {
  detection: DetectionConfig;        // Pattern detection settings
  agents: AgentSettings;             // Multi-agent configuration
  providers: ProviderSettings;       // Skill provider configuration
  dbPath: string | null;             // Custom database path
  skillsOutputDir: string | null;    // Custom skills output directory
  enabled: boolean;                  // Master enable/disable switch
}

Detection Configuration

Controls how patterns are detected and filtered:
DetectionConfig
export interface DetectionConfig {
  minOccurrences: number;        // Minimum pattern repetitions (default: 3)
  minSequenceLength: number;     // Minimum tools in sequence (default: 2)
  maxSequenceLength: number;     // Maximum tools in sequence (default: 10)
  lookbackDays: number;          // Analysis window in days (default: 7)
  minConfidence: number;         // Minimum confidence score (default: 0.7)
  ignoredTools: string[];        // Tools to exclude (default: ['AskUserQuestion'])
}

Default Detection Config

{
  minOccurrences: 3,
  minSequenceLength: 2,
  maxSequenceLength: 10,
  lookbackDays: 7,
  minConfidence: 0.7,
  ignoredTools: ['AskUserQuestion']
}
Detect patterns more aggressively (more noise, faster learning):
detection:
  min_occurrences: 2
  min_confidence: 0.6
  lookback_days: 14

Agent Settings

Configures multi-agent support and skill sharing:
AgentSettings
export interface AgentSettings {
  autoDetect: boolean;       // Auto-detect current agent (default: true)
  targetAgents: string[];    // Agents to share skills with (default: [])
  symlinkSkills: boolean;    // Use symlinks for cross-agent sharing (default: true)
}

Default Agent Settings

{
  autoDetect: true,
  targetAgents: [],
  symlinkSkills: true
}

Agent Configuration Examples

agents:
  auto_detect: true
  symlink_skills: true
When symlinkSkills: true, Auto-Skill creates symlinks from ~/.claude/skills/auto/ to other agents’ skill directories (e.g., ~/.cursor/skills/auto/).

Provider Settings

Configures skill discovery sources:
ProviderSettings
export interface ProviderSettings {
  enabledProviders: string[];    // Active providers (default: ['skillssh'])
  wellknownDomains: string[];    // Domains for RFC 8615 discovery (default: [])
}

Default Provider Settings

{
  enabledProviders: ['skillssh'],
  wellknownDomains: []
}

Provider Configuration Examples

providers:
  enabled_providers:
    - local
    - skillssh
    - wellknown
  wellknown_domains:
    - company.internal
    - skills.example.com

Custom Paths

Override default storage locations:
Custom Paths
{
  dbPath: '/custom/path/events.db',
  skillsOutputDir: '/custom/path/skills'
}

Default Paths

SettingDefaultDescription
dbPath~/.claude/auto-skill/events.dbSQLite event database
skillsOutputDir~/.claude/skills/auto/Generated skills directory
Custom paths must be absolute. Relative paths will cause errors.

Master Enable/Disable

Disable Auto-Skill entirely:
Disable Auto-Skill
---
enabled: false
---
When disabled, hooks will exit immediately without recording events or analyzing patterns.

Configuration File

Create .claude/auto-skill.local.md in your project root:
.claude/auto-skill.local.md
---
detection:
  min_occurrences: 5
  min_confidence: 0.8
  ignored_tools:
    - AskUserQuestion
    - WebFetch

agents:
  auto_detect: true
  target_agents:
    - claude
    - cursor
  symlink_skills: true

providers:
  enabled_providers:
    - local
    - skillssh
  wellknown_domains:
    - company.internal

enabled: true
---

# Auto-Skill Configuration

This file customizes Auto-Skill for this project.

## Notes

- We use aggressive detection (5 occurrences) because this is a mature project
- Skills are shared between Claude and Cursor
- We use both local and Skills.sh providers
1

Create Directory

mkdir -p .claude
2

Create Config File

touch .claude/auto-skill.local.md
3

Add YAML Frontmatter

Edit the file and add configuration in YAML frontmatter (between --- markers).
4

Load Config

Auto-Skill automatically loads the config when running in this project.

Loading Configuration

Loading Config
import { loadConfig } from '@matrixy/auto-skill';

// Load default config
const defaultConfig = loadConfig();

// Load config with project overrides
const projectConfig = loadConfig('/path/to/project');

console.log(projectConfig.detection.minOccurrences); // From .local.md or default

Configuration Merging

Configuration is merged with the following precedence:
  1. Project-local config (.claude/auto-skill.local.md)
  2. Default config (built-in defaults)
Only fields present in the local config override defaults. Missing fields use defaults.

Environment Variables

Some settings can be controlled via environment variables:
VariablePurposeExample
AUTO_SKILL_NO_TELEMETRYDisable telemetryexport AUTO_SKILL_NO_TELEMETRY=1
DO_NOT_TRACKDisable telemetryexport DO_NOT_TRACK=1
GITHUB_TOKENSkills.sh API authexport GITHUB_TOKEN=ghp_xxx
AUTO_SKILL_DB_PATHCustom database pathexport AUTO_SKILL_DB_PATH=/tmp/events.db
AUTO_SKILL_SKILLS_DIRCustom skills directoryexport AUTO_SKILL_SKILLS_DIR=~/my-skills
Environment variables take precedence over configuration file settings.

Complete Example

.claude/auto-skill.local.md
---
# Pattern Detection
detection:
  min_occurrences: 4
  min_sequence_length: 2
  max_sequence_length: 12
  lookback_days: 14
  min_confidence: 0.75
  ignored_tools:
    - AskUserQuestion
    - WebFetch
    - Task
    - TodoWrite

# Multi-Agent Support
agents:
  auto_detect: true
  target_agents:
    - claude
    - cursor
    - aider
  symlink_skills: true

# Skill Providers
providers:
  enabled_providers:
    - local
    - skillssh
    - wellknown
  wellknown_domains:
    - skills.company.internal
    - devtools.acme.com

# Custom Paths (optional)
# db_path: /custom/path/events.db
# skills_output_dir: /custom/path/skills

# Master Switch
enabled: true
---

# Auto-Skill Configuration for MyProject

This project uses Auto-Skill with custom settings optimized for our workflow.

## Rationale

- **4 occurrences minimum**: We have high code reuse, so 3 was too noisy
- **14-day lookback**: Team works on features for 1-2 weeks
- **75% confidence**: We prefer quality over quantity
- **Multi-agent**: Team uses Claude, Cursor, and Aider
- **Internal registry**: We have company-approved skills at skills.company.internal

## Maintenance

Update this config as team workflow evolves. Commit to version control.

CLI Configuration Commands

CLI Commands
# Initialize config file
auto-skill init

# Show current config
auto-skill config show

# Validate config file
auto-skill config validate

# Set a config value
auto-skill config set detection.min_occurrences 5

# Get a config value
auto-skill config get detection.min_confidence
CLI config commands are planned for v6.0. Currently, you must edit .claude/auto-skill.local.md manually.

Configuration Best Practices

Check .claude/auto-skill.local.md into Git so the entire team uses consistent settings:
git add .claude/auto-skill.local.md
git commit -m "Add Auto-Skill configuration"
Use the markdown body to explain why you chose specific settings:
---
detection:
  min_occurrences: 5
---

# Why 5 occurrences?

Our team is small and patterns repeat less frequently.
3 occurrences led to too many false positives.
Begin with higher thresholds and relax them if needed:
detection:
  min_occurrences: 5
  min_confidence: 0.8
It’s easier to lower thresholds than to deal with noise.
Different projects may need different configs:
  • New projects: Aggressive detection to bootstrap skills
  • Mature projects: Conservative detection, patterns are established
  • Experiments: Disable Auto-Skill entirely (enabled: false)

Troubleshooting

Check:
  • File is named exactly .claude/auto-skill.local.md
  • File is in the project root (same directory as .git/)
  • YAML frontmatter is valid (use --- markers)
  • Field names use snake_case (min_occurrences, not minOccurrences)
Debug:
import { loadConfig, parseYamlFrontmatter } from '@matrixy/auto-skill';
import fs from 'node:fs';

const content = fs.readFileSync('.claude/auto-skill.local.md', 'utf-8');
const frontmatter = parseYamlFrontmatter(content);
console.log(frontmatter);
Possible causes:
  • minOccurrences too high (lower to 2-3)
  • minConfidence too high (lower to 0.6)
  • lookbackDays too short (increase to 14-30)
  • Tools in sequence are in ignoredTools list
  • Not enough sessions recorded yet
Check:
auto-skill stats
Solutions:
  • Increase minOccurrences to 5-7
  • Increase minConfidence to 0.8-0.85
  • Add noisy tools to ignoredTools
  • Decrease maxSequenceLength to 6-8

Next Steps

Custom Patterns

Deep dive into pattern detection configuration

Integration Guide

Learn how configuration affects the integration

CLI Reference

Complete CLI command reference

Build docs developers (and LLMs) love