Commit Graph
102 Commits
Author SHA1 Message Date
Willie 0bd79a438e feat: add hub persistence to config for CLI and Web UI
Hub sources are now saved in config.yaml (both global and project),
replacing the Web UI's localStorage-based approach. This allows CLI
and UI to share the same hub list.

- Add HubConfig/HubEntry types and helper methods (resolve, add, remove)
- Add CLI subcommands: hub add/list/remove/default
- Search --hub now resolves saved labels (e.g. --hub team)
- Add REST API endpoints for hub CRUD (GET/PUT/POST/DELETE /api/hub/saved)
- Migrate SearchPage from localStorage to server API calls
2026-02-13 14:21:37 +08:00
Willie 6253099d7d fix: correct hub help text, gofmt alignment, and missing tags type
- Fix --index-url → --hub in hub index help text
- Fix gofmt struct field alignment in SearchResult after adding Tags
- Add missing tags field to frontend SearchResult TypeScript interface
2026-02-13 14:21:37 +08:00
Willie 88847ea3ae feat: add skill field to hub schema for multi-skill repo support
Hub JSON entries can now specify a `skill` field to target a specific
skill within a multi-skill repo. CLI auto-passes -s flag, Web UI
skips the picker modal when skill is specified.

Also adds Community Hub section to search docs with link to
runkids/skillshare-hub.
2026-02-13 14:21:37 +08:00
Willie 0aa60cd2e5 feat: add tags field to hub index and update docs
Add optional tags []string to SkillEntry and search index, enabling
classification and filtering of skills in hub catalogs. Tags are
read from SKILL.md frontmatter (comma-separated) during hub index
generation and included in search haystack for keyword matching.

Rewrite community-hub spec to reflect hand-curated hub.json model
(contributors edit JSON directly via PR, no skills/ directory).
Update website docs with tags schema, web dashboard screenshots,
and hub management instructions.
2026-02-13 14:21:37 +08:00
Willie cd81a01f99 docs: add hub index guide, command reference, and rename to skillshare-hub.json
Rename default output from index.json to skillshare-hub.json for
uniqueness. Add website docs for hub command and hub index guide.
Update search command docs with --index-url section. Add hub and
hub-index to sidebar.
2026-02-13 14:21:37 +08:00
Willie d2854ed621 feat(ui): add private index search with multi-index management
Add /api/hub/index endpoint and index_url support to /api/search.
SearchPage now has GitHub/Private Index mode tabs with localStorage
persistence. Built-in "Current Skills" index plus user-managed
custom indexes with URL dedup and add/delete flow.
2026-02-13 14:21:37 +08:00
Willie 0ff683167a feat(search): add --index-url for private index search
SearchFromIndexURL consumes hub-generated index.json (local or HTTP),
with sourcePath resolution, relative path detection (including Windows),
and limit enforcement. The search CLI routes to index search when
--index-url is provided, with conditional spinner text and scoped
GitHub-specific error handling.
2026-02-13 14:21:37 +08:00
Willie da7b9eac51 feat(hub): add index generation with layered output
BuildIndex scans a source directory and produces a hub index.json.
Default output is minimal (name, description, source only).
Full mode (--full) adds metadata: flatName, relPath, type, repoUrl,
version, installedAt, isInRepo.

Key behaviors:
- Fail fast on missing source directory (no silent empty index)
- Deterministic sort by name ascending
- YAML block scalar indicators (|, >) skipped in description parsing
- Redundant fields suppressed: flatName==name, relPath==source, isInRepo==false
- All metadata fields use omitempty for clean JSON output
2026-02-13 14:21:37 +08:00
Willie c2f737377a chore(test): add more source test 2026-02-13 14:21:37 +08:00
Willie d8699762ad fix: use deep skill count in init and prevent null files in git status API
- init: replace shallow os.ReadDir count with DiscoverSourceSkills()
  to correctly count nested skills by SKILL.md presence
- handler_git: guard against nil slice from GetDirtyFiles() overwriting
  the initialized empty slice, which serialized as JSON null
