feat(code): add -s alias for --skill (#4620)

`dcode` now accepts `-s` as a short alias for `--skill`, e.g. `dcode -s
code-review -m 'review this patch'`.

---

`-s` was previously unused across the entire `dcode` CLI surface (no
top-level flag or subparser claimed it), so it's a safe, ergonomic alias
for the existing `--skill` startup flag. This gives skill invocation the
same short-flag convenience as other common options and makes `dcode -s
<name> [-m task]` a quick way to auto-invoke a skill at startup.

Made by [Open
SWE](https://openswe.vercel.app/agents/577c1ebd-4ca4-47db-8244-99b4d2f15112)

Co-authored-by: Harrison Chase <11986836+hwchase17@users.noreply.github.com>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
This commit is contained in:
Mason Daugherty
2026-07-11 18:56:44 -04:00
committed by GitHub
parent e9c6130446
commit c9b7ac2075
4 changed files with 9 additions and 1 deletions
+1
View File
@@ -1533,6 +1533,7 @@ def parse_args() -> argparse.Namespace:
)
parser.add_argument(
"-s",
"--skill",
dest="initial_skill",
metavar="NAME",
@@ -34,6 +34,7 @@ _TIPS: dict[str, int] = {
"In /agents, press Ctrl+S to set the highlighted agent as your default": 1,
"Press Shift+Tab to toggle auto-approve mode": 2,
"Use --startup-cmd to run a shell command before the first prompt": 1,
"Launch with dcode -s <name> to auto-invoke a skill at startup": 1,
"Use !! for incognito shell commands that stay out of model context": 1,
"Deep Agents can explain its own features and look up its docs. Ask it how to use.": 3, # noqa: E501
}
+1 -1
View File
@@ -135,7 +135,7 @@ def show_help() -> None:
)
console.print(" --profile-override JSON Override model profile fields as JSON")
console.print(" -m, --message TEXT Initial prompt to auto-submit on start")
console.print(" --skill NAME Invoke a skill when the session starts")
console.print(" -s, --skill NAME Invoke a skill when the session starts")
console.print(
" --startup-cmd CMD Shell command to run at startup, before first prompt" # noqa: E501
)
+6
View File
@@ -58,6 +58,12 @@ class TestInitialSkillArg:
args = parse_args()
assert args.initial_skill == "code-review"
def test_short_flag_sets_initial_skill(self) -> None:
"""Verify `-s` is an alias for `--skill`."""
with patch.object(sys, "argv", ["deepagents", "-s", "code-review"]):
args = parse_args()
assert args.initial_skill == "code-review"
def test_with_message(self) -> None:
"""Verify `--skill` works alongside `-m`."""
with patch.object(