Skip to main content

Skills Library - AI Tooling

@n8n-as-code/skills is an internal library in packages/skills. It is the source of truth for AI-facing tooling in this monorepo, but it is not the primary public entrypoint. Users and agents are expected to go through n8nac skills.

๐ŸŽฏ What This Package Actually Ownsโ€‹

The current package is responsible for four things:

  1. Exposing the full n8nac skills command group used by agents and developers.
  2. Providing programmatic services such as AiContextGenerator and node/documentation lookup.
  3. Generating AI context files such as AGENTS.md and editor snippets.
  4. Building Claude-specific adapter artifacts from the same shared instruction source.

There is no separate packages/claude-skill/ package anymore. Claude distribution is generated from this package.

๐Ÿ—๏ธ Package Layoutโ€‹

packages/skills/
โ”œโ”€โ”€ src/
โ”‚ โ”œโ”€โ”€ commands/ # n8nac skills subcommand registration
โ”‚ โ”œโ”€โ”€ services/ # AiContextGenerator and related services
โ”‚ โ””โ”€โ”€ assets/ # Generated node/doc indexes copied to dist/
โ”œโ”€โ”€ scripts/
โ”‚ โ””โ”€โ”€ build-claude-adapter.js # Builds Claude adapter artifacts
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ dist/
โ”‚ โ”œโ”€โ”€ assets/
โ”‚ โ””โ”€โ”€ adapters/claude/ # Built Claude adapter output
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ package.json

๐Ÿ”Œ Public vs Internal Entry Pointsโ€‹

Public entry pointโ€‹

The supported interface for humans and agents is:

npx --yes n8nac skills --help

Typical commands include:

npx --yes n8nac skills search "google sheets"
npx --yes n8nac skills node-info googleSheets
npx --yes n8nac skills node-schema httpRequest
npx --yes n8nac skills examples search "slack notification"
npx --yes n8nac skills validate my-workflow.workflow.ts
npx --yes n8nac skills update-ai

Internal APIโ€‹

@n8n-as-code/skills is still consumable as a TypeScript dependency inside the monorepo:

import { AiContextGenerator, SnippetGenerator } from '@n8n-as-code/skills';

const aiGenerator = new AiContextGenerator();
await aiGenerator.generate('./project-root', '2.2.6');

const snippetGenerator = new SnippetGenerator();
await snippetGenerator.generate('./project-root');

Use the library API only from packages in this repository or tightly controlled integrations. User-facing documentation should prefer n8nac skills.

๐Ÿง  Core Servicesโ€‹

Command registrationโ€‹

The package registers the n8nac skills subcommand tree consumed by the CLI package. This is the main operational surface for node search, technical schemas, docs lookup, guide discovery, workflow examples, validation, and AI context refresh.

AiContextGeneratorโ€‹

AiContextGenerator produces the canonical instructions reused across AI surfaces. Its responsibilities now include:

  • Generating and updating AGENTS.md
  • Emitting the shared research protocol used by agents
  • Defining canonical TypeScript workflow examples
  • Producing the Claude adapter SKILL.md through getSkillContent()

This shared generator is the reason AGENTS.md and the Claude adapter stay aligned.

SnippetGeneratorโ€‹

SnippetGenerator writes .vscode/n8n.code-snippets from the node index and fallback templates.

Indexed data assetsโ€‹

The build copies generated indexes into dist/assets/, including technical schemas, documentation, and the unified search index used by search, node-info, docs, guides, related, and validate.

๐Ÿ“ Generated Outputsโ€‹

AI context filesโ€‹

n8nac skills update-ai generates or refreshes:

  • AGENTS.md
  • .vscode/n8n.code-snippets

AGENTS.md is updated in-place using markers so user-authored content outside the managed block is preserved.

Claude adapter artifactsโ€‹

The same package also builds Claude artifacts under packages/skills/dist/adapters/claude/, including:

  • n8n-architect/SKILL.md
  • n8n-architect/README.md
  • install.sh

The build script also mirrors SKILL.md into the plugin distribution tree under plugins/claude/....

๐Ÿ”„ Integration With Other Packagesโ€‹

n8nacโ€‹

n8nac depends on @n8n-as-code/skills and forwards its command surface under n8nac skills.

VS Code extensionโ€‹

The VS Code extension depends on the same package for AI context generation and node-aware assistance.

Claude adapterโ€‹

Claude-specific distribution is not an independent package. It is a build artifact generated from packages/skills/scripts/build-claude-adapter.js using AiContextGenerator.getSkillContent().

๐Ÿงช Build And Testโ€‹

Build the packageโ€‹

cd packages/skills
npm run build

This compiles TypeScript and copies JSON assets into dist/assets/.

Build the Claude adapterโ€‹

cd packages/skills
npm run build:adapters

At the workspace root, the compatibility script is:

npm run build:claude-plugin

Run testsโ€‹

cd packages/skills
npm test

Key coverage includes AiContextGenerator behavior and the expectation that generated guidance uses npx --yes n8nac skills.

๐Ÿ“Œ Contribution Notesโ€‹

  • Do not document @n8n-as-code/skills as a standalone end-user CLI.
  • Do not reintroduce references to get if the real command is node-info or node-schema.
  • Keep AI guidance centered on TypeScript workflows, not legacy JSON-only examples.
  • Treat Claude adapter content as derived from the shared generator, not as hand-maintained standalone instructions.

The Skills CLI enables AI assistants to work effectively with n8n workflows by providing comprehensive context, validation, and code generation capabilities.