- GitSyncPage: add optional chaining on status.files for defense
2026-02-13 14:21:36 +08:00
Willie 192ccc7955 feat: add Cortex Code (Snowflake) target
Project .cortex/skills, global ~/.snowflake/cortex/skills.
2026-02-13 14:21:36 +08:00
Willie 59b6067e6d feat: add Letta project-mode support (.skills/)
Letta previously only had global path. Add project_name and
project_path per docs.letta.com/letta-code/skills.
2026-02-13 14:21:36 +08:00
Willie bf37442952 feat: add Xcode Codex and Xcode Claude Agent targets
Add macOS-specific Xcode Coding Intelligence targets:
- xcode-codex: global ~/Library/Developer/Xcode/CodingAssistant/codex/skills
- xcode-claude: global ~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/skills

Update tests: droid now shares .agents/skills group, cursor replaces
claude-code as the single-path test case since xcode-claude shares
.claude/skills.
2026-02-13 14:21:36 +08:00
Willie 5b964eda62 feat: add COMATE target, switch Droid to .agents/skills
- Add COMATE with ~/.comate/skills (global) and .comate/skills (project)
- Update Droid from .factory/skills to universal .agents/skills
2026-02-13 14:21:36 +08:00
Willie d9fd9cc573 docs: add v0.11.5 changelog, remove stale moltbot target, fix target count
- Add CHANGELOG v0.11.5 covering --into flag, nested skill support,
  IBM Bob target, JS/TS highlighting, and project init grouping
- Remove deprecated moltbot entry from targets.yaml (renamed to openclaw)
- Fix target name cmdcode → commandcode in supported-targets table
- Update target count from 44+ to 43+ across docs (42 global + replit)
2026-02-13 14:21:36 +08:00
Willie 9ee5324689 feat: enhance security audit thresholds, logging, and UI 2026-02-13 14:21:36 +08:00
Willie e0c9499c14 fix: parse YAML block scalars in frontmatter and use CodeMirror for all file types
Two related UI fixes for the skill detail page:

1. YAML block scalar parsing: description fields using >-, >, |, |-
   syntax showed the raw indicator instead of the parsed value. Fix
   both frontend (parseScalarValue) and backend (ParseFrontmatterField)
   to recognize block indicators and read indented continuation lines.

2. File viewer: non-markdown files (.py, .sh, etc.) rendered as plain
   <pre> without line numbers or highlighting. Now all non-markdown
   files use CodeMirror, with Python syntax highlighting via
   @codemirror/lang-python.
2026-02-13 14:21:36 +08:00
Willie 3a132ab72e fix: update nested skills by full relative path in Web UI
The Update button on SkillDetailPage passed only the skill basename
(e.g. "ascii-box-check") instead of the full relative path
("utils/ascii-box-check"), causing "not found as tracked repo or
updatable skill" errors for nested skills.

- Frontend: use skill.relPath instead of skill.name for non-repo skills
- Backend: rewrite getServerUpdatableSkills with filepath.WalkDir so
  Update All also discovers nested skills
2026-02-13 14:21:36 +08:00
Willie aa43f94892 feat: add --into flag for skill install command
Allow installing skills into subdirectories for organized folder
structures. Works with all install modes (direct, discovery, tracked)
in both global and project mode.

- Add Into field to InstallOptions and IntoPath() validation
- Update 4 dest-path construction points in CLI with destWithInto()
- Update InstallTrackedRepo for --into prefix in dest and gitignore
- Rewrite ReconcileProjectSkills to use filepath.WalkDir (recursive)
- Add --into to Web UI install handler, API client, and form
- Add 5 integration tests covering local, multi-level, validation,
  project mode, and no-source rejection
2026-02-13 14:21:36 +08:00
Willie 57e7b68131 feat: group shared-path agents in project init UI
Multiple agents (Amp, Codex, Copilot, Gemini, Goose, Kimi, OpenCode,
Replit) all map to .agents/skills in project mode. Previously init -p
showed each as a separate selectable entry pointing to the same directory,
which was redundant and confusing.

Now targets sharing a project path are collapsed into a single group entry
(e.g. "agents") with member names shown in parentheses. Discover uses
path-based dedup so an existing "amp" entry correctly prevents the
"agents" group from appearing as new. --select accepts both canonical
and member names for backward compatibility.

