From n8n-project-init
Initialize a new n8n automation project for the Pattern AI Automations team. Scaffolds the project directory with CLAUDE.md, .env, and .gitignore — using Pattern instance credentials and an existing blueprint from the PRD generator. USE THIS SKILL WHEN: - User says "/n8n-init", "/init-n8n", or "/new-project" - User says "start a new n8n project", "set up a new automation", "initialize project" - User wants to scaffold a new n8n build directory with team standards - User asks to create the CLAUDE.md or .env for an n8n project - User has finished the PRD generator and is ready to scaffold before building
npx claudepluginhub jonmcgee37/n8n-automations-toolkit --plugin n8n-project-initThis skill uses the workspace's default tool permissions.
Scaffold a new n8n automation project for the Pattern AI Automations team. This is **Step 2 of 3** in the build pipeline:
Guides TDD-style skill creation: pressure scenarios as tests, baseline agent failures, write docs to enforce compliance, verify with RED-GREEN-REFACTOR.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Guides idea refinement into designs: explores context, asks questions one-by-one, proposes approaches, presents sections for approval, writes/review specs before coding.
Scaffold a new n8n automation project for the Pattern AI Automations team. This is Step 2 of 3 in the build pipeline:
[Step 1] PRD Generator → [Step 2] Project Init → [Step 3] n8n Builder
Run this command to check for the team credentials file:
cat ~/.n8n.env 2>/dev/null
If the file exists and contains values:
https://pattern.app.n8n.cloud — correct?"N8N_API_URL, N8N_API_KEY, and N8N_CREDENTIALS_TEMPLATE_URL from the fileIf the file is missing or empty:
"Your Pattern credentials file (
~/.n8n.env) is missing or empty. Before initializing a project, you need to set this up.Ask Jon for the three credential values (N8N_API_URL, N8N_API_KEY, N8N_CREDENTIALS_TEMPLATE_URL), then run:
cat > ~/.n8n.env << 'EOF' N8N_API_URL=https://pattern.app.n8n.cloud N8N_API_KEY=PASTE_YOUR_KEY_HERE N8N_CREDENTIALS_TEMPLATE_URL=PASTE_TEMPLATE_URL_HERE EOFOnce that's done, come back and run the project initializer again."
Do not proceed until credentials are confirmed.
Before collecting project details, check whether a blueprint was already generated.
Run:
ls *.md 2>/dev/null
If a .md file is found in the current directory:
If no .md file is found:
Question: "Do you have a blueprint from the PRD generator?"
Header: "Blueprint"
Options:
- "Yes — I'll paste it now"
- "No — skip for now, I'll add it later"
- "No — take me back to the PRD generator first"
Generate an automation blueprint) and come back when your blueprint is ready."Use AskUserQuestion tool to gather:
First call (2 questions):
lead-enrichment-workflow, slack-approval-bot)
Header: "Project Name"
Options: free text — remind them to use kebab-caseSecond call (2 questions):
mkdir -p <project-name>
cat > <project-name>/.gitignore << 'EOF'
.env
.env.*
!.env.template
.DS_Store
Thumbs.db
.vscode/settings.json
.idea/
node_modules/
*.log
tmp/
temp/
EOF
Write the Pattern credentials into the project .env:
# ============================================
# Pattern AI Automations — n8n Configuration
# ============================================
# NEVER commit this file to git
# ============================================
N8N_API_URL=https://pattern.app.n8n.cloud
N8N_API_KEY=<value from ~/.n8n.env>
N8N_CREDENTIALS_TEMPLATE_URL=<value from ~/.n8n.env>
# ============================================
# Project-Specific Variables (add as needed)
# ============================================
# WEBHOOK_PATH=
# SLACK_CHANNEL=
# GOOGLE_SHEET_ID=
Create CLAUDE.md with all placeholders replaced:
| Placeholder | Value |
|---|---|
{{PROJECT_NAME}} | Project name from Step 3 |
{{PROJECT_DESCRIPTION}} | Description from Step 3 |
{{DATE}} | Today's date (YYYY-MM-DD) |
{{TEAM_MEMBER_NAME}} | Builder name from Step 3 |
{{STAKEHOLDER_NAME}} | Stakeholder name from Step 3 |
{{STAKEHOLDER_TEAM}} | Stakeholder team from Step 3 |
{{N8N_CREDENTIALS_TEMPLATE_URL}} | From ~/.n8n.env |
If a blueprint was provided in Step 2: paste it verbatim into the "Blueprint Reference" section. If not: leave the section with the placeholder note.
export $(cat <project-name>/.env | grep -v '^#' | xargs) && \
curl -s "${N8N_API_URL}/api/v1/workflows?limit=1" \
-H "X-N8N-API-KEY: ${N8N_API_KEY}" | jq '.data | length'
https://pattern.app.n8n.cloud, verify API key matches ~/.n8n.env, check networkProject initialized: <project-name>/
Files created:
✓ CLAUDE.md — project context (update as you build)
✓ .env — Pattern credentials (never commit)
✓ .gitignore — protects .env from git
n8n instance: Pattern (https://pattern.app.n8n.cloud)
API connection: verified
Blueprint: <included / not included>
Then output the next step callout:
─────────────────────────────────────────────
NEXT STEP: Build the workflow
Your project is scaffolded and ready. To start building, say:
"Build the workflow for <project-name>"
The n8n builder will implement the workflow node by node using the
blueprint in CLAUDE.md, testing after each step before moving on.
─────────────────────────────────────────────
pattern.app.n8n.cloud. Do not modify for other instances..env only