skillshuttle 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_skill_manager/__init__.py +12 -0
- agent_skill_manager/__main__.py +5 -0
- agent_skill_manager/completion/__init__.py +25 -0
- agent_skill_manager/completion/_askill +112 -0
- agent_skill_manager/completion/askill.bash +105 -0
- agent_skill_manager/completion/askill.fish +94 -0
- agent_skill_manager/config/__init__.py +4 -0
- agent_skill_manager/config/products.py +238 -0
- agent_skill_manager/controllers/__init__.py +4 -0
- agent_skill_manager/controllers/cli.py +1344 -0
- agent_skill_manager/controllers/parsers/__init__.py +77 -0
- agent_skill_manager/controllers/parsers/authoring.py +109 -0
- agent_skill_manager/controllers/parsers/distribution.py +168 -0
- agent_skill_manager/controllers/parsers/operations.py +108 -0
- agent_skill_manager/models/__init__.py +11 -0
- agent_skill_manager/models/product.py +30 -0
- agent_skill_manager/models/report.py +62 -0
- agent_skill_manager/services/__init__.py +4 -0
- agent_skill_manager/services/audit.py +441 -0
- agent_skill_manager/services/auto_adopt.py +238 -0
- agent_skill_manager/services/ci_format.py +100 -0
- agent_skill_manager/services/doctor.py +305 -0
- agent_skill_manager/services/drift.py +88 -0
- agent_skill_manager/services/get.py +160 -0
- agent_skill_manager/services/inventory.py +37 -0
- agent_skill_manager/services/manifest.py +167 -0
- agent_skill_manager/services/overlap.py +112 -0
- agent_skill_manager/services/paths_export.py +204 -0
- agent_skill_manager/services/publish.py +298 -0
- agent_skill_manager/services/registry.py +124 -0
- agent_skill_manager/services/remediation.py +145 -0
- agent_skill_manager/services/scaffold.py +191 -0
- agent_skill_manager/services/sources.py +261 -0
- agent_skill_manager/services/spec.py +188 -0
- agent_skill_manager/services/sync/__init__.py +35 -0
- agent_skill_manager/services/sync/adopt.py +174 -0
- agent_skill_manager/services/sync/audit_report.py +128 -0
- agent_skill_manager/services/sync/engine.py +510 -0
- agent_skill_manager/services/sync/install.py +411 -0
- agent_skill_manager/services/sync/pack.py +43 -0
- agent_skill_manager/services/sync/settings_io.py +110 -0
- agent_skill_manager/services/upgrade.py +205 -0
- agent_skill_manager/services/watch.py +473 -0
- agent_skill_manager/services/welcome.py +49 -0
- agent_skill_manager/utils/__init__.py +4 -0
- agent_skill_manager/utils/filesystem.py +219 -0
- agent_skill_manager/utils/watcher.py +607 -0
- skillshuttle-1.0.0.dist-info/METADATA +552 -0
- skillshuttle-1.0.0.dist-info/RECORD +53 -0
- skillshuttle-1.0.0.dist-info/WHEEL +5 -0
- skillshuttle-1.0.0.dist-info/entry_points.txt +3 -0
- skillshuttle-1.0.0.dist-info/licenses/LICENSE +21 -0
- skillshuttle-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Skillshuttle - Cross-platform skill management for domestic AI agent products.
|
|
2
|
+
|
|
3
|
+
Layered package layout (mirrors MoneyPrinterTurbo's ``app/`` structure):
|
|
4
|
+
config/ product registry & platform constants
|
|
5
|
+
controllers/ user-facing CLI
|
|
6
|
+
models/ typed data shapes (TypedDicts)
|
|
7
|
+
services/ business logic (sync, audit, watch)
|
|
8
|
+
utils/ cross-platform filesystem helpers + native fs-event watchers
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
__version__ = "1.0.0"
|
|
12
|
+
__all__ = ["config", "controllers", "models", "services", "utils"]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Shell-completion scripts for askill (bundled since v0.18.1).
|
|
2
|
+
|
|
3
|
+
This subpackage bundles the bash / zsh / fish completion scripts so they
|
|
4
|
+
ship inside the PyPI wheel. ``pip`` users can locate them at the installed
|
|
5
|
+
package path::
|
|
6
|
+
|
|
7
|
+
import agent_skill_manager
|
|
8
|
+
from agent_skill_manager.completion import COMPLETION_DIR
|
|
9
|
+
|
|
10
|
+
# or, equivalently:
|
|
11
|
+
import os
|
|
12
|
+
completion_dir = os.path.join(
|
|
13
|
+
os.path.dirname(agent_skill_manager.__file__), "completion"
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
Git-clone users find the same scripts at the repo-root ``completion/`` dir.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
from pathlib import Path
|
|
22
|
+
|
|
23
|
+
COMPLETION_DIR = Path(__file__).parent
|
|
24
|
+
|
|
25
|
+
__all__ = ["COMPLETION_DIR"]
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#compdef askill
|
|
2
|
+
#
|
|
3
|
+
# Zsh completion for ``askill``.
|
|
4
|
+
#
|
|
5
|
+
# Install (one of):
|
|
6
|
+
# # system-wide, drop into the first dir in $fpath:
|
|
7
|
+
# sudo cp completion/_askill ${fpath[1]}/_askill
|
|
8
|
+
# # user-level:
|
|
9
|
+
# cp completion/_askill ~/.zsh/completions/_askill
|
|
10
|
+
# autoload -U compinit && compinit
|
|
11
|
+
#
|
|
12
|
+
# Smart-ish: subcommands + per-cmd flags are real; skill / product short
|
|
13
|
+
# names are pulled from ``askill list --quiet`` / ``askill products --json``.
|
|
14
|
+
|
|
15
|
+
local curcontext="$curcontext" state line ret=1
|
|
16
|
+
local -a _askill_global_flags _askill_subcommands
|
|
17
|
+
_askill_global_flags=(--quiet -q --json)
|
|
18
|
+
_askill_subcommands=(
|
|
19
|
+
status:'Show installation status across products'
|
|
20
|
+
sync:'Sync skill(s) to all products'
|
|
21
|
+
list:'List skills in central repository'
|
|
22
|
+
install:'Install a skill (path / GitHub URL / skills.sh shorthand)'
|
|
23
|
+
remove:'Remove a skill from all products'
|
|
24
|
+
pack:'Package a skill as .zip for DuMate'
|
|
25
|
+
adopt:'Adopt skills from one platform (or all) into the central repo'
|
|
26
|
+
audit:'Security audit of skill(s) in central repo'
|
|
27
|
+
search:'Search skills.sh; N installs that result'
|
|
28
|
+
new:'Scaffold a new skill in the central repository'
|
|
29
|
+
publish:'Publish a skill from the central repo to a git repository'
|
|
30
|
+
verify:'Check skills against the agentskills.io spec'
|
|
31
|
+
watch:'Watch central repo; auto-sync changes'
|
|
32
|
+
update:'Check/apply updates for tracked skills'
|
|
33
|
+
products:'List all supported products'
|
|
34
|
+
version:'Show version'
|
|
35
|
+
help:'Show this help message and exit'
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
_askill_refresh_dynamic() {
|
|
39
|
+
local out
|
|
40
|
+
out=$("${(q)words[1]}" list --quiet 2>/dev/null \
|
|
41
|
+
| awk '/^ / {print $1}')
|
|
42
|
+
_askill_skill_names=("${(@)out}")
|
|
43
|
+
out=$("${(q)words[1]}" products --json 2>/dev/null \
|
|
44
|
+
| python -c 'import json,sys; [print(p["short"]) for p in json.load(sys.stdin)]' 2>/dev/null)
|
|
45
|
+
_askill_product_shorts=("${(@)out}")
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
local -a _askill_skill_names _askill_product_shorts
|
|
49
|
+
|
|
50
|
+
_arguments -s \
|
|
51
|
+
$_askill_global_flags \
|
|
52
|
+
'1: :->cmd' \
|
|
53
|
+
'*:: :->args'
|
|
54
|
+
|
|
55
|
+
case $state in
|
|
56
|
+
cmd)
|
|
57
|
+
_describe -t subcommands 'askill subcommand' _askill_subcommands && ret=0
|
|
58
|
+
;;
|
|
59
|
+
args)
|
|
60
|
+
local cmd="${words[2]}"
|
|
61
|
+
case "$cmd" in
|
|
62
|
+
sync)
|
|
63
|
+
_arguments -s $_askill_global_flags \
|
|
64
|
+
'1:skill name:_askill_refresh_dynamic && print -r -- ${_askill_skill_names[@]}' \
|
|
65
|
+
'--force[Overwrite differing real dirs (conflicts)]'
|
|
66
|
+
ret=0
|
|
67
|
+
;;
|
|
68
|
+
install)
|
|
69
|
+
_arguments -s $_askill_global_flags \
|
|
70
|
+
'--sync[Also sync to all products after install]' \
|
|
71
|
+
'--audit[Print the full audit report after install]' \
|
|
72
|
+
'--no-audit[Skip the default spec + security checks]' \
|
|
73
|
+
'*:source:_files'
|
|
74
|
+
ret=0
|
|
75
|
+
;;
|
|
76
|
+
list|version|products|audit|status)
|
|
77
|
+
_arguments -s $_askill_global_flags
|
|
78
|
+
ret=0
|
|
79
|
+
;;
|
|
80
|
+
remove|pack|verify)
|
|
81
|
+
_arguments -s $_askill_global_flags \
|
|
82
|
+
'1:skill name:_askill_refresh_dynamic && print -r -- ${_askill_skill_names[@]}'
|
|
83
|
+
ret=0
|
|
84
|
+
;;
|
|
85
|
+
update)
|
|
86
|
+
_arguments -s $_askill_global_flags \
|
|
87
|
+
'--check[Only check for updates, dont apply]' \
|
|
88
|
+
'1:skill name:_askill_refresh_dynamic && print -r -- ${_askill_skill_names[@]}'
|
|
89
|
+
ret=0
|
|
90
|
+
;;
|
|
91
|
+
search)
|
|
92
|
+
_arguments -s $_askill_global_flags \
|
|
93
|
+
'--install[Install the Nth result]:result number:' \
|
|
94
|
+
'*:query:'
|
|
95
|
+
ret=0
|
|
96
|
+
;;
|
|
97
|
+
watch)
|
|
98
|
+
_arguments -s $_askill_global_flags \
|
|
99
|
+
'--interval[Poll/fallback seconds]:seconds:'
|
|
100
|
+
ret=0
|
|
101
|
+
;;
|
|
102
|
+
adopt)
|
|
103
|
+
_arguments -s $_askill_global_flags \
|
|
104
|
+
'1:platform short:(all $_askill_product_shorts)' \
|
|
105
|
+
'2:skill name:_askill_refresh_dynamic && print -r -- ${_askill_skill_names[@]}'
|
|
106
|
+
ret=0
|
|
107
|
+
;;
|
|
108
|
+
esac
|
|
109
|
+
;;
|
|
110
|
+
esac
|
|
111
|
+
|
|
112
|
+
return ret
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Bash completion for ``askill``.
|
|
2
|
+
#
|
|
3
|
+
# Install:
|
|
4
|
+
# source /path/to/completion/askill.bash
|
|
5
|
+
# (or drop into ~/.bash_completion.d/askill)
|
|
6
|
+
#
|
|
7
|
+
# Smart-ish completion: the subcommand list is hard-coded (argparse's
|
|
8
|
+
# subparsers don't introspect cleanly at runtime), but every per-subcommand
|
|
9
|
+
# flag is real - so ``askill sync --<TAB>`` only suggests ``--force``,
|
|
10
|
+
# ``askill install --<TAB>`` only suggests ``--sync --audit --no-audit``,
|
|
11
|
+
# and so on. Skill / product names are pulled from the live CLI.
|
|
12
|
+
|
|
13
|
+
_askill_global_flags="--quiet -q --json"
|
|
14
|
+
_askill_subcommands="status sync list install new publish remove pack adopt audit search verify watch update products version help"
|
|
15
|
+
|
|
16
|
+
# Pull the live list of installed skill names and product short names from the
|
|
17
|
+
# CLI itself - this is the zero-dep equivalent of argcomplete's lazy
|
|
18
|
+
# introspection. Cached for the lifetime of one shell session.
|
|
19
|
+
_askill_skill_names=""
|
|
20
|
+
_askill_product_shorts=""
|
|
21
|
+
|
|
22
|
+
_askill_refresh_dynamic() {
|
|
23
|
+
_askill_skill_names="$("$(command -v askill || echo true)" list --quiet 2>/dev/null \
|
|
24
|
+
| awk '/^ / {print $1}' | tr '\n' ' ')"
|
|
25
|
+
_askill_product_shorts="$("$(command -v askill || echo true)" products --json 2>/dev/null \
|
|
26
|
+
| python -c 'import json,sys; [print(p["short"]) for p in json.load(sys.stdin)]' 2>/dev/null \
|
|
27
|
+
| tr '\n' ' ')"
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
_askill_complete() {
|
|
31
|
+
local cur prev words cword
|
|
32
|
+
if declare -F _init_completion >/dev/null 2>&1; then
|
|
33
|
+
_init_completion || return
|
|
34
|
+
else
|
|
35
|
+
# Bash <4.2 fallback
|
|
36
|
+
COMPREPLY=()
|
|
37
|
+
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
38
|
+
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
39
|
+
words=("${COMP_WORDS[@]}")
|
|
40
|
+
cword=$COMP_CWORD
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
local cmd=""
|
|
44
|
+
if [[ $cword -ge 2 ]]; then
|
|
45
|
+
cmd="${words[1]}"
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# Global flag completion at any depth.
|
|
49
|
+
if [[ $cur == --* || $cur == -* ]]; then
|
|
50
|
+
local flags="$_askill_global_flags"
|
|
51
|
+
case "$cmd" in
|
|
52
|
+
sync) flags="$flags --force" ;;
|
|
53
|
+
install) flags="$flags --sync --audit --no-audit" ;;
|
|
54
|
+
watch) flags="$flags --interval" ;;
|
|
55
|
+
update) flags="$flags --check" ;;
|
|
56
|
+
search) flags="$flags --install" ;;
|
|
57
|
+
esac
|
|
58
|
+
COMPREPLY=( $(compgen -W "$flags" -- "$cur") )
|
|
59
|
+
return 0
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
if [[ $cword -eq 1 ]]; then
|
|
63
|
+
COMPREPLY=( $(compgen -W "$_askill_subcommands" -- "$cur") )
|
|
64
|
+
return 0
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
# Positional completion per command.
|
|
68
|
+
case "$cmd" in
|
|
69
|
+
status|remove|pack|verify|update)
|
|
70
|
+
if [[ $cword -eq 2 ]]; then
|
|
71
|
+
[[ -z $_askill_skill_names ]] && _askill_refresh_dynamic
|
|
72
|
+
COMPREPLY=( $(compgen -W "$_askill_skill_names" -- "$cur") )
|
|
73
|
+
return 0
|
|
74
|
+
fi
|
|
75
|
+
;;
|
|
76
|
+
adopt)
|
|
77
|
+
if [[ $cword -eq 2 ]]; then
|
|
78
|
+
[[ -z $_askill_product_shorts ]] && _askill_refresh_dynamic
|
|
79
|
+
COMPREPLY=( $(compgen -W "all $_askill_product_shorts" -- "$cur") )
|
|
80
|
+
return 0
|
|
81
|
+
fi
|
|
82
|
+
if [[ $cword -eq 3 ]]; then
|
|
83
|
+
[[ -z $_askill_skill_names ]] && _askill_refresh_dynamic
|
|
84
|
+
COMPREPLY=( $(compgen -W "$_askill_skill_names" -- "$cur") )
|
|
85
|
+
return 0
|
|
86
|
+
fi
|
|
87
|
+
;;
|
|
88
|
+
install)
|
|
89
|
+
if [[ $cword -ge 2 && "$prev" != "--install" ]]; then
|
|
90
|
+
# Local paths + shorthand - can't reasonably enumerate.
|
|
91
|
+
COMPREPLY=()
|
|
92
|
+
return 0
|
|
93
|
+
fi
|
|
94
|
+
;;
|
|
95
|
+
search)
|
|
96
|
+
# Query words; no completion list.
|
|
97
|
+
COMPREPLY=()
|
|
98
|
+
return 0
|
|
99
|
+
;;
|
|
100
|
+
esac
|
|
101
|
+
|
|
102
|
+
COMPREPLY=()
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
complete -F _askill_complete askill
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Fish completion for ``askill``.
|
|
2
|
+
#
|
|
3
|
+
# Install:
|
|
4
|
+
# cp completion/askill.fish ~/.config/fish/completions/
|
|
5
|
+
#
|
|
6
|
+
# Smart-ish: subcommands + per-cmd flags are real; skill / product short
|
|
7
|
+
# names are pulled live from the CLI at completion time.
|
|
8
|
+
|
|
9
|
+
function __askill_skill_names
|
|
10
|
+
command -v askill >/dev/null 2>&1 || return
|
|
11
|
+
askill list --quiet 2>/dev/null | string match -rg '^ (\S+)'
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
function __askill_product_shorts
|
|
15
|
+
command -v askill >/dev/null 2>&1 || return
|
|
16
|
+
askill products --json 2>/dev/null | python -c 'import json,sys; [print(p["short"]) for p in json.load(sys.stdin)]' 2>/dev/null
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
function __askill_global_flags
|
|
20
|
+
echo --quiet -q --json
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Top-level subcommand dispatch.
|
|
24
|
+
function __askill_needs_command
|
|
25
|
+
set -l cmd (commandline -opc)
|
|
26
|
+
[ (count $cmd) -eq 1 ]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
function __askill_using_command
|
|
30
|
+
set -l cmd (commandline -opc)
|
|
31
|
+
[ (count $cmd) -ge 2 ]
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# --- subcommands ---------------------------------------------------------
|
|
35
|
+
|
|
36
|
+
set -l subcmds \
|
|
37
|
+
status 'Show installation status across products' \
|
|
38
|
+
sync 'Sync skill(s) to all products' \
|
|
39
|
+
list 'List skills in central repository' \
|
|
40
|
+
install 'Install a skill (path / GitHub URL / skills.sh shorthand)' \
|
|
41
|
+
remove 'Remove a skill from all products' \
|
|
42
|
+
pack 'Package a skill as .zip for DuMate' \
|
|
43
|
+
adopt 'Adopt skills from one platform (or all) into the central repo' \
|
|
44
|
+
audit 'Security audit of skill(s) in central repo' \
|
|
45
|
+
search 'Search skills.sh; N installs that result' \
|
|
46
|
+
new 'Scaffold a new skill in the central repository' \n publish 'Publish a skill from the central repo to a git repository' \n verify 'Check skills against the agentskills.io spec' \
|
|
47
|
+
watch 'Watch central repo; auto-sync changes' \
|
|
48
|
+
update 'Check/apply updates for tracked skills' \
|
|
49
|
+
products 'List all supported products' \
|
|
50
|
+
version 'Show version'
|
|
51
|
+
|
|
52
|
+
complete -c askill -n '__askill_needs_command' -a "$subcmds" -f
|
|
53
|
+
|
|
54
|
+
# --- global flags ---------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
complete -c askill -l quiet -s q -d 'Suppress non-essential output'
|
|
57
|
+
complete -c askill -l json -d 'Emit machine-readable JSON'
|
|
58
|
+
|
|
59
|
+
# --- per-command flags + positionals ------------------------------------
|
|
60
|
+
|
|
61
|
+
complete -c askill -n '__askill_using_command && test (commandline -opc)[2] = sync' \
|
|
62
|
+
-l force -d 'Overwrite differing real dirs (conflicts)'
|
|
63
|
+
|
|
64
|
+
complete -c askill -n '__askill_using_command && test (commandline -opc)[2] = install' \
|
|
65
|
+
-l sync -d 'Also sync to all products after install'
|
|
66
|
+
complete -c askill -n '__askill_using_command && test (commandline -opc)[2] = install' \
|
|
67
|
+
-l audit -d 'Print the full audit report after install'
|
|
68
|
+
complete -c askill -n '__askill_using_command && test (commandline -opc)[2] = install' \
|
|
69
|
+
-l no-audit -d 'Skip the default spec + security checks'
|
|
70
|
+
|
|
71
|
+
complete -c askill -n '__askill_using_command && test (commandline -opc)[2] = watch' \
|
|
72
|
+
-l interval -d 'Poll/fallback seconds'
|
|
73
|
+
|
|
74
|
+
complete -c askill -n '__askill_using_command && test (commandline -opc)[2] = update' \
|
|
75
|
+
-l check -d 'Only check for updates, don'\''t apply'
|
|
76
|
+
|
|
77
|
+
complete -c askill -n '__askill_using_command && test (commandline -opc)[2] = search' \
|
|
78
|
+
-l install -d 'Install the Nth result'
|
|
79
|
+
|
|
80
|
+
# Skill-name positionals (single arg).
|
|
81
|
+
for cmd in status remove pack verify update
|
|
82
|
+
complete -c askill -n "__askill_using_command && test (commandline -opc)[2] = $cmd" \
|
|
83
|
+
-a "(__askill_skill_names)" -f
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# adopt: first positional = platform, second = skill.
|
|
87
|
+
complete -c askill -n '__askill_using_command && test (commandline -opc)[2] = adopt && test (count (commandline -opc)) -eq 3' \
|
|
88
|
+
-a "all (__askill_product_shorts)"
|
|
89
|
+
complete -c askill -n '__askill_using_command && test (commandline -opc)[2] = adopt && test (count (commandline -opc)) -ge 4' \
|
|
90
|
+
-a "(__askill_skill_names)" -f
|
|
91
|
+
|
|
92
|
+
# install: paths (no enumeration, fish handles ``file`` style).
|
|
93
|
+
complete -c askill -n '__askill_using_command && test (commandline -opc)[2] = install' \
|
|
94
|
+
-F
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"""Product definitions for supported AI agent platforms."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
import platform
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
from typing import cast
|
|
9
|
+
|
|
10
|
+
from ..models.product import ProductSpec
|
|
11
|
+
|
|
12
|
+
HOME = Path.home()
|
|
13
|
+
LOCALAPPDATA = Path(os.environ.get("LOCALAPPDATA", HOME / "AppData" / "Local"))
|
|
14
|
+
IS_WINDOWS = platform.system() == "Windows"
|
|
15
|
+
IS_MACOS = platform.system() == "Darwin"
|
|
16
|
+
IS_LINUX = platform.system() == "Linux"
|
|
17
|
+
|
|
18
|
+
# Central repository - the authoritative source for all skills
|
|
19
|
+
CENTRAL_DIR = HOME / ".agents" / "skills"
|
|
20
|
+
|
|
21
|
+
# Linux support: only products that actually ship a Linux build (or a
|
|
22
|
+
# platform-independent CLI convention) carry a ``linux_path``. Desktop/IDE
|
|
23
|
+
# apps without a Linux build use ``None`` so askill skips them cleanly
|
|
24
|
+
# instead of creating dead directories - add the path (with evidence) when
|
|
25
|
+
# a build ships.
|
|
26
|
+
|
|
27
|
+
PRODUCTS: list[ProductSpec] = [
|
|
28
|
+
{
|
|
29
|
+
"name": "AutoClaw2",
|
|
30
|
+
"short": "autoclaw2",
|
|
31
|
+
"macos_path": HOME / ".openclaw-autoclaw" / "skills",
|
|
32
|
+
"windows_path": HOME / ".openclaw-autoclaw" / "skills",
|
|
33
|
+
"linux_path": HOME / ".openclaw-autoclaw" / "skills",
|
|
34
|
+
"sync_method": "symlink",
|
|
35
|
+
"note": "AutoClaw2 (Zhipu) profile root is ~/.openclaw-autoclaw/; it also scans ~/.agents/skills/ natively. Legacy v1 used ~/.openclaw/skills/",
|
|
36
|
+
"extra_dirs_macos": [],
|
|
37
|
+
"extra_dirs_windows": [],
|
|
38
|
+
"extra_dirs_linux": [],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "Kimi Code CLI (Moonshot)",
|
|
42
|
+
"short": "kimi",
|
|
43
|
+
"macos_path": HOME / ".config" / "agents" / "skills",
|
|
44
|
+
"windows_path": HOME / ".config" / "agents" / "skills",
|
|
45
|
+
"linux_path": HOME / ".config" / "agents" / "skills",
|
|
46
|
+
"sync_method": "symlink",
|
|
47
|
+
"note": "Kimi also scans ~/.kimi-code/skills/",
|
|
48
|
+
"extra_dirs_macos": [HOME / ".kimi-code" / "skills"],
|
|
49
|
+
"extra_dirs_windows": [HOME / ".kimi-code" / "skills"],
|
|
50
|
+
"extra_dirs_linux": [HOME / ".kimi-code" / "skills"],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "MiniMax Code",
|
|
54
|
+
"short": "minimax",
|
|
55
|
+
"macos_path": HOME / ".agents" / "skills",
|
|
56
|
+
"windows_path": HOME / ".agents" / "skills",
|
|
57
|
+
"linux_path": HOME / ".agents" / "skills",
|
|
58
|
+
"sync_method": "native",
|
|
59
|
+
"note": "MiniMax Code natively scans ~/.agents/skills/, no sync needed",
|
|
60
|
+
"extra_dirs_macos": [],
|
|
61
|
+
"extra_dirs_windows": [],
|
|
62
|
+
"extra_dirs_linux": [],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "WorkBuddy",
|
|
66
|
+
"short": "workbuddy",
|
|
67
|
+
"macos_path": HOME / ".workbuddy" / "skills",
|
|
68
|
+
"windows_path": HOME / ".workbuddy" / "skills",
|
|
69
|
+
"linux_path": None,
|
|
70
|
+
"sync_method": "symlink",
|
|
71
|
+
"note": "Enable skill in settings.json. Desktop app: macOS & Windows builds only, no Linux path yet",
|
|
72
|
+
"extra_dirs_macos": [],
|
|
73
|
+
"extra_dirs_windows": [],
|
|
74
|
+
"extra_dirs_linux": [],
|
|
75
|
+
"settings_file": HOME / ".workbuddy" / "settings.json",
|
|
76
|
+
"settings_mode": "skills-switch",
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "Trae",
|
|
80
|
+
"short": "trae",
|
|
81
|
+
"macos_path": HOME / ".trae" / "skills",
|
|
82
|
+
"windows_path": HOME / ".trae" / "skills",
|
|
83
|
+
"linux_path": None,
|
|
84
|
+
"sync_method": "symlink",
|
|
85
|
+
"note": "Trae also supports project-level .trae/skills/ and .agents/skills/. No Linux build yet",
|
|
86
|
+
"extra_dirs_macos": [],
|
|
87
|
+
"extra_dirs_windows": [],
|
|
88
|
+
"extra_dirs_linux": [],
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "Trae CN",
|
|
92
|
+
"short": "traecn",
|
|
93
|
+
"macos_path": HOME / ".trae-cn" / "skills",
|
|
94
|
+
"windows_path": HOME / ".trae-cn" / "skills",
|
|
95
|
+
"linux_path": None,
|
|
96
|
+
"sync_method": "symlink",
|
|
97
|
+
"note": "Trae CN (ByteDance CN edition) uses ~/.trae-cn/; international Trae uses ~/.trae/ (see trae entry). TRAE SOLO merged into the unified Agent (2026-10 changelog) - this directory serves both IDE and SOLO modes. No Linux build yet",
|
|
98
|
+
"extra_dirs_macos": [],
|
|
99
|
+
"extra_dirs_windows": [],
|
|
100
|
+
"extra_dirs_linux": [],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "DuMate (Baidu)",
|
|
104
|
+
"short": "dumate",
|
|
105
|
+
"macos_path": None,
|
|
106
|
+
"windows_path": None,
|
|
107
|
+
"linux_path": None,
|
|
108
|
+
"sync_method": "pack",
|
|
109
|
+
"note": "DuMate manages skills via App; use pack command to generate .zip (works on all platforms)",
|
|
110
|
+
"extra_dirs_macos": [],
|
|
111
|
+
"extra_dirs_windows": [],
|
|
112
|
+
"extra_dirs_linux": [],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "CodeBuddy (Tencent)",
|
|
116
|
+
"short": "codebuddy",
|
|
117
|
+
"macos_path": HOME / ".codebuddy" / "skills",
|
|
118
|
+
"windows_path": HOME / ".codebuddy" / "skills",
|
|
119
|
+
"linux_path": HOME / ".codebuddy" / "skills",
|
|
120
|
+
"sync_method": "symlink",
|
|
121
|
+
"note": "CodeBuddy CLI also scans ~/.agents/skills/; settings in ~/.codebuddy/settings.json",
|
|
122
|
+
"extra_dirs_macos": [],
|
|
123
|
+
"extra_dirs_windows": [],
|
|
124
|
+
"extra_dirs_linux": [],
|
|
125
|
+
"settings_file": HOME / ".codebuddy" / "settings.json",
|
|
126
|
+
"settings_mode": "skills-switch",
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "Comate / Wenxin Kuaima (Baidu)",
|
|
130
|
+
"short": "comate",
|
|
131
|
+
"macos_path": HOME / ".comate" / "skills",
|
|
132
|
+
"windows_path": HOME / ".comate" / "skills",
|
|
133
|
+
"linux_path": HOME / ".comate" / "skills",
|
|
134
|
+
"sync_method": "symlink",
|
|
135
|
+
"note": "Comate auto-loads skills from ~/.comate/skills/ on startup; 2026-09: organizationally merged into Baidu's DuMate unified agent matrix (client/CLI forms unchanged)",
|
|
136
|
+
"extra_dirs_macos": [],
|
|
137
|
+
"extra_dirs_windows": [],
|
|
138
|
+
"extra_dirs_linux": [],
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"name": "Qoder CN",
|
|
142
|
+
"short": "qodercn",
|
|
143
|
+
"macos_path": HOME / ".qoder-cn" / "skills",
|
|
144
|
+
"windows_path": HOME / ".qoder-cn" / "skills",
|
|
145
|
+
"linux_path": None,
|
|
146
|
+
"sync_method": "symlink",
|
|
147
|
+
"note": "Qoder CN stores skills in ~/.qoder-cn/skills/ (legacy QoderWork path was ~/.qoderwork/skills/); the IDE form shares this directory - the registry keeps a single row. No Linux build yet",
|
|
148
|
+
"extra_dirs_macos": [],
|
|
149
|
+
"extra_dirs_windows": [],
|
|
150
|
+
"extra_dirs_linux": [],
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "QwenWork / 千问办公 (Alibaba)",
|
|
154
|
+
"short": "qwenwork",
|
|
155
|
+
"macos_path": HOME / ".qwenworkcn" / "skills",
|
|
156
|
+
"windows_path": HOME / ".qwenworkcn" / "skills",
|
|
157
|
+
"linux_path": None,
|
|
158
|
+
"sync_method": "symlink",
|
|
159
|
+
"note": "QwenWork desktop scans ~/.qwenworkcn/skills/; frontmatter needs name+version+description+description_zh. Desktop app: no Linux build yet",
|
|
160
|
+
"extra_dirs_macos": [],
|
|
161
|
+
"extra_dirs_windows": [],
|
|
162
|
+
"extra_dirs_linux": [],
|
|
163
|
+
"required_frontmatter": ["name", "version", "description", "description_zh"],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "Qwen Code (Alibaba)",
|
|
167
|
+
"short": "qwencode",
|
|
168
|
+
"macos_path": HOME / ".qwen" / "skills",
|
|
169
|
+
"windows_path": HOME / ".qwen" / "skills",
|
|
170
|
+
"linux_path": HOME / ".qwen" / "skills",
|
|
171
|
+
"sync_method": "symlink",
|
|
172
|
+
"note": "Qwen Code (open-source CLI, npm @qwen-code/qwen-code) also scans ~/.agents/skills/ natively; do not confuse with QwenWork (千问办公)",
|
|
173
|
+
"extra_dirs_macos": [],
|
|
174
|
+
"extra_dirs_windows": [],
|
|
175
|
+
"extra_dirs_linux": [],
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "DoubaoWork (ByteDance)",
|
|
179
|
+
"short": "doubaowork",
|
|
180
|
+
"macos_path": HOME / ".super_doubao" / "super-doubao-runtime" / "workspace" / ".user_skills",
|
|
181
|
+
"windows_path": LOCALAPPDATA / "DoubaoWork" / "User Data" / "Default" / ".doubaowork" / "agent_mode" / "workspace" / ".user_skills",
|
|
182
|
+
"linux_path": None,
|
|
183
|
+
"sync_method": "symlink",
|
|
184
|
+
"note": "DoubaoWork user skills live in workspace/.user_skills; system skills in workspace/.skills. Desktop app: no Linux build yet",
|
|
185
|
+
"extra_dirs_macos": [],
|
|
186
|
+
"extra_dirs_windows": [],
|
|
187
|
+
"extra_dirs_linux": [],
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "ZCode",
|
|
191
|
+
"short": "zcode",
|
|
192
|
+
"macos_path": HOME / ".zcode" / "skills",
|
|
193
|
+
"windows_path": HOME / ".zcode" / "skills",
|
|
194
|
+
"linux_path": HOME / ".zcode" / "skills",
|
|
195
|
+
"sync_method": "symlink",
|
|
196
|
+
"note": "ZCode also scans ~/.agents/skills/ natively",
|
|
197
|
+
"extra_dirs_macos": [],
|
|
198
|
+
"extra_dirs_windows": [],
|
|
199
|
+
"extra_dirs_linux": [],
|
|
200
|
+
},
|
|
201
|
+
]
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
def _platform_key() -> str:
|
|
205
|
+
"""Return the product-field platform key for the current OS."""
|
|
206
|
+
if IS_WINDOWS:
|
|
207
|
+
return "windows"
|
|
208
|
+
if IS_MACOS:
|
|
209
|
+
return "macos"
|
|
210
|
+
# Linux and any other Unix: use the Linux paths
|
|
211
|
+
return "linux"
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
def get_product_path(product: ProductSpec) -> Path | None:
|
|
215
|
+
"""Get the primary skill directory for a product on the current platform."""
|
|
216
|
+
# TypedDict is total=False, so ``product.get(...)`` widens to ``object``
|
|
217
|
+
# even though the runtime value is always ``Path | None``; the cast
|
|
218
|
+
# restores the type contract without widening the TypedDict schema.
|
|
219
|
+
return cast("Path | None", product.get(f"{_platform_key()}_path"))
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def get_all_product_dirs(product: ProductSpec) -> list[Path]:
|
|
223
|
+
"""Get all skill directories for a product on the current platform."""
|
|
224
|
+
key = _platform_key()
|
|
225
|
+
primary = product.get(f"{key}_path")
|
|
226
|
+
dirs: list[Path] = []
|
|
227
|
+
if primary:
|
|
228
|
+
dirs.append(cast(Path, primary))
|
|
229
|
+
dirs.extend(cast("list[Path]", product.get(f"extra_dirs_{key}", [])))
|
|
230
|
+
return dirs
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
def get_product_by_short(name: str) -> ProductSpec | None:
|
|
234
|
+
"""Find a product by its short name."""
|
|
235
|
+
for p in PRODUCTS:
|
|
236
|
+
if p["short"] == name:
|
|
237
|
+
return p
|
|
238
|
+
return None
|