Agent skill

Astro Cta Injector

by nicepkg in nicepkg/ai-workflow

Inject Call-to-Action blocks into Astro site content with intelligent placement strategies.

MITAuto-check passedWriting & Content

Install Astro Cta Injector

skills CLI
$ npx skills add nicepkg/ai-workflow --skill astro-cta-injector -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install nicepkg/ai-workflow astro-cta-injector --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/nicepkg/ai-workflow.git skills-src && mkdir -p .claude/skills && cp -r skills-src/workflows/content-creator-workflow/.claude/skills/astro-cta-injector .claude/skills/astro-cta-injector && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
astro-cta-injector
GitHub stars
285
Token cost
~1.1k tokens
SKILL.md length
328 words
Files
8 (incl. scripts)
Skills in repo
61
Repo updated
First seen
Licence
MIT

At a glance

Inject Call-to-Action blocks into Astro site content with intelligent placement strategies.

  • Works in 3 steps: Score Posts for Relevance → Preview Injections → Apply Injections
  • The user wants to add CTAs
  • SKILL.md covers Purpose, When to Use This Skill, Prerequisites and Configuration, plus 7 more sections
  • Runs Python scripts from its folder; calls python

What it does

Astro Cta Injector is an agent skill from nicepkg/ai-workflow. 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.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts (for example `config.example.json`, `reference.md` and `scripts/inject_ctas.py`).

It sits in Writing & Content, covering Static sites and blogs, Blog and article writing and Newsletters. It works with Astro. The repository describes itself as: 🚀 170+ pre-built skills for Claude Code, Cursor, Codex & 14+ AI tools. Stop re-teaching your AI the same things. One command → instant domain expertise. Marketing, SEO, Trading… The licence is MIT.

When your agent uses it

  • The user wants to add CTAs
  • Newsletter signups
  • Product promotions
  • Any content blocks to blog posts

Example prompts

  • “/astro-cta-injector”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Score Posts for Relevance
  2. Preview Injections
  3. Apply Injections

What it can do on your machine

Read from SKILL.md and the folder at commit d167b41. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Astro Cta Injector loads about 1.1k tokens when it runs. Until then it costs about 86 tokens; SKILL.md has 328 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~86
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from nicepkg/ai-workflow at commit d167b41, republished under its MIT licence (© nicepkg). 328 words, ~1,129 tokens.

Download SKILL.mdSave it as .claude/skills/astro-cta-injector/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
astro-cta-injector
description
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.

Astro CTA Injector Skill

Purpose

This skill injects Call-to-Action (CTA) blocks into Astro site content. It supports:

  • Multiple CTA types (newsletter, product, custom)
  • Intelligent placement strategies
  • Content-based relevance scoring
  • Batch processing with preview

When to Use This Skill

  • User asks to "add CTAs to blog posts"
  • User wants to "inject newsletter signup" into content
  • User mentions "add product promotion" to posts
  • User needs to batch-add any type of content block to posts
  • User wants to "add calls to action" to their Astro site

Prerequisites

  • Astro site with content in .astro or .md files
  • Python 3.10+
  • BeautifulSoup4 for HTML parsing

Configuration

Create a config.json in the skill directory:

json
{
  "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
}

Placement Strategies

StrategyDescriptionBest For
endAfter all contentNon-intrusive CTAs
after-paragraph-50%After 50% of paragraphsMid-content engagement
after-paragraph-60%After 60% of paragraphsLater engagement
after-headingAfter first H2Early engagement
before-conclusionBefore last paragraphStrong finish

CTA Templates

Templates are HTML files in the templates/ directory:

html
<!-- 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 source

Workflow

Step 1: Score Posts for Relevance
bash
python scripts/score_posts.py --content-path ./src/content/blog --cta-type newsletter
Step 2: Preview Injections
bash
python scripts/preview_injection.py --input scored_posts.json --cta-type newsletter
Step 3: Apply Injections
bash
python scripts/inject_ctas.py --input scored_posts.json --cta-type newsletter

Input Format

Scored posts JSON:

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"
      }
    }
  ]
}

Scoring Algorithm

Posts are scored for CTA relevance based on:

  1. Keyword density - How many relevant keywords appear
  2. Content length - Longer posts = better candidates
  3. Topic match - Title and content topic alignment
  4. Existing CTAs - Skip posts that already have CTAs

Scores range from 0-10. Default threshold: 5.0

Safety Features

  • Dry-run mode by default
  • Backup creation before any modifications
  • Duplicate detection - Won't inject if CTA already exists
  • Rollback capability - Restore from backups
  • Preview diffs - See exactly what will change

Example Usage

User: "Add a newsletter signup CTA to all my productivity-related blog posts"

Claude will:

  1. Scan content directory for posts
  2. Score posts for "newsletter" relevance using productivity keywords
  3. Generate CTA HTML from template
  4. Show preview of changes
  5. Ask for confirmation
  6. Inject CTAs into matching posts
  7. Report results

© nicepkg, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (scripts) in workflows/content-creator-workflow/.claude/skills/astro-cta-injector of nicepkg/ai-workflow.

  • SKILL.md
  • config.example.json
  • reference.md
  • scripts/inject_ctas.py
  • scripts/preview_injection.py
  • scripts/score_posts.py
  • templates/newsletter.html
  • templates/product.html

Open the folder on GitHubat commit d167b41

Compare with similar skills

Astro Cta Injector next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Astro Cta Injector compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Astro Cta Injector this skillnicepkg/ai-workflow285—~1.1kAutomated safety check: PassMIT
Publishone-ie/one131—~940Automated safety check: PassCustom licence
BlogAgriciDaniel/claude-blog2.3k1 repos~8.6kAutomated safety check: WarnMIT
Figurevectorize-io/hindsight47k—~1.9kAutomated safety check: PassMIT
Voice Buildercharlie947/social-media-skills3.8k—~3.3kAutomated safety check: PassMIT
Blog Post ProcessorJustin3go/justin3go.com173—~1.5kAutomated safety check: PassCustom licence

