code-card-news-generator — Claude Code skill: code cards
code-card-news-generator turns a topic and a list of functions into PNG cards with highlighted code: one title card plus one per item, for tutorials.
no license 1 installs ★ 946 updated 2026-06-22
npx skills add bear2u/my-skills --skill code-card-news-generator -a claude-codeWhat code-card-news-generator does
The skill runs a short interview first: which library or concept, and which functions to cover. For each item it drafts a description, a code sample and a short explanation, then hands the whole block to python3 auto_code_generator.py through a heredoc. You get a title card and numbered PNGs such as react_router_00_title.png and react_router_01.png.
Cards come out at 1080x1080 on a dark #1a1a1a background with a pink #ff6b9d accent; code sits in a bordered box on #2d2d2d. Pipes in the title line alternate white and pink, and a subtitle is optional. The bundled Cafe24Ssurround covers headings, code falls back to Menlo or Monaco. For a single card, call generate_code_card.py title or generate_code_card.py explain directly.
You need Python 3 and the scripts in the folder you run from. Nothing renders without auto_code_generator.py beside you. Layout is fixed, so the skill tells you to keep samples at 5–7 lines and trim the prose when a card overflows.
What it helps with
- build a card series explaining React Router hooks
- get a title slide with a two-tone heading
- show a code sample with syntax highlighting on a dark card
- render one card for a single function
- produce square 1080x1080 images for Instagram
Example prompts for the agent
- Make explanation cards for React Router hooks:
useNavigate,useParams,useLocation. - Generate a title card with
React|Router|Hooksand the subtitleNavigation Made Easy. - Build a single card for
useStatewith a code sample and an explanation.
How to install code-card-news-generator
1Skills CLI (Vercel)
npx skills add bear2u/my-skills --skill code-card-news-generator -a claude-code2Manually: put the files in place
~/.claude/skills/code-card-news-generator/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/code-card-news-generator/
1Skills CLI (Vercel)
npx skills add bear2u/my-skills --skill code-card-news-generator -a codex2Manually: put the files in place
.agents/skills/code-card-news-generator/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add bear2u/my-skills --skill code-card-news-generator -a cursor2Manually: put the files in place
.cursor/skills/code-card-news-generator/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install bear2u/my-skills backup/code-card-news-generator/SKILL.md2Manually: put the files in place
.github/skills/code-card-news-generator/SKILL.md1Skills CLI (Vercel)
npx skills add bear2u/my-skills --skill code-card-news-generator -a gemini-cli2Platform CLI
gemini skills install https://github.com/bear2u/my-skills --path backup/code-card-news-generatorManually: put the files in place
.devin/skills/code-card-news-generator/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add bear2u/my-skills --skill code-card-news-generator -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about code-card-news-generator
How do I install code-card-news-generator in Claude Code?
Run npx skills add bear2u/my-skills --skill code-card-news-generator -a claude-code. The skill lands at ~/.claude/skills/code-card-news-generator/SKILL.md.
What does code-card-news-generator do?
It produces PNG cards with highlighted code: a title card plus one card per function, each with a description and an explanation of the sample.
Does it need anything besides the skill itself?
Python 3, plus auto_code_generator.py or generate_code_card.py in the folder you run it from.