Slash Command161 repo starsupdated 7d ago
lint
The `/lint` command compares the FILETREE.md documentation against the current repository structure and reports any discrepancies in a categorized summary showing added, changed, removed, and renamed files. Use this read-only check before syncing the repository to identify drift, then run `/filetree:update` if changes are detected to reconcile documentation with actual file state.
Install in Claude Code
Copymkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/nekocode/filetree-skill/HEAD/commands/lint.md -o ~/.claude/commands/lint.mdThen start a new Claude Code session; the slash command loads automatically.
Definition
lint.md
Run the drift check and present results to the user:
```bash
python3 "${CLAUDE_PLUGIN_ROOT}/skills/filetree/scripts/filetree.py" lint
```
The script outputs JSON and exits 1 if there is any drift, 0 if clean.
Format the JSON for the user, grouped by category (added / changed / removed / renamed) with counts. If `stats.need_llm > 0` or there are any `removed` / `renamed` entries, remind the user to run `/filetree:update` to sync.
Do not call any LLM. Do not modify any files. Do not load the filetree SKILL.md — lint is pure script invocation, no shared rules apply here.
Do not echo the raw JSON back to the user verbatim. A summary of counts plus the drift paths (truncated if many) is enough; users can re-run the script if they want full output.