Similar skills

  • Publish

    one-ie/one

    Put words on this site — a blog post, a docs page, a product, or a live page from ONE's editor.

    131 GitHub stars~940 tokensUpdated 10 days ago
    Writing & ContentAuto-check passed
  • Blog

    AgriciDaniel/claude-blog

    Full-lifecycle blog engine with 31 sub-skills, 12 content templates, 5-category 100-point scoring, and 5 specialized agents.

    2.3k GitHub starsUsed in 1 repo~8.6k tokens
    Writing & ContentAuto-check: warnings
  • Figure

    vectorize-io/hindsight

    Draw an animated figure (boxes, arrows, moving data) as one self-contained SVG for a GitHub README, PR, issue or blog post.

    47k GitHub stars~1.9k tokensUpdated today
    Writing & ContentAuto-check passed
  • Voice Builder

    charlie947/social-media-skills

    Build a personalised voice profile inside a Codex or Claude project from a short interview plus 3 to 5 sample pieces of writing.

    3.8k GitHub stars~3.3k tokensUpdated 23 days ago
    Writing & ContentAuto-check passed
  • Blog Post Processor

    Justin3go/justin3go.com

    Process Chinese blog posts for the justin3go.com VitePress blog: rename to English slug, add frontmatter and AI summary, and translate to English.

    173 GitHub stars~1.5k tokensUpdated 17 days ago
    Writing & ContentAuto-check passed
  • Humanizer Zh

    ai-zixun/humanizer-zh

    Remove signs of AI-generated, translated, or overly mechanical Chinese prose.

    177 GitHub stars~1.2k tokensUpdated 4 mo ago
    Writing & ContentAuto-check passed

More from nicepkg/ai-workflow

All 61 skills in this repo
  • Capture Triage

    nicepkg/ai-workflow

    Processes Drafts Pro captures from the Inbox folder. An agent skill from nicepkg/ai-workflow.

    285 GitHub stars~3k tokensUpdated 8 mo ago
    Auto-check passed
  • Legacy To AI Ready

    nicepkg/ai-workflow

    Transform legacy codebases into AI-ready projects with Claude Code configurations.

    285 GitHub stars~2.2k tokensUpdated 8 mo ago
    Auto-check: notes
  • Newsletter Coach

    nicepkg/ai-workflow

    Writing coach that extracts educational content from your daily experiences and turns it into publish-ready newsletter drafts.

    285 GitHub stars~3.7k tokensUpdated 8 mo ago
    Auto-check passed
  • Webfluence

    nicepkg/ai-workflow

    Content web architecture framework. An agent skill from nicepkg/ai-workflow.

    285 GitHub stars~1.4k tokensUpdated 8 mo ago
    Auto-check passed
  • Workflow Creator

    nicepkg/ai-workflow

    Create complete Claude Code workflow directories with curated skills.

    285 GitHub stars~2.6k tokensUpdated 8 mo ago
    Auto-check passed
  • Media Processing

    nicepkg/ai-workflow

    Video/audio/image processing with FFmpeg and ImageMagick. An agent skill from nicepkg/ai-workflow.

    285 GitHub stars~2.4k tokensUpdated 8 mo ago
    Auto-check: notes

Works with

Questions about Astro Cta Injector

What does Astro Cta Injector do?

Inject Call-to-Action blocks into Astro site content with intelligent placement strategies. Astro Cta Injector is an agent skill from nicepkg/ai-workflow. Inject Call-to-Action blocks into Astro site content with intelligent placement strategies.

When should I use Astro Cta Injector?

Astro Cta Injector fits situations like: the user wants to add CTAs; newsletter signups; product promotions; any content blocks to blog posts.

How do I install Astro Cta Injector in Claude Code?

Run `npx skills add nicepkg/ai-workflow --skill astro-cta-injector -a claude-code`. Or copy the skill folder (workflows/content-creator-workflow/.claude/skills/astro-cta-injector in nicepkg/ai-workflow) into .claude/skills/astro-cta-injector in your project. Claude Code loads it when a task matches its description.

How do I install Astro Cta Injector in Codex?

Run `npx skills add nicepkg/ai-workflow --skill astro-cta-injector -a codex`. Or copy the skill folder (workflows/content-creator-workflow/.claude/skills/astro-cta-injector in nicepkg/ai-workflow) into .agents/skills/astro-cta-injector in your project. Codex loads it when a task matches its description.

Can I use Astro Cta Injector in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nicepkg/ai-workflow --skill astro-cta-injector -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/astro-cta-injector, .gemini/skills/astro-cta-injector, .github/skills/astro-cta-injector and .opencode/skills/astro-cta-injector in your project.

What does Astro Cta Injector need to run?

Going by SKILL.md and its folder, Astro Cta Injector needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Astro Cta Injector access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Astro Cta Injector safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Astro Cta Injector use?

Astro Cta Injector is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Astro Cta Injector use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Astro Cta Injector?

Skills that share tags, products or a category with Astro Cta Injector: Publish (one-ie/one, 131 stars), Blog (AgriciDaniel/claude-blog, 2.3k stars), Figure (vectorize-io/hindsight, 47k stars) and Voice Builder (charlie947/social-media-skills, 3.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Astro Cta Injector?

nicepkg (a GitHub organization) maintains it in nicepkg/ai-workflow, which has 285 GitHub stars. The repository holds 61 skills in this directory. The repository was last updated on January 20, 2026.

Source: nicepkg/ai-workflow on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.