装上就用 Astryx 写前端:内置 Astryx 技能(build → template → component 工作流与属性命名约定),让 agent 以 Astryx 专家的方式开发;开工前体检项目就绪度(React 19、core、主题、CLI、AGENTS 指南块、技能),并守望新版本与 CLI/MCP/技能接线。只读。其 HTTP 路由未做 DSH 权限校验,浏览器中打开的任意网页都可能直接调用。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-astryx
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:chrischjh/dsh-astryx
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Enabling this plugin is enough for an agent to build UI with Astryx as a developer who knows the system: it ships the Astryx skill, states the expert posture in the prompt, and adds three read-only reports so nothing is guessed.
What the Astryx skill carries — and therefore what the agent gets:
- the workflow:
astryx build "<idea>"names a template →astryx template <name> <path>scaffolds it →astryx component <Name>prints props; - the naming rules agents get wrong: text goes in
label(Text/Heading/Link take children), booleans start withis/has, inputs takevalue/onChange; - the shipping rules: no hardcoded
#hex/px, no@apply, no raw<div>/<span>where a component exists, and re-read the files before delivering.
The plugin is the harness side of that: it makes the knowledge present, points the agent at the CLI for version-matched truth, and checks the wiring.
The skill, and whence it comes
skills/astryx/SKILL.md is vendored byte-identical from the Astryx CLI's computer-level skill (astryx init --user) and pinned by skills.lock.json. At activation:
- if DSH already loads an Astryx skill (the CLI keeps one in
~/.agents/skillsor$DSH_HOME/skills), that copy wins and this bundle registers nothing — no duplicates, and the CLI stays the source of truth; - otherwise the bundled copy is registered on
ctx.skills, so the plugin alone is sufficient.
Refresh after an Astryx release: node scripts/sync-skill.mjs (copy + re-pin); node scripts/sync-skill.mjs --verify fails on drift.
Tools (read-only)
| Tool | Answers |
|---|---|
astryx_setup |
Can this project build UI with Astryx right now? React 19, @astryxdesign/core, a theme package, the CLI, the ASTRYX agent-docs block, and the loaded skill — each with the exact command that fixes a gap |
astryx_status |
Installed vs newest @astryxdesign/core/cli, canary channel, and whether the newest release is still inside this plugin's support range (compatible, compatible-untested, plugin-update-required, astryx-too-old, capability-incompatible, unknown) |
astryx_selfcheck |
The dsh-astryx row in the applied patch layers, the CLI surface against compat.json, an Astryx MCP initialize→tools/list handshake, and whether the Astryx skill sits in a directory DSH loads (effective, project-only, invalid, missing) |
Failure codes: plugin-row-missing, plugin-row-disabled, mcp-unreachable, skill-invalid, contract-drift.
Detail page
The plugin's detail page gets one extra section with three cards — 开发就绪 / 版本与兼容 / 接线自检 — each with a "立即检查" button. They POST to same-origin routes (/dsh-astryx/setup, /status, /selfcheck): POST-only, JSON-only, Origin must equal Host, bounded body, 60 s deadline, and nothing is written. Headless profiles never mount the web server and simply omit this half.
Install
plugin_manager install_bundle → /Users/chrischen/projects/dsh-astryx (linked checkout)
plugin_manager install_bundle → graphics:npm dsh-astryx (from npm)
plugin_manager install_bundle → github:chrischjh/dsh-astryx (from source)
One row, dsh-astryx. Config: ttlHours (6), checkOnStart (true), registry, projectPath.
What it deliberately does not do
- It does not ship Astryx's ~120 pages of docs. Those live in the CLI and the installed package (
astryx docs <topic>,node_modules/@astryxdesign/core/docs/), which are version-matched; a vendored copy would drift. - It does not declare an Astryx MCP row.
astryx mcpexists and its own docs call MCP the path for agents that cannot run commands; DSH agents run the CLI directly.astryx_selfcheckstill probes a configured row. - It does not install packages, run
astryx init, or editAGENTS.md. Every fix it suggests is printed, not performed.
Cross-platform
The Host runs inside Electron, where process.execPath is the app binary and PATH is the short one a GUI launch inherits. The CLI is therefore resolved by layout (src/npmPrefixes.js): npm_config_prefix, PNPM_HOME, ~/.npmrc, %APPDATA%\npm, %LOCALAPPDATA%\npm, /usr/local, /opt/homebrew/lib/nodejs, ~/.nvm, ~/.asdf, ~/.volta, ~/Library/pnpm, and versioned Node installs one level down. Spawning goes through src/spawn.js: node <entry.mjs> everywhere, and a .cmd/.bat shim only through a shell with pre-quoted arguments. Text parsers normalise CRLF. CI runs ubuntu × macos × windows at Node 22 and 24
Layout
index.js activation: skill, prompt, tools, routes, warm check
client.js detail-page section (three cards)
skills/astryx/ vendored Astryx skill + skills.lock.json
src/skillInstall.js skill load, DSH addendum, duplicate suppression
src/setup.js project readiness
src/compat.js release verdict
src/selfcheck.js wiring self-check
src/route.js same-origin read-only routes
src/tools.js the three tool contracts
src/npmPrefixes.js PATH-independent npm global discovery
src/spawn.js cross-platform spawn planning
src/patchScan.js applied patch layers (bundles → profile → home)
src/skills.js skill presence/visibility
src/mcpProbe.js one-shot MCP handshake
src/project.js project + installed versions + CLI manifest probe
src/registry.js npm dist-tags
src/status.js status assembly
src/cache.js ttl cache under $DSH_HOME/cache/dsh-astryx
src/semver.js comparators for the support range
Tests: node --test (97 cases, no network).
Publishing
Published: dsh-astryx on npm. Catalog entry: market/chrischjh__dsh-astryx.yml, copied verbatim into awesome-dsh-plugin as data/plugins/chrischjh__dsh-astryx.yml once the repo is a day old.
链接
同类插件
yjh051108/dsh-routing-suite★ 7028
一个仓库三件套:DSH 插件包的运行时注入器(注入、热重载、卸载、开发侧挂区一键转正、路由自愈,外带设置页插件管理:列出、卸载、拖入文件夹内化)、任务感知的思维模式路由 agent 预设(router-standard / router-spec / router-react)、以及分级两级任务协议(commit_star / lock_stage / revise_do / edit_plan / mark_task / redteam_verdict 六个工具,任务状态落盘)。注入器实现直接在库内,安装的是它自己的行为而不是一份依赖清单。
strukto-ai/mirage#dsh★ 3954
把文件系统与 bash 提供者换成 mirage 虚拟工作区:文件工具与 shell 命令作用于挂载的资源(RAM、S3、Redis、Slack、Gmail、Notion、Postgres)而非宿主磁盘,支持按挂载点设置读/写/执行模式、按命令选择沙箱(进程内 monty、pyodide、quickjs;远程 docker、e2b、daytona),并可在虚拟终端中安装 CLI(git、gh、slack、linear、ntn、gws,或自行注册的程序树)作为命令头词。
first-fluke/oh-my-agent#dsh★ 1496
在工具执行前后以及尝试结束当前轮次时运行项目 OMA 检查。随插件安装 OMA CLI 依赖,并在首次使用时初始化未配置的项目。需要 Node.js 22+;首次初始化需要网络连接和项目目录写入权限。
MichengAI/dsh-skills-manager★ 641
在设置里管理本地 DSH 技能,并只读查看公共 Agent 技能。
hust-open-atom-club/oh-dsh★ 326
社区发行版:TUI、桌面端与 Web UI 统一体验,分层安装、一步到位。
Fishquito7/dsh-skill-mcp-panel★ 292
在 DSH Web 设置中管理技能与 MCP 服务器:技能卡片热启停、工作区作用域、分组、批量迁移与拖拽导入,以及 stdio/HTTP MCP 增删改查、连接测试、密钥脱敏,并附带统一 dsh-panel 命令行。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。