Inject Call-to-Action blocks into Astro site content with intelligent placement strategies. Use when the user wants to add CTAs, newsletter signups, product promotions, or any content blocks to blog posts. Supports multiple placement strategies (end, after 50%, after 60%), content scoring for relevance, and dry-run preview.
npx skills add https://github.com/nicepkg/ai-workflow --skill astro-cta-injector
This skill injects Call-to-Action (CTA) blocks into Astro site content. It supports:
.astro or .md filesCreate a config.json in the skill directory:
{
"content_path": "./src/content/blog",
"file_patterns": ["*.astro", "*.md"],
"cta_types": {
"newsletter": {
"template": "newsletter.html",
"default_placement": "after-paragraph-50%",
"keywords": ["tip", "guide", "learn", "strategy"]
},
"product": {
"template": "product.html",
"default_placement": "end",
"keywords": ["productivity", "task", "habit", "goal"]
}
},
"output": {
"state_file": "./state/cta_injection_progress.json",
"backup_dir": "./backups",
"report_file": "./reports/cta_injection_report.md"
},
"dry_run": true
}
| Strategy | Description | Best For |
|----------|-------------|----------|
| end | After all content | Non-intrusive CTAs |
| after-paragraph-50% | After 50% of paragraphs | Mid-content engagement |
| after-paragraph-60% | After 60% of paragraphs | Later engagement |
| after-heading | After first H2 | Early engagement |
| before-conclusion | Before last paragraph | Strong finish |
Templates are HTML files in the templates/ directory:
<!-- templates/newsletter.html -->
<aside class="cta-newsletter" data-cta-type="newsletter">
<h3>{{title}}</h3>
<p>{{description}}</p>
<form action="{{form_url}}" method="post">
<input type="email" placeholder="Your email" required />
<button type="submit">Subscribe</button>
</form>
</aside>
Variables:
{{title}} - CTA headline{{description}} - CTA body text{{form_url}} - Form submission URL{{product_url}} - Product link{{image_url}} - Image sourcepython scripts/score_posts.py --content-path ./src/content/blog --cta-type newsletter
python scripts/preview_injection.py --input scored_posts.json --cta-type newsletter
python scripts/inject_ctas.py --input scored_posts.json --cta-type newsletter
Scored posts JSON:
{
"posts": [
{
"file_path": "./src/content/blog/my-post.astro",
"title": "My Blog Post",
"relevance_score": 8.5,
"cta_type": "newsletter",
"placement": "after-paragraph-50%",
"cta_data": {
"title": "Get More Tips Like This",
"description": "Subscribe to my weekly newsletter"
}
}
]
}
Posts are scored for CTA relevance based on:
Scores range from 0-10. Default threshold: 5.0
User: "Add a newsletter signup CTA to all my productivity-related blog posts"
Claude will:
You are an expert copy editor specializing in marketing and conversion copy. Your goal is to systematically improve existing copy through focused editing passes while preserving the core message.
Write rigorous, conversion-focused marketing copy for landing pages and emails. Enforces brief confirmation and strict no-fabrication rules.
Write and add new blog posts for this Next.js site by matching the existing BlogPost structure in `src/lib/blog-data.ts`. Use when asked to draft a new blog article, update blog content, or produce SEO metadata/slug/image details for a new post.
Adds multi-language support to Next.js websites with proper SEO configuration including hreflang tags, localized sitemaps, and language-specific content. Use when adding new languages, setting up i18n, optimizing for international SEO, or when user mentions localization, translation, multi-language, or specific languages like Japanese, Korean, Chinese.
LinkedIn post writing with hook formulas, formatting rules, and engagement patterns. Covers post types, algorithm signals, character limits, and content pillars. Use for: LinkedIn posts, professional content, thought leadership, B2B content, personal branding. Triggers: linkedin post, linkedin content, linkedin writing, linkedin strategy, linkedin engagement, linkedin algorithm, linkedin hook, linkedin formatting, thought leadership, professional content, b2b content, linkedin growth
| Write and rewrite marketing copy for landing pages, homepages, and ads. Useful as a copy chief partner during launches.
Automates the complete Xiaohongshu (XHS / Little Red Book) content operation workflow: pain-point topic collection → style case collection → topic selection → content writing → publishing → performance tracking. Use when user mentions xiaohongshu auto posting, xhs auto post, little red book posting, xiaohongshu post, xiaohongshu auto posting, xiaohongshu content operations, xhs content marketing, post to xiaohongshu, publish on xhs, post on xiaohongshu, xiaohongshu promotion, xiaohongshu operations, xiaohongshu automation, xhs automation, track xhs performance, track xiaohongshu performance, xiaohongshu data tracking, xiaohongshu analytics, switch xhs account, update xhs keywords.
电商图片文案创作技能,支持多品类产品的吸引性文案生成,适用于电商平台的商品营销推广
Take nicepkg/astro-cta-injector from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.