sandgardenhq/sgai/incorporate-snippets

Claude Code and agent skill by sandgardenhq/sgai

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Guide for adding new code snippets to the library; When you need to add a new code snippet to the sgai_find_snippets library, when creating files without proper metadata, when using incorrect filenames or extensions, when adding code without extensive comments

Install

npx vskill@latest install sandgardenhq/sgai/incorporate-snippets

SKILL.md

Incorporate Snippets

Overview

This skill guides the process of incorporating new code snippets into the sgai_find_snippets library. It ensures snippets are properly formatted and stored for future retrieval.

When to Use

Use this skill when:

  • Adding a new code snippet to the sgai_find_snippets library
  • Creating snippet files without frontmatter metadata
  • Using filenames with spaces, special characters, or wrong extensions
  • Adding code without extensive explanatory comments
  • Missing required fields like language, description

The Process

Phase 1: Gather Snippet Information
  • Ask for the programming language
  • Ask for the snippet name (brief, descriptive)
  • Ask for a single-line description
  • Ask for when to use the snippet
  • Ask for the code snippet itself
Phase 2: Validate Snippet
  • Check that all required fields are provided
  • Sanitize filename: convert to kebab-case, remove special characters
  • Ensure the code is syntactically correct for the language using language-specific validation
  • Verify the snippet follows best practices
  • Check for filename conflicts and resolve (append -2, -3, etc.)
Phase 3: Save Snippet
  • Generate the filename: kebab-case-name.extension
  • Create the sgai/snippets/{language}/ directory if missing (use the overlay directory, not .sgai/)
  • Write the frontmatter and code in the correct format
  • Confirm successful addition

Syntax Validation by Language

LanguageValidation CommandNotes
JavaScript/TypeScriptnode -c <filename>Checks syntax
Pythonpython -m py_compile <filename>Compiles to check syntax
Gogo build -o /dev/null <filename>Builds to check syntax
Rustrustc --emit=dep-info <filename>Checks syntax
Javajavac <filename>Compiles to check syntax

Filename Generation

  • Convert name to kebab-case: "Error Handling" → "error-handling"
  • Remove special characters: "Error Handling!" → "error-handling"
  • Add proper extension based on language
  • If filename exists, append number: error-handling.go, error-handling-2.go, etc.
  • Ensure directory exists, create if missing

File Format

Snippets must follow this exact format:

---
name: Snippet Name
description: Single line description; When to use this snippet
---
/* Extensive comment explaining the code */
actual_code_goes_here()

Common Mistakes

  • Creating files without frontmatter metadata
  • Using filenames with spaces or special characters
  • Missing extensive comments explaining the code
  • Not validating syntax before adding
  • Forgetting to create the language directory
  • Not checking for filename conflicts

Important Notes

  • Filenames should be kebab-case versions of the name
  • Extensions should match the language (e.g., .go, .js, .py)
  • Comments should be comprehensive but concise
  • Test snippets before adding if possible

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
124
Repository forks
7
7-day trend score
24

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 27 Mar 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/sandgardenhq/sgai/incorporate-snippets/badge)](https://verified-skill.com/skills/sandgardenhq/sgai/incorporate-snippets)

Something wrong with this skill or its page? Tell us.