cmd/sgai/skel/.sgai/skills/incorporate-snippets/SKILL.md
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
npx skillsauth add sandgardenhq/sgai incorporate-snippetsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Use this skill when:
sgai/snippets/{language}/ directory if missing (use the overlay directory, not .sgai/)| Language | Validation Command | Notes |
|----------|-------------------|-------|
| JavaScript/TypeScript | node -c <filename> | Checks syntax |
| Python | python -m py_compile <filename> | Compiles to check syntax |
| Go | go build -o /dev/null <filename> | Builds to check syntax |
| Rust | rustc --emit=dep-info <filename> | Checks syntax |
| Java | javac <filename> | Compiles to check syntax |
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()
documentation
Start, stop, and steer agentic sessions in sgai workspaces. Use when you need to launch AI agent sessions, halt running sessions, or inject steering instructions to guide the agent mid-execution without stopping it.
development
Monitor sgai workspace status, events, progress, diffs, and workflow diagrams. Use when you need to observe what agents are doing, track progress, get the current state of all workspaces, subscribe to real-time updates via SSE, or inspect code changes.
development
Access agents, skills, and code snippets available in sgai workspaces. Use when you need to discover what agents are defined in a workspace, browse available skills, get skill instructions, find code snippets by language, or retrieve snippet content for a specific task.
data-ai
Handle agent questions and work gates in sgai workspaces. Use when an agent is blocked waiting for human input, when you need to respond to multi-choice questions, approve work gates, or provide free-text answers to agent queries.