ワンクリックで
snippets
MUST use when user asks to create, edit, manage, or share snippets, or asks how snippets work
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
MUST use when user asks to create, edit, manage, or share snippets, or asks how snippets work
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | snippets |
| description | MUST use when user asks to create, edit, manage, or share snippets, or asks how snippets work |
Reusable text blocks expanded via #hashtag in messages.
~/.config/snippets/*.md (shared across all coding agents).pi/snippets/*.md (preferred, overrides global).pi/snippet/*.md (also loaded, but .pi/snippets/ takes priority)~/.config/snippets/config.jsonc.pi/snippets/config.jsonc (merges with global, project takes priority).pi/snippet/config.jsonc (also loaded)IMPORTANT: When modifying snippet configuration:
~/.config/snippets/logs/daily/YYYY-MM-DD.logAll boolean settings accept: true, false, "enabled", "disabled"
Full config example with all options:
{
// Logging settings
"logging": {
// Enable debug logging to file
// Logs are written to ~/.config/snippets/logs/daily/
// Default: false
"debug": false
},
// Experimental features (may change or be removed)
"experimental": {
// Enable <inject>...</inject> blocks for persistent context messages
// Default: false
"injectBlocks": false,
// Enable skill rendering with <skill>name</skill> syntax
// Default: false
"skillRendering": false
},
// Hide shell command in output, showing only the result
// Default: false
"hideCommandInOutput": false
}
---
aliases:
- short
- alt
description: Optional
---
Content here
Frontmatter optional. Filename (minus .md) = primary hashtag.
#other - include another snippet (recursive, max 15 depth)!`cmd` - shell substitution, output injectedMove content to message start/end instead of inline. Best for long reference material that breaks writing flow.
---
aliases: jira
---
Jira MCP
<prepend>
## Jira Field Mappings
- customfield_16570 => Acceptance Criteria
- customfield_11401 => Team
</prepend>
Input: Create bug in #jira about leak
Output: Prepended section at top + Create bug in Jira MCP about leak.
Use <append> for reference material at end. Content inside blocks should use ## headings.
Add persistent context that the LLM sees throughout the entire agentic loop, without cluttering the visible message.
---
aliases: safe
---
Think step by step.
<inject>
IMPORTANT: Double-check all code for security vulnerabilities.
Always suggest tests for any implementation.
</inject>
Input: Review this code #safe
Output: User sees "Review this code Think step by step." but the LLM also receives the inject content as separate context that persists for the entire conversation turn.
Use for rules, constraints, or context that should influence all responses without appearing inline.
Enable in config:
{
"experimental": {
"injectBlocks": true
}
}
Inline skills directly into messages using XML tags:
Create a Jira ticket. <skill>jira</skill>
<!-- or -->
<skill name="jira" />
Enable in config:
{
"experimental": {
"skillRendering": true
}
}
/snippet add <name> [content] - create global snippet/snippet add --project <name> - create project snippet/snippet list - show all available/snippet delete <name> - remove snippetShort, focused, single-purpose. Examples:
# careful.md
---
aliases: safe
---
Be careful, autonomous, and ONLY do what I asked.
# context.md
---
aliases: ctx
---
Project: !`basename $(pwd)`
Branch: !`git branch --show-current`
Compose via includes: #base-rules inside #project-config.
Share to GitHub Discussions: https://github.com/JosXa/opencode-snippets/discussions/categories/snippets
When user wants to share:
gh --version worksgh api graphql -f query='mutation($repoId: ID!, $catId: ID!, $title: String!, $body: String!) { createDiscussion(input: {repositoryId: $repoId, categoryId: $catId, title: $title, body: $body}) { discussion { url } } }' -f repoId="R_kgDOQ968oA" -f catId="DIC_kwDOQ968oM4C1Qcv" -f title="filename.md" -f body="<body>"
Body format:
## Snippet Content
\`\`\`markdown
<full snippet file content>
\`\`\`
## When do you use it?
<user's answer>
https://github.com/JosXa/opencode-snippets/discussions/new?category=snippets&title=<url-encoded-filename>.md
Ask user (without question tool) for "When do you use it?" info. Tell them to paste snippet in markdown fence.