The analyzability score feature (committed in ae7bd21) was missing
dedicated documentation. Also backfills content-oversize (from 3ad814d)
which was never added to the docs.
- Add "Analyzability Score" section explaining score meaning, threshold,
exclusions, and CLI/JSON output format
- Add content-oversize to Content Integrity table
- Add low-analyzability to LOW/INFO severity listing
- Add low-analyzability (INFO) and content-oversize (MEDIUM) to
Built-in Rule IDs table
- Update :::note block to mention new structural/analyzability checks
Classify every shell command in skill files into 6 behavioral tiers
(read-only, mutating, destructive, network, privilege, stealth) as an
orthogonal dimension to pattern-based severity. This lets audit report
"what kind of actions" a skill performs, not just "which known patterns
it matches."
- Add tier engine with 80+ command mappings and stealth regex patterns
- Detect tiers in scripts and Markdown fenced code blocks separately
- Generate combination findings: T2+T3→HIGH, T5→CRITICAL, T3>5→MEDIUM
- Display tier profile in CLI text, TUI detail panel, and JSON/API output
- Exclude .skillshare-meta.json from totalBytes to fix analyzability ratio
- Document tier definitions, profile output, and combination findings
Analyzability score measures what percentage of a skill's content is
auditable plaintext vs binary/non-scannable. Surfaces in CLI text
output, JSON, SARIF, and Web UI API responses.
- Add TotalBytes, AuditableBytes, Analyzability fields to audit.Result
- Emit INFO-level low-analyzability finding when score < 70%
- Show "Auditable: X%" in per-skill and summary text output
- Expose analyzability in server API (auditResultResponse + auditSummary)
- Add .pre-commit-hooks.yaml for pre-commit framework integration
- Add pre-commit hook recipe docs and audit.md cross-references
Previously --format json/sarif completely suppressed spinner and progress
bar, making the CLI appear frozen during long scans.
Now spinner/progress output is redirected to stderr via ProgressWriter,
so progress indicators remain visible while structured data stays clean
on stdout. This follows the Unix convention: data → stdout, diagnostics
→ stderr.
Also:
- Extract fileTTY() shared helper (DRY IsTTY + isProgressTTY)
- Add format constants (formatText/JSON/SARIF) and isStructured()
- Capture/restore previous ProgressWriter in defer (defensive)
- Add GitHub Actions with SARIF upload example
- Update existing examples to use --format json instead of --json
- Add SARIF variation note and verification step
- Add --format flag to Options table, mark --json as deprecated
- Add SARIF output section with severity mapping table
- Add GitHub Actions Code Scanning example with SARIF upload
- Update usage examples and recommended workflow
- Add --format <text|json|sarif> flag to audit command
- Deprecate --json in favor of --format json (with stderr warning)
- SARIF output uses ToSARIF() from internal/audit/sarif.go
- Suppress UI (spinners, progress bars) for all structured outputs
- Update auditPath/auditSkillByName to accept format string
- Update help text with new flag and examples
- Add 3 integration tests: FormatSARIF, FormatJSON, JSONDeprecation
Add ToSARIF() function that converts audit Results into SARIF 2.1.0
format for CI/CD integration (GitHub Code Scanning, etc.).
- 12 structs modeling the SARIF schema subset we need
- Severity mapping: CRITICAL/HIGH→error, MEDIUM→warning, LOW/INFO→note
- Rule deduplication by pattern (first occurrence wins)
- SARIFOptions for tool version and base URI
- 4 test cases: empty, findings, severity mapping, JSON round-trip
Adds scripts/devcontainer_shell.sh that detects a running devcontainer
and opens an interactive shell (or runs a one-off command). Registered
as `make devc` / `mise run devc`. Also consolidates README recent
updates to one entry per minor series and updates the devcontainer
skill with the new entry point.
filepath.Walk/WalkDir silently skip symlinked root directories because
os.Lstat sees the root as a non-directory symlink and never enters it.
This affected update, uninstall, reconcile, and server handlers when
the source directory was a symlink (common with dotfiles managers).
Extract ResolveSymlink() from sync.go into internal/utils/path.go and
apply it at every filepath.Walk/WalkDir callsite on source/target dirs.
Also add containment guards to resolveGroupSkills (uninstall) and
resolveGroupUpdatable (update) to reject group directories that are
symlinks pointing outside the source tree.
Upgrade prompts ("Install built-in skill?" and "Upgrade to vX?")
left their input lines visible after the user responded, breaking
the tree-drawing structure. Add ui.ClearLines() to erase prompt
lines via ANSI cursor-up + clear-line, so StepEnd connects cleanly
to the preceding tree node. No-op on non-TTY.
Covers 13 test scenarios for dotfiles manager symlink support:
symlinked source/target, chained symlinks, merge/copy modes,
status/diff/list/collect through symlinks, and idempotency.
When source or target directories are symlinks managed by external tools
(e.g., dotfiles managers), sync would incorrectly delete them during
mode conversion. This change:
- Add resolveWalkRoot() so filepath.Walk follows symlinked source dirs
- Add isSymlinkToSource() with canonicalization to distinguish internal
symlink-mode targets from external symlinks (alias-safe)
- Protect external target symlinks in both merge and copy mode
- Allow FindLocalSkills to scan through external symlinked targets
- Handle external symlinks in CheckStatusMerge as normal directories
When a target directory is an external symlink (e.g., dotfiles manager
pointing ~/.claude/skills/ elsewhere), sync previously deleted it
unconditionally during symlink→merge/copy mode conversion. This also
affected DiscoverSourceSkills which failed to traverse symlinked source
directories because filepath.Walk uses Lstat on root.
Changes:
- Add resolveWalkRoot() helper; use in both Discover functions so
filepath.Walk enters symlinked source directories
- Add isSymlinkToSource() to distinguish source-pointing symlinks
(symlink mode residue, safe to remove) from external symlinks
- Pass explicit sourcePath to SyncTargetMergeWithSkills and
SyncTargetCopyWithSkills for reliable symlink origin detection
- Fix FindLocalSkills to use utils.ResolveLinkTarget (handles relative
symlinks correctly) and follow external symlinks for scanning
- Fix CheckStatusMerge to follow external symlinks instead of returning
StatusConflict
- Add 17 unit tests and 6 integration tests covering symlinked source,
target, both, chained symlinks, idempotency, prune, and pull
os.ReadDir failure was silently ignored, causing otherTargets to be 0
and triggering removal of the entire timestamp directory instead of
just the target subdirectory. Now returns an error early.
Also adds diff TUI expand test from previous session.
- Add loading spinner while computing file diffs (prevents TUI freeze)
- Compute file diffs in parallel using sync.WaitGroup
- Support expanding "local only" and "remove" items (not just modify/add)
- Populate dstDir on remove/orphan items for file listing
- Relax ensureFiles to work with dstDir-only entries
- Add stale result guard when navigating during async load
Teaches AI assistants when and how to run CLI commands, tests, and
debugging inside the devcontainer instead of on the host. Covers
ssenv isolation, credential-helper, web UI, and common pitfalls.
Homebrew formula updates lag GitHub Releases by hours/days, causing
Homebrew users to see "update available" when `brew upgrade` says
already up-to-date. Now detect install method from executable path
and query `brew info --json=v2` for Homebrew installs instead of
the GitHub Release API.
- Add InstallMethod type with DetectInstallMethod() and
FetchBrewLatestVersion() in internal/version/homebrew.go
- Check() accepts InstallMethod to branch fetch strategy
- UpdateNotification() accepts upgradeCmd (shows correct command)
- UpgradeCommand() method on InstallMethod centralizes the mapping
- doctor.go reuses versioncheck.Check() (fixes semver string
comparison bug in old fetchUpdateMessage)
- Remove duplicated isHomebrewInstall() from upgrade.go
- Skip post-command version check for doctor (has its own)
- Remove duplicated RateLimitError, newGitHubRequest, newGitHubClient,
checkRateLimit from internal/version — now uses internal/github client,
which also fixes missing `gh auth token` fallback for version checks
- Add GH_TOKEN as fallback in install.resolveToken() for GitHub platform,
matching github.GetToken() resolution order (GITHUB_TOKEN → GH_TOKEN)
- Add GH_TOKEN to sanitizeTokens() redaction list
- Extract shared IsAuthError() in install/auth.go; push.go and
wrapGitError() both delegate to it (adds "Access denied" coverage)
- Consolidate shouldFallback*TrackedClone auth checks via isAuthOrAccessError()
- Thread single *http.Client through search.Search() and all callees,
reducing ~60 redundant TLS handshakes to connection-pooled reuse
- Pass *http.Client to downloadFile() instead of creating per-file clients
- Replace sourceHost() with extractHost() (same package, identical purpose)
- Remove unused isGitRepo() alias; callers use IsGitRepo() directly
- Extract shared formatDurationShort, truncateStr, renderHorizontalSplit,
tuiMinSplitWidth into tui_helpers.go; replace 5 truncate and 3 relative
time duplicates across cmd/skillshare with thin wrappers
- Remove duplicate applyRestoreDetailScroll from restore_tui.go
- Cache detail panel content in restore_tui.go and trash_tui.go to avoid
filesystem I/O (recursive walks, SKILL.md reads) on every bubbletea
render frame — recompute only on selection change or mutation
- Remove dead ListBackupVersions call in startDelete whose result was
discarded
- Extract shared applyDetailScroll into tui_helpers.go (was duplicated
across diff_tui.go, log_tui.go, audit_tui.go)
- Create utils.FileHash and utils.FileHashFormatted, replacing private
copies in install/meta.go and audit/audit.go
- Export install.MetaFileName constant, use from diff_file.go
- Replace double SHA-256 in fileContentsEqual with streaming byte compare
for early-exit efficiency
- Add 1MB size cap to generateUnifiedDiff to prevent performance issues
- Move noTUI into diffRenderOpts struct, simplifying function signatures
- Remove dead field diffTUIModel.results (never read)
- Replace hand-rolled countOccurrences with strings.Count
- Skip latestMtime() walk for merge mode (symlinks make it misleading)
- Fix ensureFiles() nil cache miss (return non-nil empty slice)
- Cache sorted items + categories in TUI model (avoid per-render recompute)
Update website diff page and built-in skill reference to reflect:
- Interactive TUI with left-right panel layout (default on TTY)
- New flags: --stat, --patch, --no-tui
- Redesigned category labels (New, Modified, Local Override, etc.)
- File-level diff examples
Also remove unused results field from diffTUIModel and replace
custom countOccurrences with strings.Count in tests.
- Add expand state (Enter key toggle) for file-level diff display
- Show file list with +/-/~ icons for add/delete/modify files
- Show colored unified diff (green/red/cyan) for modified files
- Add source/target mtime rows in detail header
- Replace "Actions" section with "Next Steps" using prominent styling
- Update list item description with sync/local breakdown
- Add stat counts (err/diff/ok) to TUI title bar
- Fix freeze: defer file walk to Enter toggle instead of every render
- Fix gofmt in trash_tui.go and restore.go
- Add files, srcDir, dstDir fields to copyDiffEntry for lazy file diff
- Add srcMtime, dstMtime to targetDiffResult for time display
- Add ensureFiles() lazy loader and latestMtime() helper
- Pass sourceMap through collectMergeDiff for source path resolution
- Use named struct literals throughout collect functions
Implement diffSkillFiles to walk source/destination directories and
detect add/modify/delete changes at the file level. Uses SHA-256 for
content comparison and sergi/go-diff for unified text diffs. Includes
binary detection, git-style stat rendering, and 9 unit tests.
Left panel shows target list with status icons (✓/!/✗), right panel
displays categorized diff details for the selected target. Supports
filter (/), detail scroll (Ctrl+d/u), and narrow terminal fallback.
Add --no-tui flag for plain text output; non-TTY auto-falls back.
Both commands were missing parseModeArgs(), causing -g to be
misinterpreted as a target name. Now -g is accepted silently
(global is default) and -p returns a clear error.
Support glob patterns (*, ?, [...]) in skill name arguments across all
three commands. Matching is case-insensitive.
- install: --skill and --exclude flags support glob (e.g. -s "core-*")
- update: positional names support glob (e.g. update "core-*")
- uninstall: positional names support glob (e.g. uninstall "core-*")
Shared helpers isGlobPattern() and matchGlob() extracted to helpers.go
to avoid duplication. Includes 25 new tests and updated docs.
The old SKILL.md organized commands by category (Inspect/Sync/Remote/...),
requiring AI to reason backward from categories to user intent. The new
structure organizes by scenario (Getting Started, Installing, Removing,
Team, Updates, Recovery), so AI can match user intent directly to the
right command sequence.
Key changes:
- Replace Commands table with 8 recipe groups covering all common workflows
- Add missing recipes: uninstall, search, new, collect
- Remove interactive-only example (bare `install user/repo`)
- Split push/pull into separate lines to prevent misexecution
- Merge AI Usage Notes into compact 5-rule "AI Caller Rules" section
- Bump version to v0.16.6
- trash_tui: delete and empty confirmations now render in red
- list_tui: uninstall confirmation now renders in red
- Consistent with restore_tui delete confirmation pattern
Add --help/-h handling for both backup and restore commands.
Add d key in restore TUI to delete selected backup with red
confirmation prompt and success message.
Interactive two-phase TUI: target picker → version list with left-right
split panel layout. Includes detail panel with skill diffs, descriptions,
and target state. Wires no-args restore to TUI dispatch with --no-tui
fallback.
Add ListBackupVersions() and ListTargetsWithBackups() for TUI timestamp
selection. Fix merge-mode targets producing empty backups by following
top-level symlinks in copyDirFollowTopSymlinks().
Add bubbletea-based TUI with multi-select, fuzzy filter, and inline
restore/delete/empty operations. Follows the same dispatch pattern as
list and log: JSON → TUI (TTY + items + !--no-tui) → plain text.