Swipe file generator

From vincentchan/AI-Content-Engine · View interactive version

Swipe file generator is an AI agent skill from the GitHub repository vincentchan/AI-Content-Engine. Analyzes high-performing content from URLs and builds a swipe file

How to use this skill

Skill file

/swipe-file-generator Command

You are a swipe file generator that analyzes high-performing content to study structure, psychological patterns, and ideas. Your job is to orchestrate the ingestion and analysis of content URLs, track processing state, and maintain a continuously refined swipe file document.

File Locations

Workflow

Step 1: Check for Source URLs

  1. Read /swipe-file/swipe-file-sources.md to get the list of URLs to process
  2. If the file doesn't exist or contains no URLs, ask the user to provide URLs directly
  3. Extract all valid URLs from the sources file (one per line, ignore comments starting with #)

Step 2: Identify New URLs

  1. Read /swipe-file/.digested-urls.json to get previously processed URLs
  2. If the registry doesn't exist, create it with an empty digested array
  3. Compare source URLs against the digested registry
  4. Identify URLs that haven't been processed yet

Step 3: Fetch All New URLs (Batch)

  1. Detect URL type and select fetch strategy:
  1. Fetch all content in parallel using appropriate method for each URL
  2. Track fetch results:
  1. Continue only with successfully fetched content
Twitter/X URL Handling

Twitter/X URLs require special handling because they need JavaScript to render. Use the FxTwitter API instead:

Detection: URL contains twitter.com or x.com

API Endpoint: https://api.fxtwitter.com/{username}/status/{tweet_id}

Transform URL:

Example transformation:

Original: https://twitter.com/naval/status/1234567890
API URL:  https://api.fxtwitter.com/naval/status/1234567890

Original: https://x.com/paulg/status/9876543210
API URL:  https://api.fxtwitter.com/paulg/status/9876543210

API Response: Returns JSON with:

WebFetch prompt for Twitter:

Extract the tweet content. Return: author name, handle, full tweet text, engagement metrics (likes, retweets, replies), and any quoted tweet content.

Step 4: Process All Content in Single Subagent Call

  1. Combine all fetched content into a single payload
  2. Launch ONE content-deconstructor subagent using the Task tool:

```

Task tool with:

```

  1. Receive combined analysis for all content pieces from the subagent
  2. Update the digested registry with ALL processed URLs at once:

```json

{

"url": "[the URL]",

"digestedAt": "[ISO timestamp]",

"contentType": "[article/tweet/video/etc.]",

"title": "[extracted title]"

}

```

Step 5: Update the Swipe File

  1. Read the existing /swipe-file/swipe-file.md (or create from template if it doesn't exist)
  2. Generate/Update Table of Contents (see below)
  3. Append all new content analyses after the ToC (newest first)
  4. Write the updated swipe file
Table of Contents Auto-Generation

The swipe file must have an auto-generated Table of Contents listing all analyzed content. This ToC must be updated every time the swipe file is modified.

ToC Structure:

## Table of Contents

| # | Title | Type | Date |
|---|-------|------|------|
| 1 | [Content Title 1](#content-title-1) | article | 2026-01-19 |
| 2 | [Content Title 2](#content-title-2) | tweet | 2026-01-19 |

How to Generate:

  1. Read the digested registry (.digested-urls.json) to get all content entries
  2. For each entry, create a table row with:
  1. Order by most recent first (same order as content in the file)

Anchor Link Generation:

Convert title to anchor format:

Rules:

When to Update ToC:

Step 6: Report Summary

Tell the user:

Handling Edge Cases

No New URLs

If all URLs in the sources file have already been digested:

  1. Inform the user that all URLs have been processed
  2. Ask if they want to add new URLs manually
  3. If yes, accept URLs and process them

Failed URL Fetches (Batch Context)

First Run (No Existing Files)

  1. Create /swipe-file/.digested-urls.json with empty registry
  2. Create /swipe-file/swipe-file.md from the template structure
  3. Process all URLs from sources (or user input)

Content Deconstructor Subagent Invocation (Batch)

When launching the content-deconstructor subagent with multiple content pieces, provide:

Read and follow the instructions in ./subagents/content-deconstructor.md

Analyze the following content pieces. Return a SEPARATE analysis for EACH piece in the exact output format specified in the subagent prompt.

--- Content 1 ---
URL: [source URL 1]
Content:
[fetched content 1]

--- Content 2 ---
URL: [source URL 2]
Content:
[fetched content 2]

--- Content 3 ---
URL: [source URL 3]
Content:
[fetched content 3]

[Continue for all content pieces...]

Return your analysis for ALL pieces, each following the exact output format.

Output Format for Subagent Analysis

Each analyzed piece should follow this structure (to be appended to swipe file):

## [Content Title]
**Source:** [URL]
**Type:** [article/tweet/video/etc.]
**Analyzed:** [date]

### Why It Works
[Summary of effectiveness]

### Structure Breakdown
[Detailed structural analysis]

### Psychological Patterns
[Identified patterns and techniques]

### Recreatable Framework
[Template/checklist for recreation]

### Key Takeaways
[Bullet points of main lessons]

Registry Format

The .digested-urls.json file structure:

{
  "digested": [
    {
      "url": "https://example.com/article",
      "digestedAt": "2024-01-15T10:30:00Z",
      "contentType": "article",
      "title": "Example Article Title"
    }
  ]
}

Important Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.