Documentation

n8n-nodes-agent-skills

Community node package for skill-driven AI workflows in n8n.

It provides a secure, structured repository of instructions (skills) that AI Agents can query at runtime to guide their reasoning, tool usage, and behaviors.

This package provides two nodes:

  1. Agent Skills Tool: Exposes your skills library to an AI Agent as a single tool with structured read/write actions.
  2. Agent Skills Cache Builder: A trigger/maintenance node that scans for updates and keeps skill metadata and content warm in cache.

Key Features & Enhancements

  • Read/Write AI Tool: Unlike basic read-only libraries, the AI Agent can call create_skill and update_skill to programmatically expand and refine its own instructions directly in your repository.
  • Automatic Bootstrapping: In Local Folder mode, if the directory is empty, the node automatically initializes a structured template with sample skills (such as sql-query-builder and email-drafting) to let you start immediately.
  • Multi-Cloud & Local Storage: Manage your skills library using local filesystem folders, Google Drive, or Microsoft OneDrive.
  • L1/L2 Adaptive Caching: Features a fast process-level in-memory L1 cache and a persistent L2 static data cache in n8n for high reliability across restarts and minimal API call overhead.

Installation

To install this community node in your self-hosted n8n instance:

  1. Go to Settings > Community Nodes.
  2. Click Install a new node.
  3. Enter n8n-nodes-agent-skills and accept the terms.
  4. Click Install.

Nodes Overview

1. Agent Skills Tool

Place this node and connect its AI Tool output to an Advanced AI Agent node.

Node Parameters:

  • Source: Select where your skills are stored:
    • Local Folder: Path on the local machine (e.g. /data/skills).
    • Google Drive: Target folder in Google Drive (requires Google Drive credentials).
    • OneDrive: Target folder in Microsoft OneDrive (requires OneDrive credentials).
    • Manual: Inline skill defined directly inside the node properties.
  • Allowed Skills: (Optional) Restrict which skills from the folder are visible to the agent.
  • Local Folder Path: (Local Folder only) Path to the root directory where skills are stored.

Tool Actions available to the AI Agent:

  • get_skill(name): Read the full content of a skill by name.
  • list_skill_resources(name): Lists any attached resource files (e.g. database schemas, guidelines) inside the skill folder.
  • get_skill_resource(name, resourcePath): Fetch the text content of a specific resource file.
  • create_skill(name, content, resources?): Dynamically write a new skill directory containing SKILL.md (and optional files).
  • update_skill(name, content): Overwrite the SKILL.md content for an existing skill.

2. Agent Skills Cache Builder

A trigger node that performs maintenance scans to keep the L2 static data cache warm.

Recommended Setup:

  1. Connect a Schedule Trigger to the input of the Agent Skills Cache Builder.
  2. Configure it to run on a regular interval (e.g. every 10 minutes or hourly).
  3. Whenever files are added or modified in Google Drive, OneDrive, or local folders, the builder performs a delta scan, writes updates into n8n's persistent static storage, and clears out-of-date entries.

File Structure of a Skill

Each skill is represented by a folder containing a SKILL.md file:

/data/skills/
  ├── sql-query-builder/
  │     ├── SKILL.md
  │     └── examples/
  │           └── schema.sql
  └── email-drafting/
        └── SKILL.md

SKILL.md Format:

The skill file supports standard Markdown and optional frontmatter header to override the skill metadata:

---
name: sql-query-builder
description: Generates optimized SQL queries from natural language
resources:
  - examples/schema.sql
---
# SQL Query Builder Instructions
You are a SQL expert helper...

License

MIT

Discussion