agent-skill-manager 1.1.0 → 1.3.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.
Files changed (41) hide show
  1. package/README.md +130 -34
  2. package/dist/agent-skill-manager.js +180 -0
  3. package/dist/highlights-eq9cgrbb.scm +604 -0
  4. package/dist/highlights-ghv9g403.scm +205 -0
  5. package/dist/highlights-hk7bwhj4.scm +284 -0
  6. package/dist/highlights-r812a2qc.scm +150 -0
  7. package/dist/highlights-x6tmsnaa.scm +115 -0
  8. package/dist/injections-73j83es3.scm +27 -0
  9. package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  10. package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
  11. package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  12. package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  13. package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
  14. package/package.json +11 -4
  15. package/CODE_OF_CONDUCT.md +0 -59
  16. package/CONTRIBUTING.md +0 -92
  17. package/RELEASE_NOTES.md +0 -22
  18. package/SECURITY.md +0 -43
  19. package/bin/agent-skill-manager.ts +0 -12
  20. package/bun.lock +0 -204
  21. package/docs/ARCHITECTURE.md +0 -60
  22. package/docs/CHANGELOG.md +0 -46
  23. package/docs/DEPLOYMENT.md +0 -52
  24. package/docs/DEVELOPMENT.md +0 -64
  25. package/install.sh +0 -226
  26. package/src/cli.ts +0 -488
  27. package/src/config.ts +0 -109
  28. package/src/formatter.ts +0 -92
  29. package/src/index.ts +0 -324
  30. package/src/scanner.ts +0 -165
  31. package/src/uninstaller.ts +0 -226
  32. package/src/utils/colors.ts +0 -16
  33. package/src/utils/frontmatter.ts +0 -87
  34. package/src/utils/types.ts +0 -57
  35. package/src/utils/version.ts +0 -20
  36. package/src/views/config.ts +0 -147
  37. package/src/views/confirm.ts +0 -105
  38. package/src/views/dashboard.ts +0 -252
  39. package/src/views/help.ts +0 -83
  40. package/src/views/skill-detail.ts +0 -114
  41. package/src/views/skill-list.ts +0 -122
