How It Works
Auto-Skill uses a hook-based observation model that captures workflow events without interfering with your normal coding sessions.Hook Installation
When you install Auto-Skill via
npx skills add MaTriXy/auto-skill, the system registers two hooks in your agent’s configuration:- PostToolUse hook — Captures every tool execution
- Stop hook — Analyzes the session when the agent stops
Event Recording
Each tool invocation is recorded to a local SQLite database with:
- Session ID
- Tool name and parameters
- Success/failure outcome
- Project path
- Agent type (detected automatically)
Pattern Analysis
When the session ends, Auto-Skill analyzes the captured events for:
- Repeated tool sequences (3+ occurrences)
- Success patterns
- Workflow intent (debug, implement, refactor)
- Design patterns (TDD, MVC, etc.)
Hook Configuration
Auto-Skill’s hooks are defined inhooks/hooks.json:
hooks/hooks.json
Observer Implementation
The observer hook captures tool usage events and stores them in the event database:Observation Flow
- Event Capture
- Session Analysis
Environment Variables
The observer automatically reads environment variables from your coding agent:| Variable | Purpose | Example |
|---|---|---|
CLAUDE_SESSION_ID | Unique session identifier | sess_abc123xyz |
CLAUDE_PROJECT_DIR | Current project directory | /home/user/my-project |
CLAUDE_PROJECT_ROOT | Auto-Skill installation directory | ~/.claude/skills/auto-skill |
Different coding agents may use different environment variable names. Auto-Skill’s agent registry automatically detects the correct variables for your agent.
Data Storage
All captured events are stored locally in SQLite:- events — Tool invocation records
- sessions — Session metadata
- patterns — Detected workflow patterns
- skill_adoptions — Tracking of skill usage and graduation
Multi-Agent Support
Auto-Skill detects your current coding agent automatically:Agent Detection
- Claude Code (
claude) - Cursor (
cursor) - Codex (
codex) - Aider (
aider) - Windsurf (
windsurf) - Continue (
continue)
Skills generated by Auto-Skill work across all supported agents through symlink-based sharing.
Next Steps
Custom Patterns
Configure detection thresholds and ignored tools
Mental Model
Integrate semantic codebase understanding
Skill Providers
Discover skills from external sources
Configuration
Complete configuration reference