- Add project_name/project_path to agents meta-target in targets.yaml
- Add GroupedProjectTargets() in config package with unit tests
- Rewrite detect/list/prompt/discover in init_project.go
- Add agents target to playground demo project
2026-02-13 14:21:36 +08:00
Willie f50847eb6c feat: support nested skills in check/update and add organizing guide
GetTrackedRepos() and GetUpdatableSkills() now walk subdirectories
recursively so skills organized in folders (e.g. frontend/vue/) are
detected by check and update commands. Previously only direct children
of the source directory were scanned.

Also adds:
- Short name resolution for `update` (e.g. `update vue-best-practices`
  resolves to `frontend/vue/vue-best-practices`)
- Fix ReadMeta nil check in updateSkillOrRepo to ensure fallback fires
- Remove logo from `check`, replace with mode-aware header
- New docs guide: Organizing Skills with Folders
- Rename screenshot to organizing-skills-comparison.png
2026-02-13 14:21:36 +08:00
Willie 8d17b75e95 feat: add IBM Bob target and update Goose to universal project path
- Add IBM Bob agent (global: ~/.bob/skills, project: .bob/skills)
- Change Goose project_path from .goose/skills to .agents/skills
  to align with universal agent directory convention
- Update supported target count from 43+ to 44+ across docs
2026-02-13 14:21:34 +08:00
Willie 2c982848c5 feat: classify HIGH audit findings as warnings and refresh docs/playground 2026-02-11 10:10:09 +08:00
Willie 927bad707e feat: add audit rules Web UI page with create/edit support
Add REST API (GET/PUT/POST /api/audit/rules) for managing custom
audit-rules.yaml through the web dashboard. Extract template and
validation logic from CLI into reusable audit package functions
(ValidateRulesYAML, InitRulesFile, DefaultRulesTemplate). Frontend
provides CodeMirror YAML editor with dirty tracking, file creation
flow, and mode-aware path display. Sidebar nav gains overflow scroll.
2026-02-11 04:36:58 +08:00
Willie fbcec80788 feat: externalize audit rules to YAML with user customization
Move 17 hardcoded audit rules from Go structs to embedded rules.yaml,
enabling community PRs on rule definitions without recompilation.

Add user-customizable audit rules at two levels:
- Global: ~/.config/skillshare/audit-rules.yaml
- Project: .skillshare/audit-rules.yaml

Merge semantics: built-in → global → project. Users can append new
rules, override existing ones by id, or disable them (enabled: false).

Replace hardcoded localhostURL check with generic exclude regex field
on rules. Add --init-rules flag to scaffold a starter rules file.

