# Generate Code Snippet

> Generate a concise, shareable code snippet URL for code.franciscomoretti.com. Use when preparing a code image or short snippet for Twitter, X, social sharing, or a presentation.

- Skill: `franciscomoretti/generate-code-snippet` (Agent Skill)
- Install (CLI): `npx skillmds@latest add franciscomoretti/generate-code-snippet`
- Raw SKILL.md: https://api.skillmd.com/api/skills/franciscomoretti/generate-code-snippet/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: franciscomoretti (https://skillmd.com/u/franciscomoretti)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/franciscomoretti/generate-code-snippet

---


# Generate a shareable code snippet

- Keep the snippet to 15 lines unless requested otherwise.
- Show one self-contained concept with real imports and a short opening comment.
- Prefer `tsx`; use `shell` or `json` when appropriate.

Base64url-encode the snippet without padding, then construct:

```text
https://code.franciscomoretti.com/#code=<base64url>&theme=sparka&darkMode=true&padding=64&language=<language>
```

Return the snippet in a fenced code block and the complete URL.

