Agent skill
n8n-development
n8n workflow development patterns, testing, validation, and best practices for building composable webhook workflows
Install this agent skill to your Project
npx add-skill https://github.com/89jobrien/steve/tree/main/steve/skills/n8n-development
SKILL.md
n8n Development Skill
This skill provides comprehensive guidance for developing, testing, and maintaining n8n webhook workflows integrated with Python services. It includes patterns for building composable workflows, template development, test-driven development practices, and complete development workflows.
When to Use This Skill
Apply this skill when:
- Building new n8n webhook workflows
- Integrating n8n workflows with Python services
- Writing tests for workflow integrations
- Creating reusable workflow templates
- Debugging workflow execution issues
- Setting up development environments for n8n projects
- Following best practices for async patterns and error handling
Core Development Principles
Test-Driven Development
- Start with a failing test to define expected behavior
- Implement minimal code to make the test pass
- Refactor while keeping tests green
- Run tests with
uv run pytest
Workflow Development Process
- Design the webhook contract (request/response schema)
- Implement in n8n with error handling
- Export JSON to
nathan/workflows/[category]/ - Add to registry (
workflow_registry.yaml) - Write integration tests in
tests/workflows/[category]/ - Document with usage examples
Template Development
- Define variables using
${VAR_NAME}syntax - Add validation via schema in template frontmatter
- Test rendering using CLI
- Document with usage examples in comments
Essential Commands
# Core development
uv sync # Install dependencies
uv run pytest # Run tests
uv run pytest --cov=nathan --cov-report=term-missing # With coverage
uvx ruff check . # Lint
uvx ruff format . # Format
# n8n development
docker compose -f docker-compose.n8n.yml up -d # Run n8n locally
uv run python -m nathan.scripts.n8n_workflow_registry --help # Registry CLI
uv run python -m nathan.templating --help # Template CLI
Testing Guidelines
Test structure should mirror source in tests/ directory with descriptive naming (test_trigger_workflow_with_valid_parameters). Use pytest fixtures for shared setup and mock external dependencies. Target 80%+ test coverage.
Validation and Schemas
Use Pydantic models for API requests/responses and SQLModel for database models. Implement input validation at boundaries (API endpoints, CLI arguments) with clear, actionable error messages.
Async Patterns
Use httpx for all HTTP calls with proper timeout handling. Always use try/except for HTTP calls and async with context managers for HTTP clients. Use asyncio.gather() for parallel operations.
Reference Documents
Load these reference files when needed for specific tasks:
- Common Patterns: Load
references/common_patterns.mdfor workflow registry, template rendering, and error handling code examples - Code Review: Load
references/review_checklist.mdbefore submitting code for review - CLI Commands: Load
references/cli_commands.mdfor n8n command-line operations (export, import, execute workflows) - REST API: Load
references/rest_api.mdfor n8n REST API endpoints and Python client examples - Workflow JSON: Load
references/workflow_json_structure.mdfor understanding and building n8n workflow JSON files
Commit Guidelines
Follow conventional commits format:
feat:for new featuresfix:for bug fixesdocs:for documentation changestest:for test additions/changesrefactor:for code refactoring
Make atomic commits (one logical change per commit), test before committing, and include documentation updates with code changes.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
python-scripting
Python scripting with uv and PEP 723 inline dependencies. Use when creating standalone Python scripts with automatic dependency management.
example-skill
This skill should be used when demonstrating skill structure and format. Provides example patterns for creating new skills.
tool-presets
Standardized tool set definitions for Claude Code agents ensuring consistent tool access across similar agent types
file-organizer
Intelligently organizes your files and folders across your computer by understanding context, finding duplicates, suggesting better structures, and automating cleanup tasks. Reduces cognitive load and keeps your digital workspace tidy without manual effort.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
database-optimization
SQL query optimization and database performance specialist. Use when optimizing slow queries, fixing N+1 problems, designing indexes, implementing caching, or improving database performance. Works with PostgreSQL, MySQL, and other databases.
Didn't find tool you were looking for?