cmd/sgai/skel/.sgai/skills/how-to-use-code-snippets/SKILL.md
Use when you need to find code snippets by language and query. When looking for code examples, patterns, or snippets in a specific programming language. When you need to search for code snippets quickly. When searching for code patterns or best practices.
npx skillsauth add sandgardenhq/sgai how-to-use-code-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.
The sgai_find_snippets tool allows you to search for code snippets using a specific programming language and a query string. It returns relevant code examples that match your search criteria, helping you find patterns, best practices, and implementations quickly.
Use sgai_find_snippets when:
| Parameter | Description | Example | |-----------|-------------|---------| | language | Programming language | 'python', 'javascript', 'java' | | query | Search query | 'sort list', 'array methods', 'file io' |
To use sgai_find_snippets, call the tool with the language and query parameters.
Example:
sgai_find_snippets language='python' query='list comprehension'
This will return Python code snippets related to list comprehensions.
Using sgai_find_snippets helps you find relevant code examples quickly, saving time on manual searches or writing code from scratch. It improves productivity by providing instant access to proven patterns and implementations.
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.