Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计提醒

constructive-boilerplate-pgpm-init建设性样板 pgpm init

Agent Skill

constructive-boilerplate-pgpm-init 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

329

周安装

14

GitHub Stars

公开资料未说明

下载量

115
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:constructive-boilerplate-pgpm-init(建设性样板 pgpm init)
来源仓库:https://github.com/constructive-io/constructive-skills
仓库路径:skills/constructive-boilerplate-pgpm-init
安装命令:
npx skills add https://github.com/constructive-io/constructive-skills --skill constructive-boilerplate-pgpm-init
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/constructive-io/constructive-skills --skill constructive-boilerplate-pgpm-init

简介

用于初始化工作区和模块,支持 PGPM 和 PNPM 模板的交互式或非交互模式。

  • 适用于脚手架化新项目或 CI/CD 环境中的自动化初始化流程。
  • 通过 npx 从指定 GitHub 仓库安装并调用 pgpm init 命令。
  • 建议确认权限范围和维护状态,避免触发不必要的网络或文件操作。
  • constructive-boilerplate-pgpm-init 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Initialize workspaces and modules using the pgpm init command. Supports PGPM (PostgreSQL) and PNPM (TypeScript/JavaScript) templates, interactive and non-interactive modes, and custom template repositories.

When to Apply

Use this skill when:

  • Scaffolding a new workspace or module with pgpm init
  • Using --template, --boilerplate, or -w flags
  • Setting up non-interactive pgpm init for CI/CD
  • Using custom template repositories (e.g., constructive-io/sandbox-templates)

Basic Commands

Create a Workspace

pgpm init workspace

Creates a new PGPM workspace with pgpm.json, pnpm-workspace.yaml, lerna.json, GitHub Actions workflows, Jest testing setup, and TypeScript configuration.

Create a Module

# Inside a workspace
pgpm init

# Or explicitly
pgpm init module

Creates a new PGPM module with pgpm.plan, .control file, package.json, __tests__/, and deploy/, revert/, verify/ directories.

Create Workspace + Module in One Command

# Create workspace first, then module inside it
pgpm init -w

# With a specific template variant
pgpm init --dir pnpm -w
pgpm init --template pnpm/module -w

The -w (or --create-workspace) flag creates a workspace first, then automatically creates the module inside it. Useful when starting from scratch outside any workspace.

Available Templates

Default Repository (constructive-io/pgpm-boilerplates)

PGPM Variant (Default)

TemplateCommandDescription
pgpm/workspacepgpm init workspace or pgpm init -t pgpm/workspacePGPM workspace with pgpm.json, migrations support
pgpm/modulepgpm init or pgpm init -t pgpm/modulePGPM module with pgpm.plan,.control file

PNPM Variant (Pure TypeScript/JavaScript)

TemplateCommandDescription
pnpm/workspacepgpm init workspace --dir pnpm or pgpm init -t pnpm/workspacePure PNPM workspace (no pgpm files)
pnpm/modulepgpm init --dir pnpm or pgpm init -t pnpm/modulePure PNPM package (no pgpm.plan/.control)

PGPM Templates (pgpm/)

Use for PostgreSQL extension development with migrations:

pgpm init workspace
pgpm init -t pgpm/workspace
pgpm init -t pgpm/module -w

Creates: pgpm.json / pgpm.config.js (workspace), pgpm.plan (module), .control file (module), migration directories: deploy/, revert/, verify/

PNPM Templates (pnpm/)

Use for pure TypeScript/JavaScript packages without PostgreSQL:

pgpm init workspace --dir pnpm
pgpm init -t pnpm/workspace
pgpm init -t pnpm/module -w

Creates: pnpm-workspace.yaml (workspace), lerna.json (workspace), standard package.json, src/, __tests__/ directories. No pgpm-specific files.

Using --template (Recommended)

The --template flag (or -t) provides a cleaner syntax by combining the directory variant and template type into a single path:

# These are equivalent:
pgpm init workspace --dir pnpm
pgpm init --template pnpm/workspace

# These are equivalent:
pgpm init module --dir pnpm
pgpm init --template pnpm/module

# Short form with -t alias
pgpm init -t pgpm/module
pgpm init -t pnpm/workspace

The --template flag parses the path by splitting on the first /:

  • Everything before the slash becomes the --dir value
  • Everything after becomes the template type (workspace/module)

Using --boilerplate

# Interactive selection from all available templates
pgpm init --boilerplate

# Select a specific template path
pgpm init pnpm/workspace --boilerplate

When using --boilerplate in CI/CD, you must specify the template path:

# This will error in non-interactive mode
pgpm init --boilerplate --no-tty  # ERROR

