CLI Config
Analyzer config file
The CLI reads an optional JSON config file named config.json to customize analysis. The format is documented in Configurations.
Location resolution
The config directory is resolved in this priority order:
If
$SKILL_LAB_CONFIG_DIRis set, source from$SKILL_LAB_CONFIG_DIR/config.jsonIf
$XDG_CONFIG_DIRis set, source from$XDG_CONFIG_DIR/skill-lab/config.json.Otherwise,
slabwill try to fetch config.json from- Linux / macOS:
~/.config/skill-lab - Windows:
%APPDATA%\skill-lab(or%LOCALAPPDATA%\skill-lab)
- Linux / macOS:
If no config files found, use default config.
For how to write configuration files, please refere to configuration guide
Grammar cache
Skill Lab downloads tree-sitter grammar .wasm files on first use and caches them locally. The cache location follows the XDG Base Directory Specification.
Cache directory resolution
The cache directory is resolved in this priority order:
$SKILL_LAB_CACHE_DIR— explicit override; use any path you like.$XDG_CACHE_HOME/skill-lab— if$XDG_CACHE_HOMEis set.Platform default:
- Linux / macOS:
~/.cache/skill-lab - Windows:
%LOCALAPPDATA%\skill-lab\Cache
- Linux / macOS:
Grammar files are stored under <cache-dir>/treesitter/grammars/, for example:
~/.cache/skill-lab/treesitter/grammars/bash.wasm
~/.cache/skill-lab/treesitter/grammars/typescript.wasmEnvironment variables
| Variable | Description |
|---|---|
SKILL_LAB_CACHE_DIR | Override the cache directory entirely. Takes precedence over XDG and platform defaults. |
XDG_CACHE_HOME | Standard XDG cache base directory. If set, Skill Lab uses $XDG_CACHE_HOME/skill-lab. |
Example: custom cache location
export SKILL_LAB_CACHE_DIR=/mnt/fast-disk/skill-lab-cache
slab analyze .Clearing the cache
To force a re-download of all grammar files, delete the grammars/ subdirectory:
rm -rf ~/.cache/skill-lab/grammarsThe next slab invocation will re-download all required grammars.