railway-templates by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill railway-templates从 Railway 模板市场搜索并部署服务。
| 类别 | 模板 | 代码 |
|---|---|---|
| 数据库 | PostgreSQL | postgres |
| Redis | redis | |
| MySQL | mysql | |
| MongoDB |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
mongodb |
| CMS | Ghost | ghost |
| Strapi | strapi |
| 存储 | Minio | minio |
| 自动化 | n8n | n8n |
| 监控 | Uptime Kuma | uptime-kuma |
对于其他模板,请使用下面的搜索查询。
获取项目上下文:
railway status --json
提取:
id - 项目 IDenvironments.edges[0].node.id - 环境 ID获取工作区 ID:
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'query getWorkspace($projectId: String!) {
project(id: $projectId) { workspaceId }
}' \
'{"projectId": "PROJECT_ID"}'
SCRIPT
列出可用模板,可选用过滤器:
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'query templates($first: Int, $verified: Boolean) {
templates(first: $first, verified: $verified) {
edges {
node {
name
code
description
category
}
}
}
}' \
'{"first": 20, "verified": true}'
SCRIPT
| 参数 | 类型 | 描述 |
|---|---|---|
first | Int | 结果数量(最多约 100 条) |
verified | Boolean | 仅限已验证模板 |
recommended | Boolean | 仅限推荐模板 |
每分钟 10 次请求。请勿频繁搜索。
通过代码获取特定模板:
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'query template($code: String!) {
template(code: $code) {
id
name
description
serializedConfig
}
}' \
'{"code": "postgres"}'
SCRIPT
返回:
id - 模板 ID(部署时需要)serializedConfig - 服务配置(部署时需要)bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'query template($code: String!) {
template(code: $code) {
id
serializedConfig
}
}' \
'{"code": "postgres"}'
SCRIPT
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'mutation deployTemplate($input: TemplateDeployV2Input!) {
templateDeployV2(input: $input) {
projectId
workflowId
}
}' \
'{
"input": {
"templateId": "TEMPLATE_ID_FROM_STEP_1",
"serializedConfig": SERIALIZED_CONFIG_FROM_STEP_1,
"projectId": "PROJECT_ID",
"environmentId": "ENVIRONMENT_ID",
"workspaceId": "WORKSPACE_ID"
}
}'
SCRIPT
重要提示: serializedConfig 是来自模板查询的确切 JSON 对象,而不是字符串。
每周安装次数
136
代码仓库
GitHub 星标数
22.6K
首次出现
2026年1月21日
安全审计
安装于
claude-code116
opencode104
gemini-cli100
cursor96
antigravity91
codex88
Search and deploy services from Railway's template marketplace.
| Category | Template | Code |
|---|---|---|
| Databases | PostgreSQL | postgres |
| Redis | redis | |
| MySQL | mysql | |
| MongoDB | mongodb | |
| CMS | Ghost | ghost |
| Strapi | strapi | |
| Storage | Minio | minio |
| Automation | n8n | n8n |
| Monitoring | Uptime Kuma | uptime-kuma |
For other templates, use the search query below.
Get project context:
railway status --json
Extract:
id - project IDenvironments.edges[0].node.id - environment IDGet workspace ID:
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'query getWorkspace($projectId: String!) {
project(id: $projectId) { workspaceId }
}' \
'{"projectId": "PROJECT_ID"}'
SCRIPT
List available templates with optional filters:
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'query templates($first: Int, $verified: Boolean) {
templates(first: $first, verified: $verified) {
edges {
node {
name
code
description
category
}
}
}
}' \
'{"first": 20, "verified": true}'
SCRIPT
| Argument | Type | Description |
|---|---|---|
first | Int | Number of results (max ~100) |
verified | Boolean | Only verified templates |
recommended | Boolean | Only recommended templates |
10 requests per minute. Don't spam searches.
Fetch a specific template by code:
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'query template($code: String!) {
template(code: $code) {
id
name
description
serializedConfig
}
}' \
'{"code": "postgres"}'
SCRIPT
Returns:
id - template ID (needed for deployment)serializedConfig - service configuration (needed for deployment)bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'query template($code: String!) {
template(code: $code) {
id
serializedConfig
}
}' \
'{"code": "postgres"}'
SCRIPT
bash <<'SCRIPT'
${CLAUDE_PLUGIN_ROOT}/skills/lib/railway-api.sh \
'mutation deployTemplate($input: TemplateDeployV2Input!) {
templateDeployV2(input: $input) {
projectId
workflowId
}
}' \
'{
"input": {
"templateId": "TEMPLATE_ID_FROM_STEP_1",
"serializedConfig": SERIALIZED_CONFIG_FROM_STEP_1,
"projectId": "PROJECT_ID",
"environmentId": "ENVIRONMENT_ID",
"workspaceId": "WORKSPACE_ID"
}
}'
SCRIPT
Important: serializedConfig is the exact JSON object from the template query, not a string.
Weekly Installs
136
Repository
GitHub Stars
22.6K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
claude-code116
opencode104
gemini-cli100
cursor96
antigravity91
codex88