N8n cli template

From 8Dvibes/n8n-cli · View interactive version

N8n cli template is an AI agent skill from the GitHub repository 8Dvibes/n8n-cli. Templatize or instantiate n8n workflows. Strips IDs and credentials to create reusable templates, or fills placeholders to create new workflows from templates. Use for sharing patterns across instances or building a library.

How to use this skill

Skill file

/n8n-cli-template — Workflow Templating

Two modes: extract a template from an existing workflow, or instantiate a new workflow from a template.

Mode 1: Extract template from a workflow

Procedure

  1. Get the workflow:
  1. Strip non-portable fields:
  1. Add a template manifest at the top of the JSON as _template:

```json

{

"_template": {

"name": "Slack Daily Digest",

"version": "1.0.0",

"description": "Posts a daily summary of N items to a Slack channel",

"placeholders": [

{"key": "CREDENTIAL_slack", "type": "credential", "credential_type": "slackOAuth2Api", "description": "Slack workspace OAuth"},

{"key": "CHANNEL_ID", "type": "string", "description": "Slack channel ID to post to"},

{"key": "SCHEDULE_CRON", "type": "cron", "description": "When to post", "default": "0 9 * * *"}

]

},

...rest of workflow

}

```

  1. Save the template:

Mode 2: Instantiate a workflow from a template

Procedure

  1. Read the template file
  2. Parse _template.placeholders — for each one, prompt the user to fill in
  3. For credential placeholders:
  1. Substitute placeholders throughout the JSON
  2. Strip the _template block before import
  3. Import:

Output format

For extract: confirm what was stripped, show the placeholder list, save to disk, print next-step instructions.

For instantiate: walk the user through each placeholder interactively, show a summary of substitutions, confirm before importing.

Tips

Future hook

Eventually n8n-cli could ship a built-in template library (n8n-cli templates list, n8n-cli templates install <name>) — this skill is the human-friendly front end for that future surface.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.