instrlint 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/README.zh-TW.md +3 -1
- package/dist/cli.cjs +202 -104
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +198 -100
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/skills/claude-code/SKILL.md +24 -25
package/package.json
CHANGED
|
@@ -2,40 +2,39 @@
|
|
|
2
2
|
name: instrlint
|
|
3
3
|
description: Health check your CLAUDE.md and rule files — find dead rules, token waste, duplicates, contradictions, and stale references. Produces a scored health report (0-100) with auto-fix support.
|
|
4
4
|
command: /instrlint
|
|
5
|
-
argument-hint: "[budget|deadrules|structure|ci] [--fix] [--
|
|
5
|
+
argument-hint: "[budget|deadrules|structure|ci] [--fix] [--lang zh-TW]"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# instrlint
|
|
9
9
|
|
|
10
10
|
Lint and optimize agent instruction files. Produces a scored health report across three dimensions: token budget, dead rules, and structure.
|
|
11
11
|
|
|
12
|
+
## How to run
|
|
13
|
+
|
|
14
|
+
**Always run with `--format markdown`** so the report renders properly in Claude Code. Never use the default terminal format — it uses ANSI colors and box-drawing characters that don't display correctly here.
|
|
15
|
+
|
|
16
|
+
Then **present the markdown report directly to the user** — do not summarize or paraphrase it.
|
|
17
|
+
|
|
12
18
|
## Language detection
|
|
13
19
|
|
|
14
|
-
**Always detect the language of the current conversation before running
|
|
20
|
+
**Always detect the language of the current conversation before running:**
|
|
15
21
|
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
22
|
+
- 繁體中文 conversation → add `--lang zh-TW`
|
|
23
|
+
- English conversation → add `--lang en`
|
|
24
|
+
- Any other language → fall back to `--lang en`
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
- User writes in 繁體中文 → `npx instrlint --lang zh-TW`
|
|
22
|
-
- User writes in English → `npx instrlint --lang en`
|
|
23
|
-
- User writes in Japanese → `npx instrlint --lang en` (fallback)
|
|
26
|
+
## Command mapping
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
When the user runs `/instrlint [args]`, translate to:
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/instrlint --format markdown # Markdown output for PR comments
|
|
36
|
-
/instrlint --lang zh-TW # Output in Traditional Chinese
|
|
37
|
-
/instrlint install --claude-code # Install skill globally
|
|
38
|
-
```
|
|
30
|
+
| User input | Command to run |
|
|
31
|
+
|------------|---------------|
|
|
32
|
+
| `/instrlint` | `npx instrlint --format markdown --lang <detected>` |
|
|
33
|
+
| `/instrlint budget` | `npx instrlint budget --format markdown --lang <detected>` |
|
|
34
|
+
| `/instrlint deadrules` | `npx instrlint deadrules --format markdown --lang <detected>` |
|
|
35
|
+
| `/instrlint structure` | `npx instrlint structure --format markdown --lang <detected>` |
|
|
36
|
+
| `/instrlint --fix` | `npx instrlint --fix --lang <detected>` then present the fix summary as-is |
|
|
37
|
+
| `/instrlint ci --fail-on warning` | `npx instrlint ci --format markdown --fail-on warning --lang <detected>` |
|
|
39
38
|
|
|
40
39
|
## What it checks
|
|
41
40
|
|
|
@@ -50,9 +49,9 @@ Auto-applied (safe, deterministic):
|
|
|
50
49
|
- References to non-existent files (stale refs)
|
|
51
50
|
- Exact duplicate rules
|
|
52
51
|
|
|
53
|
-
Actionable suggestions shown (requires human judgment):
|
|
54
|
-
- Git hook suggestions —
|
|
55
|
-
- Path-scoped rule file suggestions —
|
|
52
|
+
Actionable suggestions shown after fix (requires human judgment):
|
|
53
|
+
- Git hook suggestions — copy-paste `.claude/settings.json` snippet
|
|
54
|
+
- Path-scoped rule file suggestions — ready-to-create file content
|
|
56
55
|
|
|
57
56
|
## Score and grade
|
|
58
57
|
|