gemini-blog
БесплатноБез исполняемых скриптовНе проверенConfigure or debug LLM blog post generation using Vercel AI SDK and Google Gemini. Use when updating blog generation prompts, fixing AI integration issues…
от majiayu000★ 31 звезда на GitHubОб этом скилле
Gemini Blog Generation Skill
Blog generation package: packages/ai/
Architecture
packages/ai/
├── src/
│ ├── generate-post.ts # 2-step generation (analysis → structured output)
│ ├── config.ts # System instructions
│ ├── schemas.ts # Zod schemas (postSchema, highlightSchema)
│ ├── tags.ts # Tag constants (CARS_TAGS, COE_TAGS)
│ ├── hero-images.ts # Hero image URLs
│ └── save-post.ts # Post persistence with idempotency
2-Step Flow
- Step 1 (Analysis):
generateText()+ Code Execution Tool + Extended Thinking → Accurate calculations - Step 2 (Generation):
generateObject()+ Zod schema → Type-safe structured output
Key Functions
// Standalone generation
import { generateBlogContent } from "@sgcarstrends/ai";
const { object } = await generateBlogContent({
data: tokenisedData, // Pipe-delimited data
month: "October 2024",
dataType: "cars", // "cars" or "coe"
});
// object.title, object.excerpt, object.content, object.tags, object.highlights
Schemas
// postSchema
z.object({
title: z.string().max(100), // SEO title, max 60 chars preferred
excerpt: z.string().max(500), // Meta description, under 300 chars
content: z.string(), // Markdown (no H1)
tags: z.array(z.string()).min(1).max(10), // 3-5 tags, first is dataType
highlights: z.array(highlightSchema), // 3-6 key statistics
});
// highlightSchema
z.object({
value: z.string(), // "52.60%", "$125,000"
label: z.string(), // "Electric Vehicles Lead"
detail: z.string(), // "2,081 units registered"
});
Tag Constants
export const CARS_TAGS = ["Cars", "Registrations", "Fuel Types", "Market Trends", ...] as const;
export const COE_TAGS = ["COE", "Quota Premium", "1st Bidding Round", "PQP", ...] as const;
Updating Prompts
Edit packages/ai/src/config.ts:
ANALYSIS_INSTRUCTIONS: For calculation logicGENERATION_INSTRUCTIONS: For output format
Debugging
Low Quality Output: Check Step 1 analysis logs, verify Code Execution Tool runs Python
Schema Validation Errors: Check Zod constraints (max lengths, array bounds)
API Errors: Verify GOOGLE_GENERATIVE_AI_API_KEY, check quota
Environment Variables
GOOGLE_GENERATIVE_AI_API_KEY=... # Required
LANGFUSE_PUBLIC_KEY=pk-lf-... # Optional telemetry
LANGFUSE_SECRET_KEY=sk-lf-...
Best Practices
- Always use 2-step flow: Separate analysis from generation
- Never skip Code Execution: Required for accurate calculations
- Use tag constants: Maintain vocabulary consistency
- Enable telemetry: Track costs and quality
References
packages/ai/CLAUDE.mdfor full package documentation- Vercel AI SDK: Use Context7 for latest docs
Установить gemini-blog в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadEditGrepGlobBashВложенные файлы
FAQ
Что делает скилл gemini-blog?
Configure or debug LLM blog post generation using Vercel AI SDK and Google Gemini. Use when updating blog generation prompts, fixing AI integration issues, modifying content generation logic, or working with structured output schemas.
Как установить скилл gemini-blog?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл gemini-blog запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic