Bootstrap vapor service
Skill gaelic-ghost/socket/plugins/server-side-swift/skills/bootstrap-vapor-service
The Source for macOS Agent Workflows
npx -y skills add gaelic-ghost/socket --skill bootstrap-vapor-serviceAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Bootstrap new Vapor server-side Swift services with the official Vapor CLI, Vapor Environment, Fluent ORM, PostgreSQL, CLI-generated Dockerfile and Docker Compose support, generated AGENTS guidance, and SwiftPM validation. Use when creating a fresh Vapor service from scratch or maintaining this skill's bootstrap defaults.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
9.2 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it
Bootstrap Vapor Service
Purpose
Create a new Vapor service repository from nothing to a consistent, database-backed local baseline.
The practical decision is not whether Vapor should use the CLI, Fluent, PostgreSQL, Docker, or its built-in Environment system. The default is already chosen: start with the official Vapor CLI, use Vapor's Environment API for runtime environment and process settings, choose Fluent ORM with PostgreSQL, and preserve the CLI-generated Dockerfile and Docker Compose Postgres surface during bootstrap.
When To Use
- Use this skill when the user wants to start, begin, create, scaffold, or bootstrap a new Vapor service.
- Use this skill when a new Vapor service should receive durable repo-local
AGENTS.mdguidance. - Use this skill when the user asks for the standard Vapor service baseline, including Fluent ORM, PostgreSQL, and local container support.
- Use this skill when maintaining the bootstrap defaults for future Vapor services.
- Do not use this skill for ordinary routes, controllers, middleware, commands, migrations, or tests in an existing Vapor service. Use
vapor-server-workflow. - Do not use this skill for existing persistence changes that are not part of initial bootstrap. Use
persistence-workflow. - Do not use this skill for generic Docker image production work. Use
docker-workflow. - Do not substitute a manual SwiftPM scaffold, discard the CLI-generated Docker files, use a non-Fluent database layer, use SQLite, or use non-container local database setup unless the user explicitly approves that exception for the project.
Source Check
Use repo-local Swift files, checked-out dependency sources, Dash MCP or Dash HTTP for installed Vapor DocC first, then official Vapor documentation when Dash/local coverage is missing or stale:
- Vapor installation
- Vapor Hello, world
- Vapor Environment
- Vapor Fluent overview
- Vapor Fluent migrations
- Vapor Docker deploys
- Vapor GitHub organization
Use SwiftPM and Swift.org documentation for package, toolchain, and Linux behavior when Vapor docs do not own the rule being used.
Single-Path Workflow
- Collect the required inputs:
namedestination- optional
database_name - optional
database_user - optional
database_password - optional
skip_validation
- Verify prerequisites:
swiftgitvapor- Docker-compatible runtime only when Compose validation is requested
- Create the service with the official CLI:
vapor new <name> - Answer the CLI prompts using the standard default:
- include Fluent
- choose PostgreSQL as the database driver
- keep Vapor 4 as the stable default unless the user explicitly asks for Vapor 5 alpha evaluation
- Preserve Vapor's generated application structure:
Sources/App/configure.swiftSources/App/routes.swift- generated model, migration, and test shape when present
- Use Vapor
Environmentfor runtime behavior:- keep environment-specific branching on
app.environment - use
Environment.getorEnvironment.processfor process settings - keep committed
.envcontent as a safe template only - keep
.env.*overrides ignored when they may contain local or secret values
- keep environment-specific branching on
- Preserve and verify the CLI-generated container support:
- keep the Vapor-generated
.dockerignore,Dockerfile, and Compose file - preserve the generated app, migrate, revert, and database services when present
- adapt generated service names and database defaults only when needed for the project name or repo conventions
- use safe development-only defaults
- use a named volume for database storage
- align host, port, database, user, and password with Vapor's local
.envtemplate
- keep the Vapor-generated
- Install generated repo guidance:
- copy
assets/AGENTS.mdinto the new repository root - update placeholders for project name, database name, and validation commands
- keep the generated guidance local to the new service because this plugin's own
AGENTS.mdis not visible inside ordinary service repositories
- copy
- Install Codex GUI local environment guidance when desired:
- copy
templates/codex-local-environments/vapor.tomlinto.codex/environments/vapor.toml - adjust the executable name only when the app target is not
App
- copy
- Validate the scaffold:
swift buildswift testdocker compose config- optional
docker build . - optional
docker compose up -d postgres - optional
swift run App migrateafter confirming the generated database config and migration list - optional
swift run App serveonly when runtime startup validation is requested
- Return the created path, exact commands, environment source, database defaults, validation results, and next handoff.
Defaults
- service framework: Vapor
- creation command:
vapor new <name> - Vapor version posture: Vapor 4 stable default; Vapor 5 alpha only by explicit request
- persistence: Fluent ORM
- database: PostgreSQL
- local dependency runtime: Docker Compose Postgres service
- service image baseline: preserve the CLI-generated Dockerfile
- generated guidance: root
AGENTS.md - app configuration: Vapor
Environment - development database defaults:
- host:
localhost - port:
5432 - database: normalized service name
- username: normalized service name
- password:
development-password
- host:
- validation runs unless
skip_validationis requested
Outputs
statussuccess: service scaffold, repo guidance, and requested validation completedblocked: prerequisites, target-directory constraints, or unsupported CLI choices prevented the runfailed: the scaffold started but generation, dependency wiring, or validation failed
path_typeprimary: official Vapor CLI bootstrap pathfallback: non-mutating guidance only because the CLI path could not safely run
output- resolved service path
- Vapor app target name
- Vapor
Environmentand dotenv source - Fluent and PostgreSQL dependencies added or confirmed
compose.yamlshape- generated
AGENTS.mdinstalled - validation result
- one concise next handoff
Guardrails
- Strong default: use
vapor new, VaporEnvironment, Fluent ORM, PostgreSQL, and Docker Compose for every fresh Vapor service unless the user explicitly approves a project-specific exception. - Do not hand-roll a new SwiftPM project as the default Vapor bootstrap path.
- Do not remove or postpone Docker files generated by
vapor new; validate and keep them in the initial scaffold. - Do not bypass Vapor
Environmentwith a second settings framework for standard runtime configuration. - Do not choose SQLite, MySQL, direct SQL, or non-Fluent persistence as the default bootstrap path.
- Do not commit secrets, real database passwords,
.env.*files with sensitive values, machine-local paths, or private dependency URLs. - Do not run destructive migrations, database drops, volume deletion, or migration reverts without explicit user approval.
- Do not claim Vapor CLI behavior, generated file layouts, Fluent driver names, or migration commands from memory; check current Vapor docs,
vapor --help, or generated scaffold files. - Use
docker-workflowonly when changing beyond the CLI-generated Docker baseline, such as adding nonstandard services, registry publishing, CI image builds, deployment-runtime tuning, or image hardening.
Fallbacks And Handoffs
- If
vaporis missing and Homebrew is acceptable, install with:brew install vapor - If
vaporis unavailable and cannot be installed, stop with a non-mutating fallback plan. Do not silently switch to a manual SwiftPM scaffold. - After successful bootstrap, use
vapor-server-workflowfor routes, controllers, middleware, commands, app configuration, and Vapor tests. - Use
persistence-workflowfor models, migrations, query design, transactions, and database-backed tests after the initial baseline exists. - Use
docker-workflowfor production Dockerfiles, multi-stage images, image validation, registries, or container deployment. - Use
fly-io-deployment-workflowfor Fly.io apps, Fly Postgres, secrets, health checks, and deploy validation.
References
assets/AGENTS.md