Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ All notable CLI behavior changes are documented in this file.

### Added

- Add the `zcode` agent profile, displayed as ZCode, with automatic detection of project-level
and user-level `.zcode/skills` directories.
- Add the `dsh` agent profile, displayed as DeepSeek Harness, with automatic detection of
project-level and user-level `.dsh/skills` directories.
- Add OAuth Device Flow to `skillhub login` when no API token is supplied, including best-effort
Expand Down
1 change: 1 addition & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ Most Agents have both project-level and user-level skills directories. Use `--sc
| `opencode` | `<project>/.opencode/skills/` | `~/.opencode/skills/` |
| `kilo` | `<project>/.kilo/skills/` | `~/.kilo/skills/` |
| `pi` (Pi) | `<project>/.pi/skills/` | `~/.pi/agent/skills/` |
| `zcode` | `<project>/.zcode/skills/` | `~/.zcode/skills/` |
| _fallback_ | `<project>/.agents/skills/` | `~/.agents/skills/` |

For a custom path or an unsupported Agent directory, use `--dir` to specify the installation path. In interactive user scope, the `generic` target is offered alongside detected Agent targets. AStudio appears in that selector when `~/.acode/skills/` exists. When `--scope user|project` finds no matching agent directory, the CLI falls back to the `_fallback_` row above.
Expand Down
5 changes: 3 additions & 2 deletions cli/src/agents/detector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@ import { traeCnProfile } from './profiles/trae-cn'
import { opencodeProfile } from './profiles/opencode'
import { kiloProfile } from './profiles/kilo'
import { piProfile } from './profiles/pi'
import { zcodeProfile } from './profiles/zcode'

export {
aStudioProfile, claudeCodeProfile, codexProfile, cursorProfile, dshProfile, githubCopilotProfile,
geminiCliProfile, openhandsProfile, windsurfProfile, openclawProfile,
kiroCliProfile, rooProfile, traeProfile, traeCnProfile,
opencodeProfile, kiloProfile, piProfile
opencodeProfile, kiloProfile, piProfile, zcodeProfile
}

export const allProfiles: AgentProfile[] = [
aStudioProfile, claudeCodeProfile, codexProfile, cursorProfile, dshProfile, githubCopilotProfile,
geminiCliProfile, openhandsProfile, windsurfProfile, openclawProfile,
kiroCliProfile, rooProfile, traeProfile, traeCnProfile,
opencodeProfile, kiloProfile, piProfile
opencodeProfile, kiloProfile, piProfile, zcodeProfile
]

export const profileMap = new Map(allProfiles.map(p => [p.id, p]))
2 changes: 2 additions & 0 deletions cli/src/agents/profiles/zcode.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { makeProfile } from './make-profile'
export const zcodeProfile = makeProfile('zcode', 'ZCode', '.zcode/skills', '.zcode/skills')
14 changes: 11 additions & 3 deletions cli/test/unit/agents/profiles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { describe, expect, test } from 'bun:test'
import { allProfiles, profileMap } from '../../../src/agents/detector'

describe('agent profiles', () => {
test('has 17 tier 1 profiles', () => {
expect(allProfiles).toHaveLength(17)
test('has 18 tier 1 profiles', () => {
expect(allProfiles).toHaveLength(18)
})

test('all profiles have unique ids', () => {
Expand All @@ -15,14 +15,15 @@ describe('agent profiles', () => {
})

test('profileMap contains all profiles', () => {
expect(profileMap.size).toBe(17)
expect(profileMap.size).toBe(18)
expect(profileMap.has('astudio')).toBe(true)
expect(profileMap.has('claude-code')).toBe(true)
expect(profileMap.has('codex')).toBe(true)
expect(profileMap.has('cursor')).toBe(true)
expect(profileMap.has('dsh')).toBe(true)
expect(profileMap.has('kilo')).toBe(true)
expect(profileMap.has('pi')).toBe(true)
expect(profileMap.has('zcode')).toBe(true)
})

test('claude-code profile returns correct roots', () => {
Expand All @@ -42,6 +43,13 @@ describe('agent profiles', () => {
expect(profile.projectRoots('/repo')).toEqual(['/repo/.cursor/skills'])
})

test('zcode profile returns correct roots', () => {
const profile = profileMap.get('zcode')!
expect(profile.displayName).toBe('ZCode')
expect(profile.projectRoots('/repo')).toEqual(['/repo/.zcode/skills'])
expect(profile.userRoots('/home/user')).toEqual(['/home/user/.zcode/skills'])
})

test('DeepSeek Harness exposes and detects its project and user skills directories', async () => {
const base = await mkdtemp(join(tmpdir(), 'skillhub-dsh-profile-'))
const cwd = join(base, 'repo')
Expand Down
1 change: 1 addition & 0 deletions docs/skillhub/en/guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ Most Agents have both project-level and user-level skills directories. Use `--sc
| `opencode` | `<project>/.opencode/skills/` | `~/.opencode/skills/` |
| `kilo` | `<project>/.kilo/skills/` | `~/.kilo/skills/` |
| `pi` (Pi) | `<project>/.pi/skills/` | `~/.pi/agent/skills/` |
| `zcode` | `<project>/.zcode/skills/` | `~/.zcode/skills/` |
| _fallback_ | `<project>/.agents/skills/` | `~/.agents/skills/` |

For a custom path or an unsupported Agent directory, use `--dir` to specify the installation path. In interactive user scope, the `generic` target is offered alongside detected Agent targets. AStudio appears in that selector when `~/.acode/skills/` exists. When `--scope user|project` finds no matching agent directory, the CLI falls back to the `_fallback_` row above.
Expand Down
1 change: 1 addition & 0 deletions docs/skillhub/guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ CLI 按以下逻辑确定安装位置:
| `opencode` | `<project>/.opencode/skills/` | `~/.opencode/skills/` |
| `kilo` | `<project>/.kilo/skills/` | `~/.kilo/skills/` |
| `pi`(Pi) | `<project>/.pi/skills/` | `~/.pi/agent/skills/` |
| `zcode` | `<project>/.zcode/skills/` | `~/.zcode/skills/` |
| _fallback_ | `<project>/.agents/skills/` | `~/.agents/skills/` |

对于自定义路径或不在列表中的 Agent 目录,使用 `--dir` 显式指定安装路径。交互式 user scope 下会与已探测 Agent 目标一同提供 `generic` 目标;当 `~/.acode/skills/` 存在时,选择器会显示 AStudio。当 `--scope user|project` 找不到匹配的 agent 目录时,CLI 会回退到上表的 `_fallback_` 行。
Expand Down
Loading