Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
21
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm run build # Full build: clean dist, compile TypeScript, copy icons npm run dev # Watch mode for TypeScript compilation npm run format # Format code with Prettier npm run lint # Lint code with ESLint npm run lintfix # Auto-fix ESLint issues npm run prepublishOnly # Pre-publish checks: build + strict lint
npm test # Run unit tests npm run test:watch # Run tests in watch mode npm run test:unit # Run unit tests (explicit) npm run test:unit:watch # Watch unit tests during development
npm test -- <test-file-name> # Run specific test file npm test -- --testNamePattern="<name>" # Run tests matching pattern
This is an n8n community node package that provides Substack API integration. The project follows n8n's node development patterns with a modular resource-based architecture.
nodes/Substack/Substack.node.ts - Central node implementation that routes operations to resource handlersSubstackUtils.ts - Client initialization, caching, response validation, and error handling.fields.ts and .operations.ts filescredentials/SubstackApi.credentials.ts - API authentication configurationnodes/Substack/types.ts - TypeScript interfaces for API responsesThe node supports four main resources, each with dedicated modules:
Profile (
Profile.fields.ts, Profile.operations.ts)
Post (
Post.fields.ts, Post.operations.ts)
Note (
Note.fields.ts, Note.operations.ts)
MarkdownParser.ts for content transformationComment (
Comment.fields.ts, Comment.operations.ts)
IStandardResponse with consistent success, data, error structureNodeOperationError with proper item indexing and continueOnFail supportThe project uses Jest with a comprehensive mocking strategy:
tests/unit/, no integration testssubstack-api module using jest.mock()mockSubstackClient.ts: Mocks the SubstackClient with method chainsmockExecuteFunctions.ts: Simulates n8n's IExecuteFunctions interfacemockData.ts: Static fixtures matching Substack API formatdist/ directory with proper n8n package structurenpm run dev for TypeScript watch mode during developmentnpm run test:watch for continuous testingnpm run lint to check code stylenpm run build before publishing to ensure clean compilationprepublishOnly script runs additional strict linting checks