@@ -1,60 +0,0 @@
1
- # Architecture
2
-
3
- ## Overview
4
-
5
- agent-skill-manager is a terminal UI application that scans, displays, and manages skills installed for various AI coding agents. It follows a simple layered architecture: CLI entry → app bootstrap → core modules → TUI views.
6
-
7
- ## Components
8
-
9
- ### CLI Entry (`bin/agent-skill-manager.ts`)
10
-
11
- Handles `--help` and `--version` flags, then delegates to the main app entry point.
12
-
13
- ### App Bootstrap (`src/index.ts`)
14
-
15
- Initializes the OpenTUI renderer, wires up keyboard handlers, and manages view state transitions (dashboard, detail, confirm, config, help).
16
-
17
- ### Core Modules
18
-
19
- | Module | Responsibility |
20
- | -------------------- | ----------------------------------------------------------------- |
21
- | `src/config.ts` | Load/save config from `~/.config/agent-skill-manager/config.json` |
22
- | `src/scanner.ts` | Walk provider directories, parse SKILL.md, filter & sort |
23
- | `src/uninstaller.ts` | Build removal plans and execute safe deletions |
24
-
25
- ### Views (`src/views/`)
26
-
27
- Each view is a factory function that creates OpenTUI components:
28
-
29
- - **dashboard.ts** — Main layout with scope tabs, search input, stats bar
30
- - **skill-list.ts** — Scrollable, selectable list of discovered skills
31
- - **skill-detail.ts** — Overlay showing full skill metadata
32
- - **confirm.ts** — Uninstall confirmation dialog with target list
33
- - **config.ts** — Provider toggle UI
34
- - **help.ts** — Keyboard shortcut overlay
35
-
36
- ### Utilities (`src/utils/`)
37
-
38
- - **types.ts** — Shared TypeScript interfaces (`SkillInfo`, `AppConfig`, `Scope`, etc.)
39
- - **colors.ts** — Neon green color palette for the TUI
40
- - **frontmatter.ts** — YAML-like frontmatter parser for SKILL.md files
41
-
42
- ## Data Flow
43
-
44
- ```
45
- Config (disk) → Scanner (walk dirs) → SkillInfo[] → Views (render)
46
-
47
- Keyboard Events → State Machine → View Transitions
48
-
49
- Uninstaller → Filesystem Mutations → Rescan
50
- ```
51
-
52
- ## State Management
53
-
54
- Application state is held in module-level variables in `src/index.ts`:
55
-
56
- - `allSkills` / `filteredSkills` — current skill data
57
- - `currentScope` / `currentSort` / `searchQuery` — filter state
58
- - `viewState` — which overlay is active (`dashboard`, `detail`, `confirm`, `config`, `help`)
59
-
60
- State transitions are driven by keyboard events and propagated to views via update functions.
package/docs/CHANGELOG.md DELETED
@@ -1,46 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
6
-
7
- ## [1.1.0] - 2026-03-11
8
-
9
- ### Added
10
-
11
- - One-command install script (`curl | bash`) with automatic Bun installation
12
- - Non-interactive CLI mode with `asm` shorthand command
13
- - .npmignore to exclude unnecessary files from npm package
14
- - TUI screenshot in README
15
-
16
- ### Fixed
17
-
18
- - Bun global bin PATH handling and asm/agent-skill-manager alias creation in installer
19
- - External font import in SVGs for GitHub rendering
20
-
21
- ### Changed
22
-
23
- - Rebranded project to agent-skill-manager across all files
24
- - Renamed bin entry point to `agent-skill-manager.ts` to match package name
25
- - Renamed package to agent-skill-manager with version info in help output
26
-
27
- ### Removed
28
-
29
- - Obsolete CLI_PLAN.md
30
-
31
- ## [1.0.0] - 2025-03-11
32
-
33
- ### Added
34
-
35
- - Interactive TUI dashboard with OpenTUI
36
- - Multi-agent support: Claude Code, Codex, OpenClaw, and generic Agents
37
- - Configurable providers via `~/.config/agent-skill-manager/config.json`
38
- - Global and project scope filtering
39
- - Real-time search and sort (by name, version, location)
40
- - Detailed skill view with SKILL.md frontmatter metadata
41
- - Safe uninstall with confirmation dialog
42
- - In-TUI config editor with provider toggle
43
- - CLI entry point with `--help` and `--version` flags
44
- - Pre-commit hooks (Prettier, TypeScript type-checking)
45
- - GitHub Actions CI pipeline
46
- - Unit tests for config, scanner, uninstaller, and frontmatter modules
@@ -1,52 +0,0 @@
1
- # Deployment
2
-
3
- ## Publishing to npm (via Bun)
4
-
5
- agent-skill-manager is distributed as a global CLI package.
6
-
7
- ### 1. Bump the version
8
-
9
- Update the version in both files:
10
-
11
- - `package.json` → `"version"`
12
- - `bin/agent-skill-manager.ts` → `VERSION` constant
13
-
14
- ### 2. Build and publish
15
-
16
- ```bash
17
- npm publish
18
- ```
19
-
20
- Or if using Bun's npm compatibility:
21
-
22
- ```bash
23
- bunx npm publish
24
- ```
25
-
26
- ### 3. Install globally
27
-
28
- Users install with:
29
-
30
- ```bash
31
- bun install -g agent-skill-manager
32
- ```
33
-
34
- ## Running from Source
35
-
36
- For development or CI environments:
37
-
38
- ```bash
39
- git clone https://github.com/luongnv89/agent-skill-manager.git
40
- cd agent-skill-manager
41
- bun install
42
- bun run start
43
- ```
44
-
45
- ## CI Pipeline
46
-
47
- GitHub Actions runs on every push and PR to `main`:
48
-
49
- - Type-checking (`bun run typecheck`)
50
- - Tests (`bun test`)
51
-
52
- See `.github/workflows/ci.yml` for the full pipeline.
@@ -1,64 +0,0 @@
1
- # Development Guide
2
-
3
- ## Prerequisites
4
-
5
- - [Bun](https://bun.sh) >= 1.0.0
6
- - [Git](https://git-scm.com/)
7
-
8
- ## Setup
9
-
10
- ```bash
11
- git clone https://github.com/luongnv89/agent-skill-manager.git
12
- cd agent-skill-manager
13
- bun install
14
- ```
15
-
16
- ## Running
17
-
18
- ```bash
19
- bun run start # Launch the TUI
20
- bun run dev # Same as start (alias)
21
- ```
22
-
23
- ## Testing
24
-
25
- ```bash
26
- bun test # Run all tests
27
- bun run typecheck # Type-check without emitting
28
- ```
29
-
30
- Test files are co-located with source files using the `*.test.ts` convention:
31
-
32
- - `src/config.test.ts`
33
- - `src/scanner.test.ts`
34
- - `src/uninstaller.test.ts`
35
- - `src/utils/frontmatter.test.ts`
36
-
37
- ## Pre-commit Hooks
38
-
39
- The project uses [pre-commit](https://pre-commit.com/) with:
40
-
41
- - **trailing-whitespace** — removes trailing whitespace
42
- - **end-of-file-fixer** — ensures files end with a newline
43
- - **check-yaml / check-json** — validates config files
44
- - **check-added-large-files** — prevents accidental large file commits
45
- - **prettier** — auto-formats TS, JS, JSON, CSS, and MD files
46
- - **typecheck** — runs `tsc --noEmit` on staged TypeScript files
47
-
48
- Install hooks locally:
49
-
50
- ```bash
51
- pre-commit install
52
- ```
53
-
54
- ## Debugging
55
-
56
- Since this is a TUI application, standard `console.log` will interfere with the terminal UI. For debugging:
57
-
58
- 1. Write to a log file: `Bun.write("/tmp/sm-debug.log", JSON.stringify(data))`
59
- 2. Run tests to isolate logic from the TUI layer
60
- 3. Use the `--help` flag to verify CLI plumbing without launching the TUI
61
-
62
- ## Project Layout
63
-
64
- See [ARCHITECTURE.md](ARCHITECTURE.md) for the full component breakdown.
package/install.sh DELETED
@@ -1,226 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- # ============================================================================
5
- # agent-skill-manager Installer
6
- # The universal skill manager for AI coding agents.
7
- #
8
- # Usage:
9
- # curl -sSL https://raw.githubusercontent.com/luongnv89/agent-skill-manager/main/install.sh | bash
10
- # wget -qO- https://raw.githubusercontent.com/luongnv89/agent-skill-manager/main/install.sh | bash
11
- # ============================================================================
12
-
13
- TOOL_NAME="agent-skill-manager"
14
- REPO_OWNER="luongnv89"
15
- REPO_NAME="agent-skill-manager"
16
- BUN_MIN_VERSION="1.0.0"
17
-
18
- # --- Color Output ---
19
- RED='\033[0;31m'
20
- GREEN='\033[0;32m'
21
- YELLOW='\033[1;33m'
22
- BLUE='\033[0;34m'
23
- NC='\033[0m'
24
-
25
- info() { printf "${BLUE}[INFO]${NC} %s\n" "$*"; }
26
- ok() { printf "${GREEN}[ OK ]${NC} %s\n" "$*"; }
27
- warn() { printf "${YELLOW}[WARN]${NC} %s\n" "$*"; }
28
- err() { printf "${RED}[ERR ]${NC} %s\n" "$*" >&2; }
29
- die() { err "$@"; exit 1; }
30
-
31
- # --- OS / Arch Detection ---
32
- detect_os() {
33
- local os
34
- os="$(uname -s | tr '[:upper:]' '[:lower:]')"
35
- case "$os" in
36
- linux*) echo "linux" ;;
37
- darwin*) echo "macos" ;;
38
- mingw*|msys*|cygwin*) echo "windows" ;;
39
- *) die "Unsupported operating system: $os" ;;
40
- esac
41
- }
42
-
43
- detect_arch() {
44
- local arch
45
- arch="$(uname -m)"
46
- case "$arch" in
47
- x86_64|amd64) echo "x86_64" ;;
48
- aarch64|arm64) echo "arm64" ;;
49
- armv7l) echo "armv7" ;;
50
- *) die "Unsupported architecture: $arch" ;;
51
- esac
52
- }
53
-
54
- # --- Version Comparison ---
55
- # Returns 0 if $1 >= $2 (semver)
56
- version_gte() {
57
- local IFS=.
58
- local i ver1=($1) ver2=($2)
59
- for ((i=0; i<${#ver2[@]}; i++)); do
60
- local v1="${ver1[i]:-0}"
61
- local v2="${ver2[i]:-0}"
62
- if ((v1 > v2)); then return 0; fi
63
- if ((v1 < v2)); then return 1; fi
64
- done
65
- return 0
66
- }
67
-
68
- # --- Bun Detection & Installation ---
69
- check_bun() {
70
- if command -v bun &>/dev/null; then
71
- local bun_version
72
- bun_version="$(bun --version 2>/dev/null || echo "0.0.0")"
73
- if version_gte "$bun_version" "$BUN_MIN_VERSION"; then
74
- ok "Bun $bun_version found (>= $BUN_MIN_VERSION required)"
75
- return 0
76
- else
77
- warn "Bun $bun_version found but >= $BUN_MIN_VERSION is required"
78
- return 1
79
- fi
80
- else
81
- return 1
82
- fi
83
- }
84
-
85
- install_bun() {
86
- info "Installing Bun..."
87
- if command -v curl &>/dev/null; then
88
- curl -fsSL https://bun.sh/install | bash
89
- elif command -v wget &>/dev/null; then
90
- wget -qO- https://bun.sh/install | bash
91
- else
92
- die "Neither curl nor wget found. Please install one of them first."
93
- fi
94
-
95
- # Source bun into current shell
96
- local bun_install="${BUN_INSTALL:-$HOME/.bun}"
97
- if [ -f "$bun_install/bin/bun" ]; then
98
- export BUN_INSTALL="$bun_install"
99
- export PATH="$bun_install/bin:$PATH"
100
- fi
101
-
102
- if ! command -v bun &>/dev/null; then
103
- die "Bun installation completed but 'bun' is not in PATH. Please restart your shell and re-run this script."
104
- fi
105
-
106
- ok "Bun $(bun --version) installed"
107
- }
108
-
109
- # --- Ensure Bun global bin is in PATH ---
110
- ensure_bun_in_path() {
111
- local bun_bin="${BUN_INSTALL:-$HOME/.bun}/bin"
112
- if [[ ":$PATH:" != *":$bun_bin:"* ]]; then
113
- export PATH="$bun_bin:$PATH"
114
- info "Added $bun_bin to PATH for this session"
115
- fi
116
- }
117
-
118
- # --- Install agent-skill-manager ---
119
- install_asm() {
120
- info "Installing $TOOL_NAME globally via Bun..."
121
- bun install -g "$TOOL_NAME"
122
- ok "$TOOL_NAME installed globally"
123
- }
124
-
125
- # --- Create command aliases ---
126
- create_aliases() {
127
- local bun_bin="${BUN_INSTALL:-$HOME/.bun}/bin"
128
- local bin_target=""
129
-
130
- # Find the actual installed binary (could be skill-manager or agent-skill-manager)
131
- for name in skill-manager agent-skill-manager; do
132
- if [ -f "$bun_bin/$name" ] || [ -L "$bun_bin/$name" ]; then
133
- bin_target="$bun_bin/$name"
134
- break
135
- fi
136
- done
137
-
138
- if [ -z "$bin_target" ]; then
139
- warn "Could not find installed binary in $bun_bin"
140
- return 1
141
- fi
142
-
143
- # Create symlinks for all expected command names
144
- for alias_name in agent-skill-manager asm; do
145
- local alias_path="$bun_bin/$alias_name"
146
- if [ ! -f "$alias_path" ] && [ ! -L "$alias_path" ]; then
147
- ln -s "$bin_target" "$alias_path"
148
- ok "Created alias: $alias_name"
149
- fi
150
- done
151
- }
152
-
153
- # --- Verification ---
154
- verify_installation() {
155
- info "Verifying installation..."
156
- local found=false
157
-
158
- for cmd in agent-skill-manager asm skill-manager; do
159
- if command -v "$cmd" &>/dev/null; then
160
- ok "$cmd is available"
161
- found=true
162
- fi
163
- done
164
-
165
- if [ "$found" = false ]; then
166
- warn "No commands found in PATH"
167
- warn "Add Bun's global bin to your PATH by adding this to your shell profile:"
168
- warn " export PATH=\"\$HOME/.bun/bin:\$PATH\""
169
- return 1
170
- fi
171
-
172
- return 0
173
- }
174
-
175
- # --- Entry Point ---
176
- main() {
177
- echo ""
178
- info "============================================"
179
- info " $TOOL_NAME Installer"
180
- info "============================================"
181
- echo ""
182
-
183
- local os arch
184
- os="$(detect_os)"
185
- arch="$(detect_arch)"
186
- info "OS: $os | Arch: $arch"
187
- echo ""
188
-
189
- # Step 1: Ensure Bun is installed
190
- if ! check_bun; then
191
- install_bun
192
- fi
193
- echo ""
194
-
195
- # Step 2: Ensure Bun global bin is in PATH
196
- ensure_bun_in_path
197
-
198
- # Step 3: Install agent-skill-manager
199
- install_asm
200
- echo ""
201
-
202
- # Step 4: Create aliases (agent-skill-manager, asm)
203
- create_aliases
204
- echo ""
205
-
206
- # Step 5: Verify
207
- if verify_installation; then
208
- echo ""
209
- info "============================================"
210
- ok "Installation complete!"
211
- info "============================================"
212
- echo ""
213
- info "Get started:"
214
- info " asm # Launch interactive TUI (shorthand)"
215
- info " agent-skill-manager # Launch interactive TUI"
216
- info " asm --help # Show help"
217
- echo ""
218
- else
219
- echo ""
220
- warn "Installation finished but verification had warnings."
221
- warn "Try restarting your terminal, then run: agent-skill-manager"
222
- echo ""
223
- fi
224
- }
225
-
226
- main "$@"