跳到正文
Skillpedia
部署与云(DevOps)16k · #10870

setup

它能做什么

这个技能为 Paradev 准备代码仓库,使新工作区启动时就已完成配置。适合希望不必在每个新工作区上重复手动设置步骤的开发者。

适用场景

  • ✓当你想为 Paradev 设置项目或代码仓库时。
  • ✓当你想把旧的 config.json 转换为较新的 config.toml 时。
  • ✓当新工作区启动时缺少所需的依赖项或服务时。

技能链接

https://github.com/ParadevAI/Paradev/blob/main/plugins/superset/skills/setup/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ParadevAI/Paradev/blob/main/plugins/superset/skills/setup/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为 Paradev 设置这个代码仓库,使新工作区自动安装依赖项并启动开发服务器。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会检查代码仓库,了解它是如何安装和运行的,对任何不清楚的地方提出询问,然后编写配置文件。在认为完成之前,它会用一个真实的工作区检查结果。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Paradev Project Setup

paradev is an alias for the superset CLI: every superset command here also runs as paradev.

Goal: every new workspace for this repo, a local worktree or a cloud box, comes up ready, with dependencies installed, env present and services reachable, without manual steps.

1. Inspect the repo

Work out what a fresh workspace needs, and ask about anything ambiguous:

  • Package manager and install command (lockfiles decide: bun/pnpm/yarn/npm, cargo, uv, ...)
  • Env files: .env is usually gitignored, so a new worktree needs it copied from the main checkout or generated from .env.example
  • Services (docker-compose, databases), the dev command and its ports
  • Monorepo layout (does a step need a cwd?)
  • Where the config lives. New repos use .paradev/. A repo set up before the rename has it in .superset/, which Paradev still reads: keep editing it there (a .paradev/ folder holding only pdev's settings.json, agents/ or prompts/ does not count). Note what is already there: config.toml, or the old config.json, config.local.json and ports.json

2. Write config.toml

In the folder from step 1 (.paradev/ for a new repo; for a repo still on .superset/, read .superset/ wherever the examples below say .paradev/). Moving an existing .superset/ to .paradev/ is optional; do it only if the user asks, in one commit: move its files into .paradev/ (keep pdev's files already there; git mv .superset .paradev is only right when .paradev/ doesn't exist), and change ./.superset/ paths in the config's commands and in scripts to ./.paradev/.

If the repo still has config.json, convert it. config.json is the old format: Paradev reads config.toml first and ignores config.json when both exist. Tell the user, translate it, and delete config.json and ports.json in the same change.

config.json config.toml
setup [setup]
teardown [archive] (outside cleanup only, see below)
run [terminals.dev] with default = true
cwd cwd on each table
<key>.sh in the config folder, found by name written out in run
config.local.json with before/after config.local.toml with full run lists

The format:

[install]                     # cacheable prep, no per-workspace state
run = ["bun install"]

[setup]                       # get this workspace ready
run = ["./.paradev/setup.sh"]

[setup.cloud]                 # replaces keys of [setup] in the cloud
run = ["./.paradev/setup.cloud.sh"]

[terminals.dev]               # long-running
run = "bun dev"
default = true

[archive]                     # outside cleanup only
run = ["docker compose down"]

[ports.web]
default = 3000
label = "Web"
preview = true                # cloud: gets a preview URL

When each table runs:

Table Local Cloud
[install] before setup, at creation when the environment's image is built
[setup] once, at creation on every boot and resume, so it must be safe to run again
[terminals.<name>] from the Run button; default ones start with it default ones start on boot
[archive] before the worktree is removed at archive, before the box stops; never blocks the archive
[ports.<name>] default is the port; preview = true publishes it (at most 13)

Rules:

  • run is a string or an array of commands, each in its own shell. setup and install stop at the first failure. run = [] turns a table off.
  • [x.cloud] and [x.local] are merged key by key over [x] in that environment.
  • Names match ^[a-z][a-z0-9_]*$. Unknown keys are errors.
  • Every step gets SUPERSET_ENV (local or cloud), SUPERSET_WORKSPACE_NAME and, locally, SUPERSET_ROOT_PATH (the main checkout). Per-port variables are not set yet: do not rely on SUPERSET_PORT_<NAME>.
  • Keep setup idempotent and fast; put workspace-independent installs in [install].
  • [archive] is for outside resources (a database branch, docker compose down). Paradev already stops processes and deletes the worktree.
  • Copy secrets and .env from the main checkout ($SUPERSET_ROOT_PATH) at setup time; never commit them.
  • Personal tweaks go in config.local.toml, next to config.toml in the main checkout. It is gitignored, applies to every worktree, is merged over the shared file, and the cloud never reads it.

Show the user the proposed files and get explicit approval before writ

常见问题

它会移动我现有的配置吗?

除非你要求,否则不会。它会继续在配置所在的位置进行编辑。

环境文件怎么办?

它们通常不纳入 git,因此该技能会从主检出中复制,或根据示例文件生成。

如何检查设置?

在认为任务完成之前,它会用一个真实的新工作区验证结果。

详情

作者的原始描述

Make a repository Paradev (formerly Superset)-ready by writing .paradev/config.toml (install, setup, terminals, archive, ports) so every new workspace, local or cloud, comes up configured, converting an old config.json, then verifying with a real workspace. Use when the user wants to set up a project or repo for Paradev, configure workspace setup scripts, convert config.json to config.toml, or fix a failing workspace setup ("new workspaces don't have node_modules", "my .env is missing in workspaces", "setup script isn't running").

repo: ParadevAI/Paradev

热度

GitHub 星标
16k
排名
#10870
许可证
—
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能