Public API (ScanSkill, ScanContent, Finding, Result) unchanged —
callers require zero modifications.
2026-02-11 03:40:54 +08:00
Willie 84ba16802d feat: add log filtering, improve log UX, and custom dropdown
- Add --cmd, --status, --since, --json flags to CLI log command
- Auto-skip irrelevant log section when --cmd narrows to one file
- Add blank line separator between log entries for readability
- API returns totalAll and commands for smarter frontend filtering
- Custom HandSelect dropdown matching hand-drawn design system
- Empty state distinguishes "no matching entries" from "no entries"
- Update website docs and built-in skill reference with new flags
2026-02-11 03:40:54 +08:00
Willie 0b280d0864 fix: normalize backslash path separators for Windows (fixes #18)
On Windows, filepath.Join produces backslash separators that were
written directly into .gitignore and JSON metadata files. Git does
not match backslash patterns, and metadata subdirs with backslashes
corrupt source URLs during updates.

Use strings.ReplaceAll(s, "\\", "/") at write boundaries — matching
the existing pattern in sync.go — to ensure config/metadata files
always contain forward slashes regardless of OS.
2026-02-11 03:30:14 +08:00
Willie f49b3999bc feat: enrich install and audit logs with mode/path and installed skills 2026-02-10 11:51:09 +08:00
Willie 4d620f25fd feat: improve log view and project log ignore defaults 2026-02-10 04:52:52 +08:00
Willie 46c1f8ebcb feat: add tracked field to ProjectSkill config, fix reconcile for tracked repos
ProjectSkill gains `tracked: true` (omitempty) so `install -p` can
correctly dispatch tracked repos via InstallTrackedRepo instead of
regular Install. ReconcileProjectSkills now detects .git/ dirs and
reads git remote origin URL for tracked repos that lack meta files,
fixing the bug where tracked repos were silently skipped during
reconcile. SkillName validation is moved after the tracked branch
so _ prefixed repo names no longer fail.

Docs updated to position config.yaml as a portable skill manifest
usable by teams, open source contributors, and community templates.
2026-02-10 04:43:39 +08:00
Willie e5813cc7e0 feat: add oplog instrumentation to all API handlers, improve audit/log/sync CLI
- Add oplog write helpers to server (oplog_helper.go) and instrument
  all handler_*.go endpoints with ops/audit logging
- Improve audit CLI with structured auditRunSummary and severity counts
- Enhance log CLI with richer filtering and detail display
- Improve sync CLI with drift detection summaries in oplog
- Reorder web UI sidebar nav by user workflow (core → acquire → distribute → maintain → monitor)
- Enhance LogPage with better formatting and filtering
- Add server oplog unit tests (logging_test.go, log_test.go)
- Update docs for log command and quick-reference
2026-02-10 03:50:03 +08:00
Willie f2017a35aa feat: fix tracked repo discovery, improve naming, and unify project list
Sync discovery (DiscoverSourceSkills) was skipping all hidden directories
via utils.IsHidden(), causing skills inside .curated/ and .system/ (like
openai/skills) to be invisible after install. Now only .git is skipped,
matching the install-time discovery that was already fixed in 8ec5306.

Tracked repo naming now uses owner-repo format (e.g., _openai-skills
instead of _skills) via new Source.TrackName() method, preventing
collisions between repos that share the same basename.

Project-mode `list` command now uses recursive DiscoverSourceSkills()
instead of shallow os.ReadDir(), aligning with global list and web UI
behavior so tracked repo skills are visible everywhere.

Also includes CHANGELOG for v0.11.0, README updates, docs improvements,
and minor UI nav reorder.
2026-02-10 03:13:21 +08:00
Willie 5a65993304 feat: add operation log — JSONL-based persistent audit trail for CLI, API, and web UI
Add oplog package (internal/oplog) that records every mutating command
(install, uninstall, sync, push, pull, collect, backup, restore, update,
audit) as a JSONL entry with timestamp, status, duration, and args.

- CLI: `skillshare log` with --audit, --tail, --clear, --project flags
- API: GET/DELETE /api/log endpoints with type and limit params
- Web UI: LogPage with ops/audit tabs, table view, clear and refresh
- Instrumentation across 12 command handlers (CLI + server)
2026-02-10 02:56:59 +08:00
Willie 8ec53065b5 feat(install): fix hidden-dir discovery, add fuzzy search, and improve install UX
discoverSkills() skipped all dot-prefixed dirs, causing repos like
openai/skills (which use .curated/ and .system/) to find 0 skills.
Fix: only skip .git, traverse all other hidden dirs.

CLI --skill flag now falls back to fuzzy matching (via lithammer/fuzzysearch)
when exact match fails. Single fuzzy match auto-selects; ambiguous matches
show "did you mean" suggestions.

UI SkillPickerModal gains a filter input (autofocus, substring on name+path)
that appears for >5 skills. Select All toggles only filtered skills.

Batch install toast fix: always show summary toast even when some skills
are blocked by security audit (previously early-returned with no feedback).
Audit dialog now targets only blocked skills for force-retry.

CLI output for mixed results: use warning banner instead of success,
show failures first, condense >10 successes into a single line.
2026-02-10 02:23:16 +08:00
Willie 4d17ff5d57 feat: add security audit — scan engine, CLI, install hooks, web UI, and docs
Scan skills for prompt injection, data exfiltration, credential access,
destructive commands, obfuscation, and suspicious URLs. CRITICAL findings
block installation by default; HIGH/MEDIUM shown as warnings.

- Scan engine: internal/audit with regex-based pattern matching
- CLI: `skillshare audit [name]` with per-skill progress and summary
- Install hooks: auto-scan after copy, block on CRITICAL unless --force
- Web UI: AuditPage with run/rescan, InstallForm shows ConfirmDialog
  for audit blocks (force-retry) and warning details
- ConfirmDialog: add `wide` prop, hide cancel when cancelText is empty
- Reduced false positives: rm -rf only flags root/glob, skip localhost
  URLs, exclude `fetch` as English word, hidden-unicode downgraded to HIGH
- README: add audit section, update screenshots, unify image sizes,
  add audit to Why/Comparison/Daily Commands
- Docs: audit command page, install security scanning section, FAQ,
  common errors, daily workflow, sidebar, landing page, intro
- Blog specs: add audit sections to Dev.to and Medium drafts
2026-02-10 01:53:55 +08:00
Willie d4290307ca feat: add sync drift detection to status, doctor, and web UI
Detect when targets have fewer linked skills than source and surface
warnings across CLI (status, doctor) and web UI (Dashboard, Targets).
Helps users notice unsynced skills after installing new ones.
2026-02-10 00:10:10 +08:00
Willie caf119d5be feat(install): support subpath in SSH URLs with // separator
Corporate environments using SSH-only Git access couldn't specify a
skill within a monorepo. Extend gitSSHPattern regex and parseGitSSH()
to capture an optional //subdir suffix, matching the convention used
by Terraform and Go modules.

Example: git@host:owner/repo.git//path/to/skill
2026-02-09 23:46:23 +08:00
Willie 8604ab278e feat(ui): add Trash page, trash API handlers, and CLI delete/empty commands
- Add Web UI Trash page with list, restore, delete, and empty actions
- Add 4 server handlers (handler_trash.go) with dual-mode support
- Fix handleUninstallSkill/handleUninstallRepo to use trash.MoveToTrash
  instead of os.RemoveAll (bug fix: uninstall via UI now soft-deletes)
- Add trash delete/empty CLI subcommands with integration tests
- Show Uninstall button for all skills in SkillDetailPage (not just
  tracked/installed ones)
- Update confirm dialog wording to reflect soft-delete behavior
- Update docs with new trash subcommands
2026-02-09 23:19:28 +08:00
Willie 3a920610f2 feat: add trash (soft-delete) for uninstall with 7-day retention
Replace permanent deletion with soft-delete: uninstall now moves skills
to a trash directory instead of using os.RemoveAll. Skills are retained
for 7 days and automatically cleaned up during sync/uninstall operations.

- Add internal/trash package (MoveToTrash, List, Cleanup, Restore, FindByName)
- Add `skillshare trash list` and `skillshare trash restore <name>` commands
- Show reinstall hint from metadata when uninstalling remote skills
- Add trash status to `skillshare doctor` output
- Opportunistic cleanup of expired items during sync and uninstall
- Support both global (~/.config/skillshare/trash/) and project (.skillshare/trash/) modes
- 10 unit tests + 10 integration tests
- Update docs: uninstall, trash, doctor, FAQ, file-structure, sync, daily-workflow
2026-02-09 22:46:36 +08:00
Willie d2e0065553 feat(search): add relevance scoring, parallel enrichment, and repo-scoped search
Search results were ranked only by GitHub stars, causing unrelated
high-star repos to outrank dedicated skill repos. Additionally,
owner/repo queries (e.g., "vercel-labs/skills") were treated as
plain text search instead of repo-scoped search, returning
completely wrong results.

Changes:
- Add multi-signal relevance scoring (name 0.45, description 0.25,
  stars 0.30) with log10-normalized star counts
- Detect owner/repo[/subdir] queries and use GitHub `repo:` qualifier
- Parallelize star and description enrichment (WaitGroup + semaphore,
  cap 10) — reduces wall time from 3-6s to ~200-600ms
- Extract both name and description from SKILL.md frontmatter
- Add Score field with json:"-" tag (hidden from CLI --json and API)
- Remove overly generous ContainsAny partial matching in name scoring
2026-02-09 22:18:05 +08:00
Willie 0c49860d63 feat: add project mode labels, privacy-first messaging, and UI polish
- Add (project) labels to status, sync, collect, target, and uninstall
  headers for clear mode distinction (matching list/target list pattern)
- Add ui.WithModeLabel() helper for shared functions that run in both modes
- Update uninstall confirmation prompt: "from the project?" in project mode
- Add "Privacy-first" to README Why section and website homepage
- Replace "Unified Source" card with "Privacy-First" card on website
- Unify Quick Actions card heights with h-full in DashboardPage
- Add frontend rebuild note to Docker sandbox docs
2026-02-09 21:08:03 +08:00
Willie 14bd568b9a feat: add project mode support to web dashboard (skillshare ui -p)
The web dashboard now fully supports project-level skills. When launched
with `-p` or when `.skillshare/config.yaml` is auto-detected, the UI
adapts: Git Sync and Backup pages are hidden, Config edits the project
config, Install reconciles ProjectConfig.Skills[], and targets resolve
from project-level definitions.

Server: add NewProject constructor, IsProjectMode/configPath/saveConfig/
reloadConfig helpers, branch all handlers for project mode.

Frontend: AppContext propagates isProjectMode, Layout filters nav items,
Git/Backup pages show unavailable message, Config/Dashboard adapt.

Extract ReconcileProjectSkills to internal/config for reuse by both CLI
and server. Add unit tests and integration tests for project UI.

Update docs, README, and Docker playground with project mode demo project
and skillshare-ui-p alias.
2026-02-08 17:15:59 +08:00
Willie 5df04bdc36 chore: gitignore internal/server/dist/ and auto-create placeholder on build
Build artifacts (favicon, logos, index.html) were tracked in git to
satisfy go:embed, causing noisy diffs after `make ui-build`. Now the
entire dist/ is gitignored and `make build` auto-creates a minimal
placeholder index.html when dist is missing, so fresh clones still
compile without a frontend build step.

CI workflows updated to use `make build` instead of bare `go build`
to pick up the placeholder logic.
2026-02-08 16:12:43 +08:00
Willie 6185849328 fix: handle Windows junctions in sync and diff 2026-02-08 15:14:16 +08:00
Willie 092fb14f8a feat: add web dashboard with embedded React SPA (skillshare ui)
Single-binary web UI for visual skill management — React 19 + Vite
frontend embedded via go:embed, Go net/http REST API backend (30+
endpoints). Includes dashboard, skills browser, targets, sync, collect,
search, install, config editor, backup/restore, and git sync pages.

Also adds Bitbucket/GitLab URL parsing for install, git operations
library, skill version checking, CI frontend build steps, Docker
sandbox support, and website docs for the ui command.
2026-02-08 05:08:30 +08:00
Willie bf41422659 fix(install): naming behavior and docs 2026-02-07 21:08:36 +08:00
Willie 78924f08ea fix(backup): replace filepath.Walk with os.ReadDir to handle Windows junctions
filepath.Walk fails on Windows NTFS junctions with "Incorrect function"
because os.Lstat returns nil info, bypassing all junction-detection logic
and crashing the entire backup for that target. This means one unreadable
junction prevents ALL local skills from being backed up.

Replace with os.ReadDir + os.Lstat so junctions are identified and skipped
before any read attempt. Also add Windows CI and unit tests for copyDir.

Fixes runkids/skillshare#7
2026-02-07 00:35:11 +08:00
Willie 0162bddfde feat: add per-target sync mode support for project mode
Allow project targets to set mode individually (merge or symlink),
mirroring global behavior. Default remains merge.

- Add Mode field to ProjectTargetEntry with YAML marshal/unmarshal
- Add mode branching in project sync (reuses syncMergeMode/syncSymlinkMode)
- Support --mode flag in target info for project targets
- Mode-aware unlink in target remove
- Unify project sync UI with global sync output format
- Update docs to reflect per-target mode support
2026-02-05 13:20:12 +08:00
Willie b83300ac05 feat: project level skills 2026-02-05 11:20:53 +08:00
Willie d084e59c8d fix(upgrade): gracefully handle rate limit, use cached version
- Skip CLI upgrade silently when API rate limited and no cache
- Use cached version to upgrade when API fails but cache exists
- Extract BuildDownloadURL for direct URL construction without API
- Add GetCachedVersion to expose cached latest version
2026-02-01 08:33:54 +08:00