claude-scope 1.0.1 → 1.1.0
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/.claude/skills/scope/SKILL.md +170 -0
- package/README.md +25 -12
- package/package.json +4 -1
- package/scripts/install-skill.sh +37 -0
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scope
|
|
3
|
+
description: Configure claude-scope status line widgets for Claude Code. Use when user wants to customize widgets, change theme, reorder elements, or modify display style.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
allowed-tools: Read, Edit
|
|
6
|
+
argument-hint: [configuration change in natural language]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Claude Scope Configuration Skill
|
|
10
|
+
|
|
11
|
+
Help users configure their claude-scope status line widgets.
|
|
12
|
+
|
|
13
|
+
## Configuration Path
|
|
14
|
+
|
|
15
|
+
**Config file:** `~/.claude-scope/config.json`
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
1. **Read** current config from `~/.claude-scope/config.json`
|
|
20
|
+
2. **Understand** what the user wants to change
|
|
21
|
+
3. **Edit** the config using the Edit tool
|
|
22
|
+
4. **Confirm** changes to the user
|
|
23
|
+
|
|
24
|
+
Changes apply automatically on the next status line render cycle.
|
|
25
|
+
|
|
26
|
+
## Quick Reference
|
|
27
|
+
|
|
28
|
+
### Config Structure
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"version": "1.0.0",
|
|
33
|
+
"theme": "monokai",
|
|
34
|
+
"lines": {
|
|
35
|
+
"0": [{ "id": "model", "style": "balanced", "colors": {...} }],
|
|
36
|
+
"1": [{ "id": "git", "style": "balanced", "colors": {...} }]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- `lines` is an object where keys are line numbers ("0", "1", "2", etc.)
|
|
42
|
+
- Each line contains an array of widget configurations
|
|
43
|
+
- Widgets render left-to-right within each line
|
|
44
|
+
- Empty lines should be empty arrays `[]`
|
|
45
|
+
|
|
46
|
+
### Available Widgets (16)
|
|
47
|
+
|
|
48
|
+
| Widget ID | Description | Typical Line |
|
|
49
|
+
|-----------|-------------|--------------|
|
|
50
|
+
| `cwd` | Current working directory | 0 |
|
|
51
|
+
| `model` | Claude model name (e.g., "Claude Opus 4.5") | 0 |
|
|
52
|
+
| `context` | Context window usage with progress bar | 0 |
|
|
53
|
+
| `cost` | Session cost in USD | 0 |
|
|
54
|
+
| `duration` | Session elapsed time | 0 |
|
|
55
|
+
| `lines` | Lines added/removed during session | 0 |
|
|
56
|
+
| `git` | Current git branch and changes | 1 |
|
|
57
|
+
| `git-tag` | Latest git tag | 1 |
|
|
58
|
+
| `config-count` | CLAUDE.md, rules, MCPs, hooks counts | 1 |
|
|
59
|
+
| `cache-metrics` | Cache hit rate and cost savings | 1 |
|
|
60
|
+
| `active-tools` | Running and completed Claude tools | 2 |
|
|
61
|
+
| `dev-server` | Dev server status (Nuxt, Next, Vite) | 2 |
|
|
62
|
+
| `docker` | Docker container count and status | 2 |
|
|
63
|
+
| `sysmon` | System metrics (CPU, RAM, Disk, Network) | 3 |
|
|
64
|
+
| `poker` | Random poker hand (easter egg) | 4 |
|
|
65
|
+
| `empty-line` | Blank separator line | any |
|
|
66
|
+
|
|
67
|
+
### Available Themes (17)
|
|
68
|
+
|
|
69
|
+
`monokai` (default), `nord`, `dracula`, `catppuccin-mocha`, `tokyo-night`,
|
|
70
|
+
`vscode-dark-plus`, `github-dark-dimmed`, `dusty-sage`, `muted-gray`,
|
|
71
|
+
`slate-blue`, `professional-blue`, `rose-pine`, `semantic-classic`,
|
|
72
|
+
`solarized-dark`, `one-dark-pro`, `cyberpunk-neon`, `gray`
|
|
73
|
+
|
|
74
|
+
### Available Styles
|
|
75
|
+
|
|
76
|
+
| Style | Description |
|
|
77
|
+
|-------|-------------|
|
|
78
|
+
| `balanced` | Clean, balanced with labels (default) |
|
|
79
|
+
| `compact` | Minimal, condensed |
|
|
80
|
+
| `playful` | Fun with emojis |
|
|
81
|
+
| `verbose` | Full text labels |
|
|
82
|
+
| `technical` | Raw values, no formatting |
|
|
83
|
+
| `labeled` | Explicit prefix labels |
|
|
84
|
+
| `minimal` | Most compact, no labels |
|
|
85
|
+
|
|
86
|
+
## Common Operations
|
|
87
|
+
|
|
88
|
+
### Swap widgets within a line
|
|
89
|
+
|
|
90
|
+
Read config, change the order of widget objects in the line's array.
|
|
91
|
+
|
|
92
|
+
**Example:** Swap model and context on line 0:
|
|
93
|
+
```json
|
|
94
|
+
// Before
|
|
95
|
+
"0": [{ "id": "model", ... }, { "id": "context", ... }]
|
|
96
|
+
// After
|
|
97
|
+
"0": [{ "id": "context", ... }, { "id": "model", ... }]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Swap entire lines
|
|
101
|
+
|
|
102
|
+
Exchange the arrays between two line keys.
|
|
103
|
+
|
|
104
|
+
**Example:** Swap line 0 and line 1 contents.
|
|
105
|
+
|
|
106
|
+
### Add a widget
|
|
107
|
+
|
|
108
|
+
Add a widget object to the target line array. Use existing widgets in config as template for the `colors` field.
|
|
109
|
+
|
|
110
|
+
**Example:** Add docker widget to line 2:
|
|
111
|
+
```json
|
|
112
|
+
{ "id": "docker", "style": "balanced", "colors": { "label": "...", "count": "...", "running": "...", "stopped": "..." } }
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Remove a widget
|
|
116
|
+
|
|
117
|
+
Remove the widget object from the line array. Don't leave empty objects.
|
|
118
|
+
|
|
119
|
+
### Move widget to different line
|
|
120
|
+
|
|
121
|
+
1. Remove widget object from source line
|
|
122
|
+
2. Add widget object to target line
|
|
123
|
+
|
|
124
|
+
### Change theme
|
|
125
|
+
|
|
126
|
+
Update the `"theme"` field value.
|
|
127
|
+
|
|
128
|
+
**Important:** Changing theme also requires updating all `colors` fields in every widget.
|
|
129
|
+
**Recommendation:** For full theme changes, suggest user run:
|
|
130
|
+
```bash
|
|
131
|
+
npx claude-scope quick-config
|
|
132
|
+
```
|
|
133
|
+
This provides an interactive menu with live preview.
|
|
134
|
+
|
|
135
|
+
### Change widget style
|
|
136
|
+
|
|
137
|
+
Update the `"style"` field for the target widget.
|
|
138
|
+
|
|
139
|
+
### Change all styles at once
|
|
140
|
+
|
|
141
|
+
Update `"style"` field for every widget in config to the same value.
|
|
142
|
+
|
|
143
|
+
## Full Documentation
|
|
144
|
+
|
|
145
|
+
For detailed information about widgets, styles, colors, and themes, read the full documentation:
|
|
146
|
+
|
|
147
|
+
- **Main reference:** AI-CONFIG-GUIDE.md in claude-scope repository
|
|
148
|
+
- **All widgets with examples:** docs/WIDGETS.md
|
|
149
|
+
- **Theme system:** docs/THEME-SYSTEM.md
|
|
150
|
+
- **Architecture:** docs/ARCHITECTURE.md
|
|
151
|
+
|
|
152
|
+
## Important Rules
|
|
153
|
+
|
|
154
|
+
1. **Never break JSON structure** - validate before saving
|
|
155
|
+
2. **Preserve required fields** - keep `version` and `$aiDocs` fields
|
|
156
|
+
3. **Empty lines must be `[]`** - don't remove line keys, use empty arrays
|
|
157
|
+
4. **ANSI color format** - colors use `\u001b[38;2;R;G;Bm` escape codes
|
|
158
|
+
5. **Use existing colors as template** - when adding widgets, copy colors from similar existing widgets
|
|
159
|
+
|
|
160
|
+
## Example User Requests
|
|
161
|
+
|
|
162
|
+
| User says | Action |
|
|
163
|
+
|-----------|--------|
|
|
164
|
+
| "Swap first and second line" | Exchange lines "0" and "1" arrays |
|
|
165
|
+
| "Add docker widget" | Add docker widget to appropriate line |
|
|
166
|
+
| "Remove cost widget" | Remove cost widget from its line |
|
|
167
|
+
| "Make everything compact" | Change all widget styles to "compact" |
|
|
168
|
+
| "Use Dracula theme" | Update theme field (suggest quick-config for colors) |
|
|
169
|
+
| "Move git to first line" | Remove git from current line, add to line 0 |
|
|
170
|
+
| "Show current config" | Read and display the config file |
|
package/README.md
CHANGED
|
@@ -130,24 +130,37 @@ npx -y claude-scope@latest quick-config
|
|
|
130
130
|
|
|
131
131
|
## ⚙️ Configuration
|
|
132
132
|
|
|
133
|
-
### 🤖 AI-Powered
|
|
133
|
+
### 🤖 /scope — AI-Powered Configuration
|
|
134
134
|
|
|
135
|
-
**claude-scope
|
|
135
|
+
**claude-scope** includes a built-in Claude Code skill for effortless configuration. Just type `/scope` or ask naturally:
|
|
136
136
|
|
|
137
|
+
<div align="center">
|
|
138
|
+
<img src="assets/scope-skill.png" alt="/scope skill demo" width="600"/>
|
|
139
|
+
<br/>
|
|
140
|
+
<sub>Configure widgets with natural language — no manual editing needed</sub>
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
<br/>
|
|
144
|
+
|
|
145
|
+
**Use the `/scope` command:**
|
|
146
|
+
```
|
|
147
|
+
/scope swap line 0 and line 1
|
|
148
|
+
/scope add docker widget to line 2
|
|
149
|
+
/scope change theme to dracula
|
|
150
|
+
/scope make all widgets compact
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Or just ask Claude naturally:**
|
|
137
154
|
```
|
|
138
|
-
"
|
|
139
|
-
"Switch
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"Add system monitoring"
|
|
155
|
+
"Move git widget to the first line"
|
|
156
|
+
"Switch to nord theme"
|
|
157
|
+
"Show me current config"
|
|
158
|
+
"Remove the cost widget"
|
|
143
159
|
```
|
|
144
160
|
|
|
145
|
-
|
|
161
|
+
The skill is installed automatically with the package — no setup required!
|
|
146
162
|
|
|
147
|
-
|
|
148
|
-
- Config contains `$aiDocs` field linking to [AI-CONFIG-GUIDE.md](AI-CONFIG-GUIDE.md)
|
|
149
|
-
- AI understands all 15 widgets, 12 styles, and 17 themes
|
|
150
|
-
- Natural language → instant configuration
|
|
163
|
+
Changes apply instantly on the next status line update.
|
|
151
164
|
|
|
152
165
|
### 📝 Manual Configuration
|
|
153
166
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-scope",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Claude Code plugin for session status and analytics",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -10,10 +10,13 @@
|
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/claude-scope.cjs",
|
|
13
|
+
".claude/skills/",
|
|
14
|
+
"scripts/install-skill.sh",
|
|
13
15
|
"README.md",
|
|
14
16
|
"LICENSE.md"
|
|
15
17
|
],
|
|
16
18
|
"scripts": {
|
|
19
|
+
"postinstall": "bash scripts/install-skill.sh 2>/dev/null || true",
|
|
17
20
|
"prepack": "npm run build",
|
|
18
21
|
"build": "npm run build:tsc && npm run build:bundle",
|
|
19
22
|
"build:tsc": "tsc",
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Install claude-scope skill to user's Claude Code skills directory
|
|
3
|
+
# This script runs automatically via npm postinstall hook
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
SKILL_NAME="scope"
|
|
8
|
+
TARGET_DIR="$HOME/.claude/skills/$SKILL_NAME"
|
|
9
|
+
|
|
10
|
+
# Determine source directory (relative to this script's location)
|
|
11
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
12
|
+
SOURCE_DIR="$SCRIPT_DIR/../.claude/skills/$SKILL_NAME"
|
|
13
|
+
|
|
14
|
+
# Gracefully skip if source doesn't exist (e.g., during development)
|
|
15
|
+
if [ ! -d "$SOURCE_DIR" ]; then
|
|
16
|
+
echo "Note: Skill source not found at $SOURCE_DIR"
|
|
17
|
+
echo "Skipping skill installation (this is normal during development)."
|
|
18
|
+
exit 0
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
# Check if SKILL.md exists in source
|
|
22
|
+
if [ ! -f "$SOURCE_DIR/SKILL.md" ]; then
|
|
23
|
+
echo "Note: SKILL.md not found in $SOURCE_DIR"
|
|
24
|
+
echo "Skipping skill installation."
|
|
25
|
+
exit 0
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Create target directory (overwrites existing if present)
|
|
29
|
+
echo "Installing claude-scope skill..."
|
|
30
|
+
mkdir -p "$TARGET_DIR"
|
|
31
|
+
|
|
32
|
+
# Copy all skill files
|
|
33
|
+
cp -r "$SOURCE_DIR"/* "$TARGET_DIR/"
|
|
34
|
+
|
|
35
|
+
echo "✓ Skill installed to $TARGET_DIR"
|
|
36
|
+
echo " Use /scope in Claude Code to configure widgets"
|
|
37
|
+
echo " Or just ask Claude about widget configuration - it will understand!"
|