project-tooling by alinaqi/claude-bootstrap
npx skills add https://github.com/alinaqi/claude-bootstrap --skill project-tooling加载方式:base.md
用于项目基础设施管理的标准 CLI 工具。
在开始任何项目之前,请验证这些工具是否已安装并完成身份验证:
# 验证安装
gh --version
# 验证身份验证
gh auth status
# 如果未通过身份验证:
gh auth login
# 验证安装
vercel --version
# 验证身份验证
vercel whoami
# 如果未通过身份验证:
vercel login
# 验证安装
supabase --version
# 验证身份验证(检查是否链接到项目或已登录)
supabase projects list
# 如果未通过身份验证:
supabase login
# 验证安装
render --version
# 如果使用 Render API 替代:
# 确保在环境中设置了 RENDER_API_KEY
在项目初始化时运行此脚本以验证所有工具:
#!/bin/bash
# scripts/verify-tooling.sh
set -e
echo "验证项目工具..."
# GitHub CLI
if command -v gh &> /dev/null; then
if gh auth status &> /dev/null; then
echo "✓ GitHub CLI 已通过身份验证"
else
echo "✗ GitHub CLI 未通过身份验证。运行:gh auth login"
exit 1
fi
else
echo "✗ GitHub CLI 未安装。运行:brew install gh"
exit 1
fi
# Vercel CLI
if command -v vercel &> /dev/null; then
if vercel whoami &> /dev/null; then
echo "✓ Vercel CLI 已通过身份验证"
else
echo "✗ Vercel CLI 未通过身份验证。运行:vercel login"
exit 1
fi
else
echo "✗ Vercel CLI 未安装。运行:npm i -g vercel"
exit 1
fi
# Supabase CLI
if command -v supabase &> /dev/null; then
if supabase projects list &> /dev/null; then
echo "✓ Supabase CLI 已通过身份验证"
else
echo "✗ Supabase CLI 未通过身份验证。运行:supabase login"
exit 1
fi
else
echo "✗ Supabase CLI 未安装。运行:brew install supabase/tap/supabase"
exit 1
fi
echo ""
echo "所有工具已验证!"
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 在一个命令中创建并推送
gh repo create <repo-name> --private --source=. --remote=origin --push
# 或者公开仓库:
gh repo create <repo-name> --public --source=. --remote=origin --push
# 如果仓库存在于 GitHub 但未在本地链接
gh repo clone <owner>/<repo>
# 或者将远程仓库添加到现有本地项目
git remote add origin https://github.com/<owner>/<repo>.git
git push -u origin main
# 在 main 分支上启用分支保护
gh api repos/{owner}/{repo}/branches/main/protection -X PUT \
-F required_status_checks='{"strict":true,"contexts":["quality"]}' \
-F enforce_admins=false \
-F required_pull_request_reviews='{"required_approving_review_count":1}'
# 设置默认分支
gh repo edit --default-branch main
# 将当前目录链接到 Vercel 项目
vercel link
# 或者创建新项目
vercel
# 添加环境变量
vercel env add ANTHROPIC_API_KEY production
# 拉取环境变量到本地 .env
vercel env pull .env.local
# 部署到预览环境
vercel
# 部署到生产环境
vercel --prod
# 创建项目(交互式)
supabase projects create <project-name> --org-id <org-id>
# 将本地链接到远程
supabase link --project-ref <project-ref>
# 启动本地 Supabase
supabase start
# 停止本地 Supabase
supabase stop
# 重置数据库(全新应用所有迁移)
supabase db reset
# 创建新迁移
supabase migration new <migration-name>
# 将迁移应用到远程
supabase db push
# 将远程模式拉取到本地
supabase db pull
# 从模式生成 TypeScript 类型
supabase gen types typescript --local > src/types/database.ts
# 或者从远程生成
supabase gen types typescript --project-id <ref> > src/types/database.ts
# 设置 API 密钥
export RENDER_API_KEY=<your-api-key>
# 列出服务
curl -H "Authorization: Bearer $RENDER_API_KEY" \
https://api.render.com/v1/services
# 触发部署
curl -X POST -H "Authorization: Bearer $RENDER_API_KEY" \
https://api.render.com/v1/services/<service-id>/deploys
# 获取部署状态
curl -H "Authorization: Bearer $RENDER_API_KEY" \
https://api.render.com/v1/services/<service-id>/deploys/<deploy-id>
为常见操作添加这些脚本:
{
"scripts": {
"verify-tools": "./scripts/verify-tooling.sh",
"deploy:preview": "vercel",
"deploy:prod": "vercel --prod",
"db:start": "supabase start",
"db:stop": "supabase stop",
"db:reset": "supabase db reset",
"db:migrate": "supabase db push",
"db:types": "supabase gen types typescript --local > src/types/database.ts"
}
}
# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: ${{ github.ref == 'refs/heads/main' && '--prod' || '' }}
# .github/workflows/migrate.yml
name: Migrate Database
on:
push:
branches: [main]
paths:
- 'supabase/migrations/**'
jobs:
migrate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest
- name: Push migrations
run: supabase db push
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
必需:初始化项目时,始终根据技术栈为部署平台连接创建待办事项。
| 技术栈 | 默认平台 | 所需操作 |
|---|---|---|
| Next.js / Node.js | Vercel | 将 Git 仓库连接到 Vercel |
| Python (FastAPI, Flask) | Render | 将 Git 仓库连接到 Render,获取 API 密钥 |
| 静态站点 | Vercel 或 Cloudflare Pages | 将 Git 仓库连接 |
当 Vercel 是部署平台时,创建此待办事项:
TODO: 将 Git 仓库连接到 Vercel 以实现自动部署
步骤:
# 选项 1:通过 CLI
vercel link
vercel git connect
# 选项 2:通过仪表板(推荐用于首次设置)
# 1. 访问 vercel.com/new
# 2. 导入 Git 仓库
# 3. 配置项目设置
# 4. 部署
连接后:
main → 生产环境部署当 Render 是 Python 项目的部署平台时:
步骤 1:向用户请求 Render API 密钥
在继续之前,请提供您的 Render API 密钥。
从以下地址获取:https://dashboard.render.com/u/settings/api-keys
安全存储 - 我们会将其添加到您的环境中。
步骤 2:创建待办事项
TODO: 从用户获取 Render API 密钥
TODO: 将 Git 仓库连接到 Render
TODO: 配置 Render 服务(Web 服务或后台工作进程)
TODO: 在 Render 上设置环境变量
步骤 3:通过仪表板连接(推荐)
# 1. 访问 dashboard.render.com/create
# 2. 对于 API 选择“Web 服务”,对于异步任务选择“后台工作进程”
# 3. 连接您的 GitHub/GitLab 仓库
# 4. 配置:
# - 名称:<project-name>
# - 运行时:Python 3
# - 构建命令:pip install -r requirements.txt
# - 启动命令:uvicorn main:app --host 0.0.0.0 --port $PORT
步骤 4:为 CI/CD 存储 API 密钥
# 为 CI/CD 添加到 GitHub 密钥
gh secret set RENDER_API_KEY
# 或者添加到本地环境
echo "RENDER_API_KEY=<your-key>" >> .env
步骤 5:配置 render.yaml(可选 - 基础设施即代码)
# render.yaml
services:
- type: web
name: <project-name>-api
runtime: python
buildCommand: pip install -r requirements.txt
startCommand: uvicorn main:app --host 0.0.0.0 --port $PORT
envVars:
- key: PYTHON_VERSION
value: "3.11"
- key: DATABASE_URL
fromDatabase:
name: <project-name>-db
property: connectionString
databases:
- name: <project-name>-db
plan: free
设置部署时添加到项目待办事项:
## 部署设置
- [ ] 创建 Git 仓库 (gh repo create)
- [ ] 选择部署平台 (Vercel/Render/其他)
- [ ] 将 Git 连接到部署平台
- [ ] 配置环境变量
- [ ] 设置 CI/CD 工作流
- [ ] 验证预览部署是否正常工作
- [ ] 配置生产环境域名
每周安装次数
70
仓库
GitHub 星标数
530
首次出现时间
2026年1月20日
安全审计
安装于
claude-code56
opencode54
gemini-cli49
cursor46
codex46
antigravity43
Load with: base.md
Standard CLI tools for project infrastructure management.
Before starting any project, verify these tools are installed and authenticated:
# Verify installation
gh --version
# Verify authentication
gh auth status
# If not authenticated:
gh auth login
# Verify installation
vercel --version
# Verify authentication
vercel whoami
# If not authenticated:
vercel login
# Verify installation
supabase --version
# Verify authentication (check if linked to a project or logged in)
supabase projects list
# If not authenticated:
supabase login
# Verify installation
render --version
# If using Render API instead:
# Ensure RENDER_API_KEY is set in environment
Run this at project initialization to verify all tools:
#!/bin/bash
# scripts/verify-tooling.sh
set -e
echo "Verifying project tooling..."
# GitHub CLI
if command -v gh &> /dev/null; then
if gh auth status &> /dev/null; then
echo "✓ GitHub CLI authenticated"
else
echo "✗ GitHub CLI not authenticated. Run: gh auth login"
exit 1
fi
else
echo "✗ GitHub CLI not installed. Run: brew install gh"
exit 1
fi
# Vercel CLI
if command -v vercel &> /dev/null; then
if vercel whoami &> /dev/null; then
echo "✓ Vercel CLI authenticated"
else
echo "✗ Vercel CLI not authenticated. Run: vercel login"
exit 1
fi
else
echo "✗ Vercel CLI not installed. Run: npm i -g vercel"
exit 1
fi
# Supabase CLI
if command -v supabase &> /dev/null; then
if supabase projects list &> /dev/null; then
echo "✓ Supabase CLI authenticated"
else
echo "✗ Supabase CLI not authenticated. Run: supabase login"
exit 1
fi
else
echo "✗ Supabase CLI not installed. Run: brew install supabase/tap/supabase"
exit 1
fi
echo ""
echo "All tools verified!"
# Create and push in one command
gh repo create <repo-name> --private --source=. --remote=origin --push
# Or public:
gh repo create <repo-name> --public --source=. --remote=origin --push
# If repo exists on GitHub but not linked locally
gh repo clone <owner>/<repo>
# Or add remote to existing local project
git remote add origin https://github.com/<owner>/<repo>.git
git push -u origin main
# Enable branch protection on main
gh api repos/{owner}/{repo}/branches/main/protection -X PUT \
-F required_status_checks='{"strict":true,"contexts":["quality"]}' \
-F enforce_admins=false \
-F required_pull_request_reviews='{"required_approving_review_count":1}'
# Set default branch
gh repo edit --default-branch main
# Link current directory to Vercel project
vercel link
# Or create new project
vercel
# Add environment variable
vercel env add ANTHROPIC_API_KEY production
# Pull env vars to local .env
vercel env pull .env.local
# Deploy to preview
vercel
# Deploy to production
vercel --prod
# Create project (interactive)
supabase projects create <project-name> --org-id <org-id>
# Link local to remote
supabase link --project-ref <project-ref>
# Start local Supabase
supabase start
# Stop local Supabase
supabase stop
# Reset database (apply all migrations fresh)
supabase db reset
# Create new migration
supabase migration new <migration-name>
# Apply migrations to remote
supabase db push
# Pull remote schema to local
supabase db pull
# Generate TypeScript types from schema
supabase gen types typescript --local > src/types/database.ts
# Or from remote
supabase gen types typescript --project-id <ref> > src/types/database.ts
# Set API key
export RENDER_API_KEY=<your-api-key>
# List services
curl -H "Authorization: Bearer $RENDER_API_KEY" \
https://api.render.com/v1/services
# Trigger deploy
curl -X POST -H "Authorization: Bearer $RENDER_API_KEY" \
https://api.render.com/v1/services/<service-id>/deploys
# Get deploy status
curl -H "Authorization: Bearer $RENDER_API_KEY" \
https://api.render.com/v1/services/<service-id>/deploys/<deploy-id>
Add these scripts for common operations:
{
"scripts": {
"verify-tools": "./scripts/verify-tooling.sh",
"deploy:preview": "vercel",
"deploy:prod": "vercel --prod",
"db:start": "supabase start",
"db:stop": "supabase stop",
"db:reset": "supabase db reset",
"db:migrate": "supabase db push",
"db:types": "supabase gen types typescript --local > src/types/database.ts"
}
}
# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: ${{ github.ref == 'refs/heads/main' && '--prod' || '' }}
# .github/workflows/migrate.yml
name: Migrate Database
on:
push:
branches: [main]
paths:
- 'supabase/migrations/**'
jobs:
migrate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Supabase CLI
uses: supabase/setup-cli@v1
with:
version: latest
- name: Push migrations
run: supabase db push
env:
SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ secrets.SUPABASE_DB_PASSWORD }}
REQUIRED : When initializing a project, always create todos for deployment platform connection based on the stack.
| Stack | Default Platform | Action Required |
|---|---|---|
| Next.js / Node.js | Vercel | Connect Git repo to Vercel |
| Python (FastAPI, Flask) | Render | Connect Git repo to Render, get API key |
| Static sites | Vercel or Cloudflare Pages | Connect Git repo |
When Vercel is the deployment platform, create this todo:
TODO: Connect Git repository to Vercel for automatic deployments
Steps:
# Option 1: Via CLI
vercel link
vercel git connect
# Option 2: Via Dashboard (recommended for first setup)
# 1. Go to vercel.com/new
# 2. Import Git repository
# 3. Configure project settings
# 4. Deploy
After connecting:
main → Production deployWhen Render is the deployment platform for Python projects:
Step 1: Ask user for Render API key
Before proceeding, please provide your Render API key.
Get it from: https://dashboard.render.com/u/settings/api-keys
Store it securely - we'll add it to your environment.
Step 2: Create todos
TODO: Get Render API key from user
TODO: Connect Git repository to Render
TODO: Configure Render service (web service or background worker)
TODO: Set environment variables on Render
Step 3: Connect via Dashboard (recommended)
# 1. Go to dashboard.render.com/create
# 2. Select "Web Service" for APIs, "Background Worker" for async
# 3. Connect your GitHub/GitLab repository
# 4. Configure:
# - Name: <project-name>
# - Runtime: Python 3
# - Build Command: pip install -r requirements.txt
# - Start Command: uvicorn main:app --host 0.0.0.0 --port $PORT
Step 4: Store API key for CI/CD
# Add to GitHub secrets for CI/CD
gh secret set RENDER_API_KEY
# Or add to local env
echo "RENDER_API_KEY=<your-key>" >> .env
Step 5: Configure render.yaml (optional - Infrastructure as Code)
# render.yaml
services:
- type: web
name: <project-name>-api
runtime: python
buildCommand: pip install -r requirements.txt
startCommand: uvicorn main:app --host 0.0.0.0 --port $PORT
envVars:
- key: PYTHON_VERSION
value: "3.11"
- key: DATABASE_URL
fromDatabase:
name: <project-name>-db
property: connectionString
databases:
- name: <project-name>-db
plan: free
Add to project todos when setting up deployment:
## Deployment Setup
- [ ] Create Git repository (gh repo create)
- [ ] Choose deployment platform (Vercel/Render/other)
- [ ] Connect Git to deployment platform
- [ ] Configure environment variables
- [ ] Set up CI/CD workflow
- [ ] Verify preview deployments work
- [ ] Configure production domain
Weekly Installs
70
Repository
GitHub Stars
530
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketWarnSnykFail
Installed on
claude-code56
opencode54
gemini-cli49
cursor46
codex46
antigravity43
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
104,900 周安装
化学分析师技能:原子理论、热力学、光谱学、色谱法、合成路线规划与材料表征
200 周安装
Android无障碍功能检查清单:内容描述、触摸目标、色彩对比度、焦点语义完整指南
202 周安装
Magento 2 Hyvä 主题列表工具 - 快速发现项目中的所有 Hyvä 主题路径
213 周安装
floor-plan:基于Drawio的Markdown平面图与布局生成器,快速创建家居/办公室设计图
205 周安装
LinkedIn广告健康度审计工具 - 25项检查清单,优化B2B广告效果与ROI
202 周安装
oh-my-claudecode技能管理CLI教程:创建、列表、删除技能命令详解
206 周安装