Claude Agent Skill
The @n8n-as-code/claude-skill package provides an official Claude Agent Skill that transforms Claude into an n8n workflow expert.
🎯 What is a Claude Agent Skill?
Claude Agent Skills are filesystem-based packages that provide Claude with:
- Metadata (always loaded): Name and description (~100 tokens)
- Instructions (loaded on-demand): Guidance from SKILL.md (~5k tokens)
- Resources (executed as needed): Scripts that run via bash (0 tokens, only output counts)
This architecture enables progressive disclosure - Claude only loads content when needed.
✨ What This Skill Does
When installed, Claude will:
- ✅ Search n8n nodes using
npx @n8n-as-code/agent-cli search - ✅ Retrieve exact node schemas using
npx @n8n-as-code/agent-cli get - ✅ Generate valid workflow JSON without hallucinating parameters
- ✅ Follow n8n best practices (modern expressions, Code node, no hardcoded credentials)
🏗️ How It Works
User: "Create an HTTP Request workflow"
↓
Claude detects n8n context (via skill description)
↓
Claude reads SKILL.md instructions
↓
Claude runs: npx -y @n8n-as-code/agent-cli search "http request"
↓
Claude runs: npx -y @n8n-as-code/agent-cli get "httpRequest"
↓
Claude generates workflow JSON using real schema
📦 Building the Skill
From the monorepo root:
cd packages/claude-skill
npm run build
This generates dist/n8n-architect/ containing:
SKILL.md- Main instructions with YAML frontmatterscripts/- Bash helpers for CLI commandsREADME.md- Installation guide
🚀 Installation
For Claude.ai (Web)
-
Build and package:
cd packages/claude-skill
npm run build
cd dist
zip -r n8n-architect-skill.zip n8n-architect/ -
Upload to Claude:
- Go to claude.ai/settings/features
- Find "Custom Skills"
- Click "Upload Skill"
- Select
n8n-architect-skill.zip
-
Verify: Start a new chat and ask: "Can you help me with n8n?"
Claude should acknowledge the n8n context automatically.
For Claude Code (Desktop)
-
Build and install:
cd packages/claude-skill
npm run build
# Install globally
mkdir -p ~/.claude/skills
cp -r dist/n8n-architect ~/.claude/skills/ -
Restart Claude Code
-
Verify: The skill loads automatically. Ask about n8n to test.
For Claude API
When using the Claude API with the skills beta:
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
});
const response = await client.messages.create({
model: 'claude-3-7-sonnet-20250219',
max_tokens: 4096,
betas: [
'code-execution-2025-08-25',
'skills-2025-10-02',
'files-api-2025-04-14'
],
container: {
type: 'code_execution_2025_01',
skills: ['n8n-architect']
},
messages: [{
role: 'user',
content: 'Create a workflow with an HTTP Request node'
}]
});
console.log(response.content);
✅ Testing
Test with these prompts:
Basic Recognition
"Help me create an n8n workflow"
Expected: Claude acknowledges n8n context
Node Search
"I need to make an HTTP request in n8n"
Expected: Claude searches for HTTP Request node
Schema Retrieval
"Show me the parameters for a Code node"
Expected: Claude fetches and displays schema
Workflow Generation
"Create a webhook that calls the GitHub API"
Expected: Claude generates valid workflow JSON
🔧 How the Skill is Built
The skill reuses content from @n8n-as-code/agent-cli's AiContextGenerator:
// Same content as getAgentsContent() from agent-cli
const skillContent = `
## 🎭 Role: Expert n8n Engineer
You manage n8n workflows as **clean, version-controlled JSON**.
### 🔬 Research Protocol (MANDATORY)
Do NOT hallucinate node parameters. Use these tools:
- npx -y @n8n-as-code/agent-cli search "<term>"
- npx -y @n8n-as-code/agent-cli get "<nodeName>"
...
`;
This ensures consistency between AGENTS.md (for Cursor/Windsurf) and SKILL.md (for Claude).
🔒 Security
- ✅ Runs 100% locally (no external servers)
- ✅ Uses NPX to execute
@n8n-as-code/agent-cli - ✅ Open-source and auditable
- ⚠️ Requires Node.js and npm on the machine
- ⚠️ First run downloads
@n8n-as-code/agent-clivia NPX
📚 Related Documentation
- Agent CLI Usage - The underlying CLI tool
- Claude Agent Skills Docs - Official Anthropic documentation
- Contribution Guide - Development guidelines
🐛 Troubleshooting
Skill not loading
Claude.ai:
- Ensure you're on Pro/Team/Enterprise plan
- Check Settings → Features for the skill
- Try re-uploading the ZIP
Claude Code:
- Verify folder exists:
ls ~/.claude/skills/n8n-architect/ - Check SKILL.md has YAML frontmatter
- Restart Claude Code
NPX commands fail
- Install Node.js: https://nodejs.org/
- Verify:
npx --version - For Claude.ai: Check if code execution has network access in settings
Claude doesn't use the skill
- Be explicit: "Using n8n-architect skill, help me..."
- Check the description field matches your use case
- Ensure YAML frontmatter is valid (run
npm run validate)
📖 Next Steps
- Read Agent CLI documentation to understand the underlying tool
- See Contribution Guide for development details
- Check Troubleshooting for common issues