create
Instantiate the rust-axum-template into a new project
- License 许可
- MIT
- 最近更新
- 2026-05-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- create
- description
- Instantiate the rust-axum-template into a new project
- allowed-tools
- Bash, AskUserQuestion, Read
03 SKILL.md 正文
Create a new project from the rust-axum-template
Arguments
Parse $ARGUMENTS for the following values. Arguments may be passed positionally
(/create my-app github.com acme) or as key=value pairs
(/create app=my-app git_username=acme). Skip prompts for any value already provided.
- APP (1st positional or
app=): Project name (alphanumeric and hyphens only) - GIT_FORGE (2nd positional or
git_forge=): Git forge domain (default:github.com) - GIT_USERNAME (3rd positional or
git_username=): Git forge username or org name - DEPS_TARGET (
deps_target=): Dependency install target (default:bin-deps)
Only ask about template repo and branch if the user mentioned them:
- TEMPLATE_REPO:
https://github.com/EnigmaCurry/rust-axum-template.git - TEMPLATE_BRANCH:
master
Instructions
-
Check for nix-shell. If
nix-shellis on$PATH, all bash commands in the steps below MUST be run insidenix-shell. Usenix-shell --run "<command>"for each bash invocation. The repo'sshell.nixprovides all required build tools (cargo, node, pnpm, just, pkg-config, openssl, etc.) and configures environment variables automatically. Do NOT install packages individually vianix profile install. -
For any required value not provided via arguments, ask the user with AskUserQuestion:
- For APP: offer a default based on the current directory name as the first option, with a second descriptive option like "Enter a custom name" (select Other to type one)
- For GIT_FORGE: offer
github.com(Recommended) andcodeberg.orgas options - For GIT_USERNAME: offer the username parsed from
git remote get-url originas default, with "Enter a different username" as the second option
-
Ask whether to:
- a) Transform the current repository in-place (run
setup.shhere) (Recommended) - b) Create a new project directory elsewhere
- a) Transform the current repository in-place (run
-
If creating a new directory (option b):
NEW_DIR="../${APP}" git clone --branch "${TEMPLATE_BRANCH}" "${TEMPLATE_REPO}" "${NEW_DIR}"Then run setup.sh from inside that directory.
-
Run setup.sh non-interactively (remember: wrap in
nix-shell --runif nix is available):cd "${PROJECT_DIR}" DEPS_TARGET="${DEPS_TARGET}" APP="${APP}" GIT_FORGE="${GIT_FORGE}" GIT_USERNAME="${GIT_USERNAME}" bash setup.sh -
Verify the build succeeded:
just testAll tests should pass. If they fail, diagnose and fix before continuing.
-
Report success and remind the user to:
- Review
LICENSE.txt - Run
just run helpto verify the build
- Review
04 同仓库更多 Skills
stop
Stop the running dev server
status
Show current branch, working tree status, and any open PR
run
Start the dev server in the background, or restart it if already running
pr
Push dev branch and create a GitHub PR to master (auto-generates title/body from commits)
pr-draft
Push dev branch and create a draft GitHub PR to master (auto-generates title/body from commits)
merge
Squash-merge the open PR, pull master, and reset dev branch