22 lines
3.3 KiB
JSON
22 lines
3.3 KiB
JSON
{
|
|
"name": "N8N Skills",
|
|
"description": "Load and execute skills from n8n's official skill library via the n8n REST API.",
|
|
"fields": [
|
|
{
|
|
"label": "n8n URL",
|
|
"key": "n8n_url",
|
|
"type": "text",
|
|
"placeholder": "https://your-n8n.example.com \u2014 API endpoint is usually at <domain>/api/v1"
|
|
},
|
|
{
|
|
"label": "n8n API Key",
|
|
"key": "n8n_api_key",
|
|
"type": "password",
|
|
"placeholder": ""
|
|
}
|
|
],
|
|
"signup_url": "https://n8n.io/?via=derez",
|
|
"signup_label": "🤝 Need n8n? Sign up via our affiliate link",
|
|
"prompt": "Create a skill that integrates with n8n's skill library and REST API.\n\n## Configuration\n\nN8N_URL={n8n_url}\nN8N_API_KEY={n8n_api_key}\n\n## Skill library\n\nYou have access to n8n's official skill library at https://github.com/n8n-io/skills\n\nAt the start of every task, clone or pull the latest version of this repo to discover available skills.\n\n if [ ! -d /tmp/n8n-skills ]; then\n git clone --depth 1 https://github.com/n8n-io/skills /tmp/n8n-skills\n else\n cd /tmp/n8n-skills && git pull --ff-only\n fi\n\nRead the README.md and INDEX.md files in that repo to understand what skills are available. Each skill has a dedicated directory with a README.md describing its purpose and usage. Choose the most relevant skill(s) for the user's request.\n\n## API basics\n\nAll calls go to {n8n_url}/rest/... with the header:\n X-N8N-API-KEY: {n8n_api_key}\n\nThe n8n REST API documentation is available at {n8n_url}/api/v1/openapi.json — fetch it if you need to discover available endpoints.\n\n### Common operations\n\nList workflows:\n curl -s -H 'X-N8N-API-KEY: {n8n_api_key}' '{n8n_url}/rest/workflows'\n\nGet a workflow by ID:\n curl -s -H 'X-N8N-API-KEY: {n8n_api_key}' '{n8n_url}/rest/workflows/<id>'\n\nList executions:\n curl -s -H 'X-N8N-API-KEY: {n8n_api_key}' '{n8n_url}/rest/executions'\n\nList credentials:\n curl -s -H 'X-N8N-API-KEY: {n8n_api_key}' '{n8n_url}/rest/credentials'\n\nList tags:\n curl -s -H 'X-N8N-API-KEY: {n8n_api_key}' '{n8n_url}/rest/tags'\n\n## Workflow skill execution pattern\n\nWhen a skill from the library maps to a workflow to run:\n\n1. Read the skill's README.md to understand the inputs, outputs, and workflow structure.\n2. Check if a matching workflow already exists in n8n (use the list endpoint).\n3. If it does, create an execution:\n\n curl -s -X POST '{n8n_url}/rest/workflows/<id>/run' \\\n -H 'X-N8N-API-KEY: {n8n_api_key}' \\\n -H 'Content-Type: application/json' \\\n -d '{\"data\": <input_data>}'\n\n4. If it doesn't, create a new workflow using the skill's specification:\n\n curl -s -X POST '{n8n_url}/rest/workflows' \\\n -H 'X-N8N-API-KEY: {n8n_api_key}' \\\n -H 'Content-Type: application/json' \\\n -d '{\"name\": \"<skill-name>\", \"nodes\": [...], \"connections\": {...}}'\n\n5. Poll execution status:\n curl -s -H 'X-N8N-API-KEY: {n8n_api_key}' '{n8n_url}/rest/executions/<id>' | jq '.data'\n\n## Solved cases log\n\nAfter every successful n8n task, append to ~/n8n_solutions.md:\n\n ## <short title> (<date>)\n Goal: <one sentence>\n Skill used: <skill path in the library>\n Key commands: <the curl | jq pipelines that worked>\n Gotchas: <anything non-obvious>\n\nRead ~/n8n_solutions.md at task start — if a matching case exists, reuse it directly."
|
|
}
|