Agents are single .md files, not directories. The content viewer now:
- Detects agent vs skill via contentKind field on the model
- Renders agent .md content directly (no directory walk)
- Shows a single-file tree entry for the agent
- Resolves file paths from agentsSourcePath for agents
Add -p/--project support to 'backup agents' and 'restore agents' commands.
Project-mode backups are stored under .skillshare/backups/ (parallel to
.skillshare/trash/).
Backup engine changes:
- Add ProjectBackupDir(), CreateInDir(), ListInDir() to internal/backup
- Add RestoreLatestInDir(), FindBackupsForTargetInDir(),
GetBackupByTimestampInDir() to restore.go
- Existing global functions become thin wrappers (zero caller churn)
Command layer changes:
- Allow project mode through for kind=agents in cmdBackup/cmdRestore
- Auto-detect project mode when .skillshare/config.yaml exists
- Refactor backup_agents.go with resolveAgentBackupContext() to
resolve backup dir + agent targets per mode
Skills backup in project mode remains unsupported (error unchanged).
From 3-agent review (reuse, quality, efficiency):
Bug fix:
- syncAgentsProject: use resolveProjectAgentTargetPath instead of
inline path resolution (~ was not expanded for absolute paths)
Deduplication:
- Extract syncAgentTarget() shared by global + project sync loops
(eliminates 30-line copy-paste)
- Extract renderAgentCheck() shared by project + global check
(eliminates duplicate rendering block)
- Consolidate countLinkedAgents → delegates to countAgentLinksAndBroken
Efficiency:
- Use DirEntry.Type() instead of os.Lstat in diff_agents.go and
doctor_agents.go (saves one syscall per .md file)
Cleanup:
- Remove dead start param from cmdCollectAgents
- Remove unused imports
Net: -76 lines.
Remove all "not yet supported in project mode" errors. Every command
that supports agents in global mode now also supports project mode:
- status -p agents: shows project agent source + per-target status
- status -p all: shows both skills and agents
- check -p agents: checks agent status from .skillshare/agents/
- diff -p agents: computes agent diffs (missing/orphan per target)
- diff agents (global): also now fully implemented via diffGlobalAgents
- collect -p agents: collects local agents from project targets
- audit -p agents: scans .skillshare/agents/ for security patterns
New file: diff_agents.go — shared agent diff logic for both modes
(computeAgentDiff, diffProjectAgents, diffGlobalAgents).
11 new integration tests covering all 5 commands in project mode.
Total agent tests: 56.
7 new integration tests covering:
- trash agents empty / delete
- uninstall agents in project mode (fix: wire kind into project dispatch)
- check all (combined skill + agent)
- sync agents skips targets without agent path
- list all --json verifies kind field on every entry
- status agents --json with target details
Total agent tests: 45 (38 + 7).
list_tui_item: show [A] badge prefix for agents in terminal list view.
list.go: add Kind field to skillEntry and skillJSON structs.
SyncPage: add kind badge to diff items using DiffTarget.items.kind.
AuditPage: add kind badge to audit result cards.
UpdatePage: add kind badge to update result items.
SkillPickerModal: add kind badge in skill picker.
client.ts: add kind to DiffTarget items and AuditResult types.
check: add parseKindArg() for 'skillshare check agents'. When agents
kind selected, runs CheckAgents() on agents source dir and displays
per-agent status (up_to_date/drifted/local/error). Supports --json.
uninstall: add --kind flag to parseUninstallArgs and parseKindFlag()
in cmdUninstall dispatch. Kind stored in uninstallOptions for
agent-specific uninstall routing.
SkillDetailPage: import KindBadge, show kind badge (S/A) next to skill
name in the detail header.
audit: add parseKindArg() for 'skillshare audit agents' syntax. Kind
filter parsing ready, actual agent-only filtering to be wired.
enable.go: support --kind agent flag to route enable/disable operations
to .agentignore instead of .skillignore. Works in both global and project
modes. Oplog entries now include kind field.
TargetsPage.tsx: show agent path below skill path when target has
agentPath. Display agent linked count alongside skill counts.
status: show agents source path and agent count alongside skills source.
doctor: add checkAgentsSource() health check verifying agents source
directory exists, is a directory, and reports agent count. Non-existent
dir is info (not error) since agents are optional.
handler_trash: add kind field to trashItemJSON for frontend badge.
Add kind_filter.go with two parsing strategies:
- parseKindArg(): positional syntax (list agents, sync skills)
- parseKindFlag(): flag syntax (uninstall --kind agent tutor)
resourceKindFilter type with IncludesSkills()/IncludesAgents() helpers
for handler-level routing. Supports singular and plural forms
(skill/skills, agent/agents).
16 test cases covering both parsers and filter logic.
Add AgentsSource field to Config struct with EffectiveAgentsSource()
method that defaults to ~/.config/skillshare/agents when not set.
Global init now creates agents source directory alongside skills source.
Project init creates .skillshare/agents/ alongside .skillshare/skills/.
projectRuntime gains agentsSourcePath field for project-mode agent ops.
Update config.schema.json with agents_source property definition.
status command used a legacy local parser that only looked for a
top-level version: key in SKILL.md frontmatter, always returning empty
since version now lives under metadata.version.
Replace local readSkillVersion() and fetchRemoteSkillVersion() with
the shared versioncheck.ReadLocalSkillVersion() and
FetchRemoteSkillVersion() from internal/version, matching what doctor
and upgrade already use.
Remove now-unused skillshareSkillURL constant from init.go.
Closes#121
Replace direct os.Symlink calls in extras.go with createLink, gaining:
- Relative symlink support in project mode
- Windows junction fallback for extras (previously missing)
Thread projectRoot through SyncExtra, CollectExtraFiles, and all callers.
Ref: #120
Project-mode sync now passes the project root directory through to
createLink, enabling relative symlinks for all paths under the project.
Server handlers use s.projectRoot for project-mode dashboards.
Ref: #120
SyncTargetMerge, SyncTargetMergeWithSkills, CreateSymlink, and SyncTarget
now accept projectRoot. When non-empty, createLink uses relative symlinks
for paths under the project root.
All existing callers pass empty string (global mode, no behavior change).
Ref: #120
Sync's registry prune logic removed entries for installed skills whose
files were missing from disk. This was wrong: the registry is the
authoritative record of installations managed by install/uninstall.
Remove PruneStaleSkills calls from sync (CLI global, CLI project, and
web UI handler). Reconcile (called during install) still uses prune
with full metadata context, which is correct.
Fixes: running 'sync' after 'install' would clear registry.yaml when
the installed skill's source files were not yet on disk.
- doctor: replace inline frontmatter parser with version.ReadLocalSkillVersion
which correctly reads nested metadata.version (fixes#119)
- frontmatter_write: use TrimRight instead of TrimSpace for --- delimiter
so indented --- inside YAML block scalars is not mistaken for end marker
- Update changelog and website changelog for v0.18.7
- Fix UI batch uninstall not removing nested skill registry entries:
handler used flat names (__) but registry stores path names (/),
now tracks exact RelPath from discovered skills for matching
- Add stale entry pruning to ReconcileGlobalSkills and
ReconcileProjectSkills using a live set built during disk walk,
so skills deleted from source are removed from registry
- Trigger registry reconcile after sync in both UI handler (via defer
for early-return safety) and CLI (global + project mode), writing
warnings to stderr to avoid corrupting --json output
- UI: fix BatchUninstallPage search treating plain text as exact-match
glob (now substring search when no * or ? present), display nested
skill paths with / instead of __ in confirm and result dialogs
- UI: hide redundant 'X repo(s) and Y skill(s) already up to date'
line on UpdatePage when everything is already current
- Fix test isolation: set XDG_CONFIG_HOME in server test helpers to
prevent host agents dir leaking into test results, skip chmod-based
oplog test when running as root
- Add README badge for Awesome Codex CLI
Add --help/-h flag handling to 7 commands that were missing it:
sync, status, collect, pull, push, doctor, ui.
Previously, running e.g. 'skillshare push --help' would execute
the push instead of showing help. Now all commands safely show
usage info when --help is passed.
Also adds wantsHelp() helper to reduce duplication across commands.
Closes#113
P1: check.go '@' separator broke SSH URLs (git@github.com:org/repo)
— splitURLBranch would split at the '@' in the URL itself
— Fix: use tab character as separator (cannot appear in URLs)
— Added unit test for SSH URL round-trip
P1: install_config.go grouped same-repo different-branch skills together
— groupConfigSkillsByRepo keyed by CloneURL only, ignoring Branch
— Fix: include branch in grouping key so each branch clones separately
P2: reconcile never cleared stale branch from registry
— Only updated when meta.Branch was non-empty, never cleared it
— Fix: sync branch unconditionally when meta is available
- check.go: extract urlBranchKey()/splitURLBranch() helpers, used in 5 places
- handler_skills.go: extract enrichSkillBranch() helper, used in 2 handlers
- handler_targets.go: merge duplicate merge/copy resolution into single case
- list.go: cache git.GetCurrentBranch() per-repo instead of per-skill
- Set source.Branch in project install path
- Sync branch in project reconcile
- Add Branch to checkRepoResult and RepoCheckOutput for JSON/display
- Read current branch from tracked repos in check
Ref: #90
- Add GetRemoteRefHash/WithAuth/WithEnv to internal/git/info.go:
uses git ls-remote with refs/heads/<branch> when branch is set,
falls back to HEAD when branch is empty
- Add Branch field to URLCheckInput and URLCheckOutput in check/parallel.go;
ParallelCheckURLs dispatches to GetRemoteRefHashWithAuth when Branch is set
- check.go: group skills by RepoURL@branch composite key so skills on
different branches of the same repo are checked against the correct ref;
urlHashMap keyed by same composite key for correct broadcast
- install_config.go (InstallFromConfig): propagate SkillEntryDTO.Branch
into Source.Branch for both plain and tracked skill phases so registry
rebuild (install --from-config) respects the recorded branch
- NewMetaFromSource: set meta.Branch from source.Branch
- installFromDiscoveryImpl: forward discovery.Source.Branch when building
per-skill Source struct for metadata
- installFromGitSubdir: pass source.Branch to sparseCloneSubdir (was
hardcoded empty string, causing subdir installs to ignore --branch)
- ReconcileGlobalSkills: sync meta.Branch to registry on both new and
existing entries
- toSkillEntryDTOs: include Branch field in DTO conversion
- updateRegularSkill / updateSkillFromMeta: restore source.Branch from
meta before reinstalling, so updates pull from the originally-specified
branch
Tests: TestInstallBranch_MetadataPersistence, TestInstallBranch_UpdatePreservesBranch
Source.Branch threads the branch parameter through discovery.
cloneRepo() passes --branch to git clone when set.
source.Branch is set from parsed.opts.Branch in cmdInstall.
Ref: #90
Add --branch / -b flag to install command:
- Flag parsing with value-required and non-empty validation
- Mutual exclusion: --branch rejected for non-git (local path) sources
- Help text added to printInstallHelp()
- Integration tests covering all three error paths
Add per-target target_naming setting that controls how skill directories
are named in sync targets. 'flat' (default) preserves the existing
flattened __ separator behavior. 'standard' uses the SKILL.md name field
directly, following the Agent Skills specification.
Standard mode:
- Validates SKILL.md names match directory basenames
- Detects and skips name collisions with warnings
- Auto-migrates managed entries when switching from flat to standard
- Preserves legacy entries when bare name is already occupied
Also includes:
- Per-target toggle via CLI (--target-naming), TUI (N key), and Web UI
- Collision output redesigned as deduplicated compact summary
- Config inheritance: global target_naming → per-target override
- JSON schema + UI validation for the new field
Closes#110
Move needsSudo, execFunc, and reexecWithSudo to upgrade_unix.go with
//go:build !windows. Add upgrade_windows.go with no-op stubs.
Fixes GoReleaser Windows build failure (undefined: unix.Access).
diff (CLI, TUI, Web UI) now applies FilterSkillsByTarget before
computing differences, matching the behavior of sync/status/doctor.
Previously, skills with unsupported targets values (e.g. targets: ["*"])
appeared as false 'source only' pending items that sync could never resolve.
- AddPattern returns (bool, error) — single file read, no TOCTOU
- Remove external HasPattern guard in CLI (AddPattern handles it)
- Merge handleDisableSkill/handleEnableSkill into handleToggleSkill
- Fix locking: RLock for discovery, Lock only for file write
- Handle errors from AddPattern/RemovePattern in TUI toggle
- Only write oplog when changes actually occurred
- Inline capitalizeFirst with strings.ToUpper
Friendly interface for .skillignore. Supports skill names and glob
patterns. Dual-mode (--project/--global). Dry-run support.
Does not auto-sync — prompts user to run sync.
When the binary is installed in a non-writable directory (e.g. /usr/local/bin),
upgrade now automatically re-executes with sudo instead of failing with a
permission error.
Uses unix.Access() to check directory writability and unix.Exec() to replace
the process with sudo. Skipped on Windows.
Ref: #105
- Extract skillMatchesFilter() helper to deduplicate relPath matching
logic between filterAnalyzeSkills() and TUI applyFilter()
- Cache filteredDescChars/filteredBodyChars in applyFilter() so
renderStatsLine() reads cached values instead of iterating on
every render (also fixes incorrect sums when list is paginated)
- Use filterAnalyzeSkills summary in plain-text path instead of
manually re-summing chars