# Correct: specify the template path
pgpm init pnpm/workspace --boilerplate --no-tty \
  --name my-workspace \
  --fullName "Your Name" \
  --email "you@example.com" \
  --username your-github-username \
  --license MIT

Custom Template Repositories

# Use a different repository
pgpm init workspace --repo owner/repo
pgpm init workspace --repo https://github.com/owner/repo.git

# Use a specific branch
pgpm init workspace --repo owner/repo --from-branch develop

# Example: Constructive Next.js app template
pgpm init -w --repo constructive-io/sandbox-templates --template nextjs/constructive-app

Non-Interactive Mode

For CI/CD pipelines and automation, use --no-tty or set CI=true:

pgpm init workspace --no-tty \
  --name my-workspace \
  --fullName "Your Name" \
  --email "you@example.com" \
  --username your-github-username \
  --license MIT

Required Parameters for Non-Interactive Workspace

ParameterDescription
--nameWorkspace name (becomes directory name)
--fullNameAuthor's full name
--emailAuthor's email
--usernameGitHub username
--licenseLicense (MIT, Apache-2.0, etc.)

Required Parameters for Non-Interactive Module

ParameterDescription
--moduleNameModule name
--moduleDescModule description
--fullNameAuthor's full name
--emailAuthor's email
--usernameGitHub username
--repoNameRepository name
--licenseLicense
--accessnpm access level (public/restricted)
--extensionsPostgreSQL extensions (comma-separated)

Example:

pgpm init --no-tty \
  --moduleName my-module \
  --moduleDesc "My PostgreSQL module" \
  --fullName "Your Name" \
  --email "you@example.com" \
  --username your-github-username \
  --repoName my-workspace \
  --license MIT \
  --access public \
  --extensions "plpgsql,uuid-ossp"

Workspace Type Requirements

Templates specify what type of workspace they require via requiresWorkspace:

ValueMeaning
"pgpm"Must be inside a PGPM workspace (has pgpm.json)
"pnpm"Must be inside a PNPM workspace (has pnpm-workspace.yaml)
"lerna"Must be inside a Lerna workspace (has lerna.json)
"npm"Must be inside an npm workspace (package.json with workspaces)
falseCan be created anywhere

CLI Options

OptionDescription
--help, -hShow help message
--cwd <directory>Working directory (default: current directory)
--repo <repo>Template repository (default: constructive-io/pgpm-boilerplates)
--from-branch <branch>Branch/tag to use when cloning repo
--dir <variant>Template variant directory (e.g., pnpm, supabase)
--template, -t <path>Full template path (e.g., pnpm/module) - combines dir and type
--boilerplatePrompt to select from available boilerplates
--create-workspace, -wCreate a workspace first, then create the module inside it
--no-ttyRun in non-interactive mode

Note: The -W flag is used for the interactive workspace recovery prompt (when you run pgpm init outside a workspace and it asks if you want to create one).

Workflow Examples

Starting a New Project

# 1. Create workspace
pgpm init workspace
cd my-workspace

# 2. Create first module
pgpm init
cd packages/my-module

# 3. Add a database change
pgpm add my_first_change

# 4. Deploy to database
pgpm deploy --createdb

Quick Start with -w Flag

# Create workspace + module in one command
pgpm init -w
# Prompts for workspace name, then module name
# Creates workspace and module inside packages/

# With PNPM template variant
pgpm init --template pnpm/module -w

Create a Pure TypeScript Monorepo

# 1. Create PNPM workspace
pgpm init workspace --dir pnpm
cd my-workspace

# 2. Create packages
pgpm init --dir pnpm  # Creates TypeScript package

CI/CD Pipeline Setup

# .github/workflows/setup.yaml
jobs:
  setup:
    runs-on: ubuntu-latest
    steps:
      - name: Install pgpm
        run: npm install -g pgpm

      - name: Create workspace
        run: |
          pgpm init workspace --no-tty \
            --name test-workspace \
            --fullName "CI Bot" \
            --email "ci@example.com" \
            --username ci-bot \
            --license MIT

Template Caching

Templates are cached locally under ~/.pgpm/cache/repos with a one-day TTL. To force a fresh pull:

pgpm cache clean

Best Practices

  1. Use --template (or -t) for specifying templates — cleaner than --dir + positional arg
  2. Use -w flag to create workspace + module in one command when starting fresh
  3. Use --no-tty in CI/CD pipelines to avoid hanging on prompts
  4. Pin template versions with --from-branch for reproducible builds
  5. Use --boilerplate when exploring available templates interactively
  6. Create organization-specific boilerplates for standardized project setup
  7. Use pgpm cache clean if templates seem outdated

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.46%
按下载量换算44

Claude

30.68%
按下载量换算35

Cursor

18.25%
按下载量换算21

Gemini CLI

8.34%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills