Skip to content

feat: add skills#241

Open
Puppo wants to merge 1 commit into
nearform:masterfrom
Puppo:feat/add-nearform-sql-skill
Open

feat: add skills#241
Puppo wants to merge 1 commit into
nearform:masterfrom
Puppo:feat/add-nearform-sql-skill

Conversation

@Puppo

@Puppo Puppo commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces comprehensive documentation for the nearform-sql skill, providing guidance and best practices for using the @nearform/sql library to write secure, parameterized SQL queries in Node.js. The documentation covers installation, API usage, integration patterns (including with Fastify), and security considerations. These additions are intended to help engineers adopt safe SQL practices and leverage the library's advanced features.

Skill documentation and guides:

  • Added SKILL.md to document the nearform-sql skill, including an overview, installation instructions, core usage patterns, helper functions, and a best practices checklist for preventing SQL injection and writing robust queries.
  • Added references/api-cheatsheet.md with a concise API reference for @nearform/sql, detailing the statement object, helper methods (glue, map, quoteIdent, unsafe), and important caveats such as the handling of undefined values.
  • Added references/patterns.md with practical recipes and integration examples, including Fastify setup, dynamic query construction (conditional WHERE, dynamic SET, bulk INSERT, IN lists), safe handling of identifiers, and anti-patterns to avoid in code review.

Ports the nearform-sql skill from the nearform/skills marketplace
(plugins/nearform-sql/) into this repo at skills/nearform-sql/, so that
`npx skills add nearform/sql` installs it directly.

The skills/ root is one of the two layouts universally discovered by the
vercel-labs/skills CLI (the other being a SKILL.md at the repo root), so the
skill is harness-neutral and works under Claude Code, Cursor, Codex, Kiro,
Windsurf, and ~50 other agents without per-vendor mirroring.

Files:
- SKILL.md: when-to-use, install/import, golden rule, statement-object getters
  table, composing queries, best-practices checklist.
- references/api-cheatsheet.md: getters, glue, map, quoteIdent, unsafe,
  deprecated append, undefined-throws gotcha.
- references/patterns.md: Fastify integration, dynamic WHERE/UPDATE, bulk
  INSERT, IN-lists, identifier migration recipes, anti-patterns table.
@github-actions

Copy link
Copy Markdown

No linked issues found. Please add the corresponding issues in the pull request description.
Use GitHub automation to close the issue when a PR is merged

@Puppo
Puppo marked this pull request as ready for review July 23, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant