Commit Graph
11 Commits
Author SHA1 Message Date
Willie 8eaf0369b0 refactor(validate): drop unreachable knownPatterns list
Every pattern ended in "skills", which the preceding base-name check
already matched, so the loop could never run. One entry also referenced
a path no target has used since the antigravity restructure.
2026-08-02 22:39:06 +08:00
Willie 5160ed5ffe feat(resource): add ResourceKind interface, SkillKind/AgentKind implementations, and reserved name validation
Create internal/resource/ package with:
- kind.go: ResourceKind interface (Discover, ResolveName, FlatName,
  CreateLink, feature gates) + DiscoveredResource struct
- skill.go: SkillKind — directory-based discovery via SKILL.md,
  frontmatter name resolution, nested separator flatten (a/b → a__b)
- agent.go: AgentKind — single-file .md discovery with conventional
  excludes (README/LICENSE/CHANGELOG/SKILL.md), filename-based naming
  with frontmatter override, directory-strip flatten (dir/f.md → f.md)

Add "agents" to reservedSkillNames in validate.SkillName() to prevent
skill names conflicting with the agents source directory.

16 unit tests covering discovery, nested paths, name resolution,
flat name computation, feature gates, and edge cases.
2026-04-07 18:05:39 +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 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 Hung fd4387460a feat: Team Edition - tracked repos, nested skills, collision detection
## New Features
- Tracked repositories: `install --track` to clone team skill repos
- Nested skills: organize in folders, auto-flatten on sync (work/api → work__api)
- Name collision detection: warns when multiple skills share same SKILL.md name
- Auto-pruning: orphaned symlinks cleaned on sync
- Custom naming: `--name` flag for tracked repos

## Changes
- Require target path to exist when adding targets
- Add sync reminder after adding target
- Improve pruning messages (broken vs orphan symlinks)
- Add `{team}:{name}` naming convention recommendation

## Files
- New: update.go, gitignore.go, frontmatter.go
- Updated: sync.go, install.go, uninstall.go, validate.go
- Docs: README.md, SKILL.md
2026-01-20 01:56:07 +08:00
Willie Hung aaae299f9e feat: require target path to exist and show sync reminder
- Change TargetPath validation to return error when path doesn't exist
  instead of just a warning
- Add sync reminder message after successful target add
- Add TestTargetPath unit tests and integration test for non-existent path
2026-01-19 22:18:08 +08:00
Willie Hung 5e15e6bc8a fix: update opencode target path from skill to skills
Opencode unified their path structure to use "skills" (plural).
See: https://opencode.ai/docs/skills/
2026-01-19 21:06:22 +08:00
Willie Hung 0a410234fd feat: add skill installer and expand dry-run previews 2026-01-15 23:15:38 +08:00
Willie Hung 3dd3721dc8 fix: update path validation to accept both 'skills' and 'skill'
OpenCode uses singular 'skill' directory name. Update validation
to use IsLikelySkillsPath() which recognizes both conventions.
2026-01-15 00:02:24 +08:00
Willie acfdbe5751 fix: correct OpenCode skill path to match official spec
OpenCode uses `~/.config/opencode/skill/` (singular) not `skills/`
(plural) per official documentation.
2026-01-14 23:35:39 +08:00
Willie f5e9d9644e docs: improve README with better structure and content
- Add badges (License, Go version, Release)
- Add ASCII flow diagram showing architecture
- Add Table of Contents for navigation
- Add "Why skillshare?" comparison table
- Add Use Cases section (Individual, Team, Open Source)
- Add FAQ section with common questions
- Add Contributing guide with development setup
- Reorganize sections for better readability
2026-01-14 22:12:56 +08:00