AgentSkillsCN

publish-blog

将博客文章发布至GitHub Pages和Dev.to。围绕近期工作成果、已完成的任务以及收获的经验教训,生成结构清晰、条理分明的优质博文。

SKILL.md
--- frontmatter
name: publish-blog
description: Publish blog posts to GitHub Pages and Dev.to. Generates well-structured posts about recent work, tasks completed, and lessons learned.
version: 1.0.0
author: Claude Code CTO
invocation: /publish-blog ["Topic here"] or /publish-blog (auto-generates from context)

Publish Blog Skill

Publishes blog posts to both GitHub Pages and Dev.to with proper formatting.

Usage

bash
# With explicit topic
/publish-blog "Iron Condor Backtesting Results"

# Auto-generate from recent context
/publish-blog

What It Does

  1. Generates a blog post with proper structure:

    • What prompt/task was given
    • What was accomplished
    • Tech stack used
    • Why the approach worked
  2. Saves to GitHub Pages (docs/_posts/) with Jekyll frontmatter

  3. Publishes to Dev.to if DEVTO_API_KEY is available

  4. Commits and pushes to GitHub

Blog Post Structure

markdown
---
layout: post
title: "Your Title Here"
date: YYYY-MM-DD HH:MM:SS
categories: [engineering, trading, ai]
tags: [relevant, tags, here]
---

# Title

## The Challenge

What problem were we solving?

## The Approach

How did we solve it?

## Tech Stack

What tools and technologies were used?

## Results

What was accomplished?

## Lessons Learned

What did we learn?

---

_Auto-generated by AI Trading System_

Jekyll Frontmatter Fields

FieldDescriptionExample
layoutAlways "post"post
titlePost title (quoted)"Day 90: System Complete"
dateISO timestamp2026-01-28 15:30:00
categoriesPost categories[engineering, lessons-learned]
tagsSearchable tags[iron-condors, phil-town, python]

Dev.to Integration

The skill checks for DEVTO_API_KEY environment variable:

  • If set: Posts to Dev.to with:

    • Title from Jekyll frontmatter
    • Tags: trading, ai, machinelearning, python
    • Series: "AI Trading Daily Reports"
    • Canonical URL pointing to GitHub Pages
  • If not set: Skips Dev.to, only publishes to GitHub Pages

Execution Steps

When invoked, the skill:

  1. Gather Context

    • Check recent git commits
    • Check current branch changes
    • Read recent conversation context
  2. Generate Content

    • Create title from topic or context
    • Structure post with standard sections
    • Include code snippets where relevant
  3. Save to GitHub Pages

    bash
    # Filename format: YYYY-MM-DD-slug-title.md
    docs/_posts/2026-01-28-iron-condor-backtesting.md
    
  4. Publish to Dev.to (if API key available)

    python
    requests.post(
        "https://dev.to/api/articles",
        headers={"api-key": DEVTO_API_KEY},
        json={"article": {...}}
    )
    
  5. Commit and Push

    bash
    git add docs/_posts/
    git commit -m "feat(blog): Publish: <title>"
    git push
    

Environment Variables

VariableRequiredPurpose
DEVTO_API_KEYNoDev.to API key for cross-posting
GITHUB_TOKENYes*For pushing commits (*uses existing auth)

Example Output

code
============================================
BLOG POST PUBLISHED
============================================
Title: Iron Condor Backtesting Results
GitHub Pages: docs/_posts/2026-01-28-iron-condor-backtesting.md
Dev.to: https://dev.to/igorganapolsky/iron-condor-backtesting-xxx
Commit: abc1234
============================================

Related Files

  • scripts/generate_daily_blog_post.py - Daily automated posts
  • .github/workflows/daily-blog-post.yml - CI/CD for blog
  • docs/_posts/ - All blog post files

Category Guidelines

CategoryWhen to Use
engineeringCode changes, architecture
tradingStrategy, trade analysis
lessons-learnedPost-mortems, insights
aiLLM/RAG improvements
strategyTrading strategy updates

Tag Suggestions

Common tags for this project:

  • iron-condors, options, spy
  • claude-ai, vertex-ai, rag
  • phil-town, risk-management
  • python, github-actions
  • alpaca, paper-trading

Workflow

code
User: /publish-blog "New circuit breaker implementation"
     |
     v
[1. Gather context from git/conversation]
     |
     v
[2. Generate structured blog post]
     |
     v
[3. Save to docs/_posts/YYYY-MM-DD-slug.md]
     |
     v
[4. POST to Dev.to API (if key exists)]
     |
     v
[5. git add + commit + push]
     |
     v
Output: URLs to both platforms