docs(sync,diff): fix agent sync description and add agent diff section

- Fix sync.md: 'sync' defaults to skills only, not skills+agents
- Fix --all flag description: syncs skills + agents + extras
- Add 'sync agents' to usage examples
- Add Agent Diff section to diff.md with usage examples
This commit is contained in:
Willie
2026-04-09 23:56:03 +08:00
parent 294be5f08a
commit d4bd0a66df
2 changed files with 22 additions and 6 deletions
+15 -1
View File
@@ -9,9 +9,9 @@ Show differences between source and targets.
```bash
skillshare diff # All targets (interactive TUI)
skillshare diff claude # Specific target
skillshare diff agents # Agent targets only
skillshare diff --stat # File-level changes
skillshare diff --patch # Full unified diff
skillshare diff # Includes extras automatically
```
![diff demo](/img/diff-demo.png)
@@ -184,6 +184,20 @@ skillshare diff claude # See exactly what's different
skillshare sync # Fix it
```
## Agent Diff {#agent-diff}
Use the `agents` keyword to diff only agent targets:
```bash
skillshare diff agents # All agent-capable targets
skillshare diff agents claude # Specific target
skillshare diff agents --json # JSON output
```
Agent diff shows missing agents (need sync), orphan symlinks (need prune), and local-only agent files. Only targets with an `agents` path configuration are included. See [Agents — Supported Targets](/docs/understand/agents#supported-targets) for the full list.
---
## Options
| Flag | Description |
+7 -5
View File
@@ -86,7 +86,8 @@ Push skills from source to all targets.
```bash
skillshare sync # Sync skills to all targets
skillshare sync --all # Sync skills + extras
skillshare sync agents # Sync agents only
skillshare sync --all # Sync skills + agents + extras
skillshare sync --dry-run # Preview changes
skillshare sync -n # Short form
skillshare sync --force # Overwrite all managed skills
@@ -95,7 +96,7 @@ skillshare sync -f # Short form
| Flag | Short | Description |
|------|-------|-------------|
| `--all` | | Also sync extras after skills (see [sync extras](#sync-extras) below) |
| `--all` | | Also sync agents and extras after skills |
| `--dry-run` | `-n` | Preview changes without writing |
| `--force` | `-f` | Overwrite all managed entries regardless of checksum (copy mode) or replace existing directories with symlinks (merge mode) |
| `--json` | | Output as JSON |
@@ -481,11 +482,12 @@ flowchart TD
## Agent Sync {#agent-sync}
`skillshare sync` automatically syncs agents alongside skills to targets that support agents. You can also sync agents independently:
Agents are synced separately from skills. Use `sync agents` for agent-only sync, or `sync --all` to sync everything:
```bash
skillshare sync # Sync skills + agents to all targets
skillshare sync agents # Sync only agents
skillshare sync # Sync skills only (default)
skillshare sync agents # Sync agents only
skillshare sync --all # Sync skills + agents + extras
```
Agent sync supports all three modes (merge, copy, symlink), matching the target's configured mode. Only targets with an `agents` path definition receive agent syncs — currently Claude, Cursor, OpenCode, and Augment. See [Agents — Supported Targets](/docs/understand/agents#supported-targets) for the full list.