An orchestrator repository containing a root SKILL.md together with
child SKILL.md directories (e.g. iOfficeAI/OfficeCLI) previously
installed as a single bundled directory that mirrored the git clone:
copying the root dragged every child skill dir into it, and children
marked selected were silently skipped as "included in parent" while
their computed dest paths were never written to.
Make each discovered skill a first-class install:
- New copyDirExcluding() skips subdirectories by slash-normalized
relative path, so a skill directory is copied without duplicating
any nested skill that is itself being installed elsewhere.
- installFromDiscoveryImpl computes the descendant skill paths of the
skill currently being copied and passes them as excludes. For the
root of an orchestrator repo this drops every child skill dir; for
a non-root skill it drops any sub-skill nested inside it.
- installSelectedSkills stops skipping children after the root is
installed. The existing dest-path logic already places each child
under <parentName>/<childName>, so the children are written as
siblings to the root install.
After the fix, a multi-skill repo with N skills produces N independent
installed directories discoverable by sync, updatable individually.
Refs: #124
When a repo contains both a root SKILL.md and child skills, picking
"Select individual skills" previously excluded the root entirely, so
the orchestrator skill could never be installed from the multi-select
UI — users had to resort to --name as a workaround.
Include the root skill in the individual selection list (listed first)
so it is visible and selectable alongside its children.
Refs: #124
URLs like https://github.com/owner/repo/blob/main/SKILL.md previously
became subdir="SKILL.md" and created an install folder literally named
"SKILL.md". Treat a trailing SKILL.md segment on blob URLs as a pointer
to its containing skill directory:
blob/main/SKILL.md → subdir "", name = repo
blob/main/skills/foo/SKILL.md → subdir "skills/foo", name = foo
Also apply the same rule to GitLab (-/blob/...) and Bitbucket (src/...)
web URLs for consistency.
Refs: #124
Extend install/update with agent-aware --json output and apply the same
audit block-threshold gate skills already use.
Install:
- install --json: imply --force; imply --all only when neither
--skill nor --agent is set (so explicit selectors still work)
- project-mode install now routes through cmdInstallProjectParsed
so --json suppresses UI and emits a pure-JSON payload
- agent installs propagate SourceDir so metadata lands in the
agents root, not the install subdir
- validation error lists --agent / --kind / --branch explicitly
Update agents:
- update agents supports --force, --skip-audit, --audit-threshold
- tracked agent repos + metadata-backed single-file agents now run
the same audit gate as skills; blocks roll back from a temp stage
- JSON output returns the final per-agent status
(updated/skipped/failed/up_to_date/...) by merging check results
with batch update outcomes
Audit:
- auditInstalledAgent shares one helper with auditInstalledSkill
(scan + cleanup callbacks); single-file agent scans now use
audit.ScanFile / ScanFileForProject instead of staging the file
into a temp directory
- UpdateAgentFromDiscovery stages to temp, audits, then renames
atomically (rename already overwrites on POSIX)
Refactors pulled in while reworking these paths:
- extract jsonUISuppressor helper in json_output.go and use it
from install/update/update_agents; collapses 4 copies of the
suppress/restore closure dance and the per-error failJSON block
- drop relPath plumbing from installAgentFromDiscoveryInternal
now that ScanFile doesn't need a staged relative path
- list.go render functions now use theme.ANSI() so NO_COLOR is
respected in plain-text output
Tests:
- add TestInstallAgentFromDiscovery_HighFindingBlocked (unit)
- add TestUpdate_Agents_HighFindingBlockedByThreshold (integration)
- add TestInstall_Project_JSON_Agent_PureJSON,
TestUpdate_Agents_JSON_ReportsFinalStatus
- fix TestList_SKILLSHARE_THEME_Light / TestList_NO_COLOR to
write a config before invoking list
- fix TestTargetList_NoTUI_FallsBackToPlainText assertion to match
the new structured Mode: merge output
- fix TestDoctor_AllGood_PassesAll by pinning SKILLSHARE_THEME=dark
so the no-TTY theme fallback warning doesn't fire
- add list_tui_content_test.go covering light/dark glamour base
- list detail pane now picks LightStyleConfig on light terminals
Docs:
- update install.md, update.md, understand/agents.md for the new
flags, JSON shapes, and agents update workflow
The list TUI had two grouping bugs:
1. Local nested skills (e.g. mma/agent-browser, mma/docker-expert) were
lumped into the "standalone" group because buildGroupedItems keyed on
RepoName, which is empty for non-tracked skills.
2. Agents deep inside a tracked repo (e.g. _vijay-agents/agents/core/x.md,
_vijay-agents/agents/specialized/python/y.md) were split into separate
groups per sub-directory. discoverAndBuildAgentEntries set RepoName to
filepath.Dir(RelPath), producing keys like '_vijay-agents/agents/core'
instead of the tracked repo root.
Fix:
- discoverAndBuildAgentEntries now uses d.RepoRelPath (already computed
by agent discovery) so tracked agents share one visual group regardless
of nesting depth. This also corrects a pre-existing mis-count where
local nested agents were counted as tracked in the summary footer.
- Add skillTopGroup() helper in list_tui_filter.go: tracked → RepoName;
non-tracked nested → first RelPath segment; flat → "" (standalone).
- buildGroupedItems now keys on skillTopGroup() so local nested groups
(mma/*) render as their own bucket instead of standalone.
- sortSkillEntries default sort now groups by top-level bucket first,
placing standalone last, so buildGroupedItems sees contiguous blocks.
- Remove 'if opts.SortBy != ""' gating in both global list paths: sort
must always run to guarantee the TUI grouping invariant.
Tests: 4 new unit tests cover local nested grouping, deep tracked agents,
skillTopGroup cases, and the top-group-aware sort order.
UpdatePage uses variant="warning" on the Force Retry button for
blocked items to visually distinguish them from error-state Force
Retry (which uses danger). The Button component didn't expose a
warning variant, causing the Docker build to fail with a TS2322
type error.
Adds warning alongside existing danger variant, mirroring the same
outlined-with-hover-fill pattern and matching the warning color
scheme already used by Badge and in-line text-warning classes.
Finishes the theme system migration:
- Deletes cmd/skillshare/tui_colors.go entirely (~152 lines). The
tc struct and tcSevStyle/riskLabelStyle/formatRiskBadgeLipgloss
helpers are all replaced by equivalents in internal/theme.
- Migrates last 6 helper-function callers in audit_tui.go and
search_tui.go.
- Adds checkTheme() to doctor.go with warning status on fallback,
wired into runDoctorChecks() after checkSymlinkSupport.
- Adds theme.Get() call early in main() so OSC 11 probe overhead
happens at startup, not during TUI rendering.
After this commit:
- grep 'lipgloss.Color(' cmd/skillshare/ returns only the hardcoded
brand yellow #D4D93C (logo color)
- grep 'tc.|ac.|lc.' cmd/skillshare/ returns only loop variables
- Full build and test suite pass
Refs: #125
Replaces all tc.* references in 26 files under cmd/skillshare/
with the new internal/theme API. Also removes the file-local ac
struct from audit_tui.go and the lc struct from log_tui.go.
Files touched: analyze_tui.go, analyze_tui_item.go, audit_render.go,
audit_rules_tui.go, audit_tui.go, checklist_tui.go, diff_tui.go,
extras.go, extras_init_tui.go, extras_list_tui.go,
extras_list_tui_item.go, hub.go, install_prompt_tui.go, log_tui.go,
new_tui.go, restore_tui.go, search_batch.go, search_tui.go,
sync.go, sync_agents.go, sync_parallel.go, target_agents_test.go,
target_list_tui.go, trash_tui.go, tui_helpers.go.
tui_colors.go (the tc struct definition file) is kept for now; it
will be deleted in the final cleanup commit along with the doctor
integration and main.go early init call.
Refs: #125
Updates Success/Error/Warning/Info/Header/Status/Checkbox/
CheckboxItem/ActionLine/Logo to source their colors from the
new theme.ANSI() set instead of package-level constants.
Package-level constants (Red, Green, White, etc.) are kept with
// Deprecated: comments to preserve compatibility with any
third-party code that imports this package directly.
Colorize() now also honors NO_COLOR via theme.Get().NoColor.
Replaces all tc.* references in list_tui.go, list_tui_item.go, and
list_tui_content.go with the new internal/theme API. Also fixes the
hardcoded lipgloss.Color("15") at list_tui_item.go:296 — the root
cause of issue #125.
NOTE: The codebase does not compile at this commit alone because
other TUIs still reference the tc struct. The full build is
restored in commit 4 of this PR (migration of remaining TUIs and
deletion of legacy palettes). Treat this PR as one atomic change.
Fixes#125
Introduces a unified light/dark terminal theme system:
- Theme struct with sync.Once-backed Get()/Reset() singleton
- darkPalette (softened Primary from 15 to 252) and lightPalette
(new, WCAG AA compliant against white backgrounds)
- Style constructors (Primary, Muted, Accent, Success, Warning,
Danger, Info, Title, SelectedRow, Badge, Severity)
- ANSISet for plain CLI output
- Resolution precedence: NO_COLOR > SKILLSHARE_THEME > OSC 11 probe
> dark fallback
- 300ms timeout on OSC 11 probe with documented goroutine leak tradeoff
- canDetect() gate for non-TTY, CI, TERM=dumb, Windows-safe
- WCAG contrast tests as regression guard for future palette edits
NO_COLOR env var follows the no-color.org spec: only activates when
set AND non-empty (empty string does not enable no-color mode).
This commit adds the package but does not migrate any existing
callers. The next commits migrate list TUIs (fixes#125), plain CLI
output, and remaining TUIs.
Refs: #125
The large StreamProgressBar appeared between the PageHeader and the tab
bar when checking started, pushing the whole list down. Loading state
is already conveyed by the Check All / Check Selected button spinners
and the per-item 'Checking' badges, so the big bar was redundant.
Check results were keyed by repo directory name (e.g. _awesome-claude-agents)
while UI items used per-skill names (api-architect, backend-developer, ...).
applyCheckResult now iterates updatable items and maps each repo's status
to all items belonging to it, so tracked repo entries no longer get stuck
in the Checking state.
- Store api.updateAllStream() return value in esRef so unmount cleanup
closes both check and update EventSource connections
- Extract ItemStatusCard component to deduplicate ~50 lines of per-item
status card rendering between updating and done phases
- Wrap successCount/skippedCount/blockedCount/errorCount in a single
useMemo pass instead of 4 separate .filter() calls
- Move globToRegex to ui/src/lib/glob.ts shared utility, imported by
both UpdatePage and BatchUninstallPage
- CheckItemStatus: change from flat string union to interface with
status, message?, and behind? fields; applyCheckResult now preserves
repo.behind and repo.message; CheckStatusBadge renders 'N behind'
- Done phase: blocked items now show Force Retry button (variant=warning)
- Search filter: add globToRegex for glob pattern matching (* and ?)
- Check button loading: track checkMode ('all'|'selected'|null) state
so loading spinner shows on the correct button regardless of selection
Doctor was passing all discovered agents (including those disabled
via .agentignore) to the agent target drift check, inflating the
expected count. This caused false drift warnings like '33/66 agents
linked' when the 33 missing agents were actually ignored.
Filter with resource.ActiveAgents() before passing to
checkAgentTargetInline, matching the pattern used by sync and
all server handlers.
Replace the old idle/updating/done flow with a new three-phase state machine:
- selecting: Virtuoso checkbox list of all tracked + GitHub skills with
sticky search bar, SegmentedControl type filter (All/Tracked/GitHub),
Select All/Deselect All, and per-item CheckStatusBadge
- updating: StreamProgressBar + per-item status cards with auto-scroll
- done: Summary card with badges + per-item result cards with
Force Retry/Purge buttons + Back to List
Key changes:
- No auto-check on mount; manual Check All / Check Selected buttons
- Check results stored in Map<string, CheckItemStatus> with 6 states
- Unified selection via Set<string> (no split repos/skills)
- Repo deduplication in handleUpdate (same repo = one update)
- Action buttons in PageHeader (not bottom bar)
- No confirm dialog before update
- useQuery for skills list (replaces inline SSE-only check)
Add GET/PUT /api/agentignore endpoints mirroring the existing
skillignore API, backed by skillignore.ReadAgentIgnoreMatcher()
and resource.AgentKind{}.Discover() for ignore stats.
On the frontend, extend the Config page with a third tab for
editing .agentignore. Generalize the former SkillignoreTab into
a shared IgnoreTab component with a kind prop, and extend
AssistantPanel to show ignored agents in the sidebar.
- Rename 'Uninstall Skills' → 'Uninstall Resources' on BatchUninstallPage
- Rename 'Pull local skills' → 'Pull local resources' on CollectPage
- Rename 'Push your skills' → 'Push resources' on SyncPage
- Compact Sync/Collect action bars: inline SegmentedControl + button
on the same row instead of stacked vertically
- Replace badge grid sync summary with inline text stats (dot-separated)
showing totals with a secondary skill/agent breakdown line
- Simplify 'all in sync' state to single-line inline layout
The Track badge in SkillPostit was redundant with the existing Tracked
indicator at the bottom. Revert to Users icon — Track badge is only
used in the folder tree view.
- Replace flex-wrap badge layout with CSS Grid for aligned KindBadge rows
- Fix ignored count showing only skills instead of total (skills + agents)
- Group ignored items by kind (skill/agent) with KindBadge sub-headers
- Increase spacing between groups for better visual hierarchy
Agent discovery was treating non-agent files (CLAUDE.md, AGENTS.md, etc.)
as agent resources when they appeared in tracked repos.
Two fixes:
- Expand ConventionalExcludes with 7 well-known convention filenames
(CLAUDE.md, AGENTS.md, GEMINI.md, COPILOT.md, CONTRIBUTING.md,
CODE_OF_CONDUCT.md, SUPPORT.md)
- For tracked repos with an agents/ subdirectory, only discover files
inside agents/ — skip repo root files and other subdirs (docs/, etc.)
Also includes UI polish:
- Display flat names (__ separator) as path separators in toasts/labels
- Consolidate batch install errors into single toast
- Show .agentignore state in sync diff/preview responses
- Track badge + friendly repo name in resource list/folder tree
- auditCache: centralized cache with installed-count staleness check
- resourceNames: agent display name formatting (strip .md suffix)
- AuditPage: skip audit when 0 installed, show empty state per kind
- clearAuditCache on install/uninstall/update across all pages
- ResourcesPage: agent target summary, context menu for agents
- FilterStudioPage: agent display name in preview search
- SkillPickerModal: accessible radio button (button element)
- fieldDocs: agents sub-keys no longer marked reserved
- Integration tests: diff/sync prune after uninstall-all, tracked agent install
- diff_agents: detect symlink drift, local copy blocking, fix prune count
- sync_agents: continue to prune targets when source has no agents
instead of returning early, matching skills behavior
- DiscoveredResource gains RepoRelPath and Targets fields
- AgentKind.Discover populates RepoRelPath via findTrackedRepoRelPath
- AgentCheckResult gains RepoPath and dirty status for tracked repos
- InferTrackedKind auto-detects pure-agent repos for --track install
- TrackedRepoResult reports AgentCount and Agents list
Add local-path resource discovery so install flows can detect agents as well as skills. Preserve nested agent paths and suffixless agent metadata keys during batch install and update, and refresh the UI copy to use resource-aware wording on the install surface.
CollectPage now has Skills/Agents/Both scope selector matching
SyncPage pattern. Scan and collect operations pass kind to API.
Selected set uses 3-segment key (target/kind/name) to prevent
collision between skills and agents with same name.
collectSkillRef now has optional kind field. Items with kind=agent
are resolved against agent target paths and pulled via PullAgents().
Results from skills and agents are merged into a single response.
Oplog tracks skill and agent counts separately for observability.
handleCollectScan now accepts ?kind=skill|agent query parameter.
When kind=agent, scans for local agent files in agent target dirs.
When kind is empty, scans for both skills and agents.
- Fix data race: read agentsSource inside RLock in handleDiffStream
- Validate kind param in handleSync (reject invalid values)
- Add test for symlink-points-elsewhere agent diff case
- Always show KindBadge on DiffItemRow (default to 'skill')
- SegmentedControl with Skills / Agents / Both options (default: Both)
- Sync button text and API kind param change with selection
- Diff summary shows separate skill/agent counts with KindBadge
- Split button labels (Force Sync) also reflect scope
- Discover agents from agentsSource() and compute per-target diffs
- Merge agent diff items into existing target results
- Set Kind='skill' on all existing skill diff items
- Set Kind='agent' on all agent diff items
- Targets without agentPath are skipped (matches CLI behavior)
- Add audit.CrossSkillResultName constant, use in Go + TS
- Merge toAuditInputs/toAgentAuditInputs into one with isFile param
- Extract discoverForKind() and toInputsForKind() to eliminate 5+ if-else branches
- Simplify launchAuditTUIWithTabs with otherKindFilter dispatch
- Use CROSS_SKILL_NAME constant in AuditPage.tsx