Skip to main content
vindicatenyc

build-in-public

by vindicatenycv1.0.0

Generate #BuildingInPublic social media posts from Claude Code sessions

Installation guide โ†’
1 skill GitHub

Commands

generate

Generate "building in public" social media posts from the current or specified session

preview

Preview what happened in the current session before generating posts

Documentation

# ๐Ÿ“ฑ Build in Public - Claude Code Plugin

Generate engaging social media posts from your Claude Code sessions for the #BuildingInPublic community.

![Version](https://img.shields.io/badge/version-1.0.0-blue)
![License](https://img.shields.io/badge/license-MIT-green)

## What It Does

This plugin automatically tracks your coding sessions and generates ready-to-post content for:

- **Twitter/X** - Short posts (280 chars) and threads
- **BlueSky** - Short posts (300 chars)
- **LinkedIn** - Professional medium-length updates
- **Instagram** - Long-form captions with hashtags
- **Mastodon** - Medium posts with hashtags

## Installation

### From GitHub (Recommended)

**Step 1: Add the marketplace**
```
/plugin marketplace add https://github.com/vindicatenyc/build-in-public-plugin
```

**Step 2: Install the plugin**
```
/plugin install build-in-public
```

**Step 3: Restart Claude Code**

After installation, restart Claude Code to load the plugin. You'll see a message: "โœ“ Installed build-in-public. Restart Claude Code to load new plugins."

**Verify Installation:**
```
/plugin list
```

You should see `build-in-public (v1.0.0)` in the Installed tab.

### Local Installation (For Plugin Development)

If you're developing or testing changes to the plugin:

```bash
# Clone the repo
git clone https://github.com/vindicatenyc/build-in-public-plugin.git
cd build-in-public-plugin

# Start Claude Code with the plugin loaded
claude --plugin-dir .
```

Note: The `--plugin-dir` flag is for development only and loads the plugin for that session. For permanent installation, use the GitHub method above.

## Usage

### Generate Posts

After a coding session, run:

```
/build-in-public:generate
```

This will:
1. Parse your current session transcript
2. Extract highlights (commits, files created, bugs fixed, etc.)
3. Generate posts for all platforms
4. Save to `output/build-in-public_[timestamp].md` and `.json` in your project directory

**Note:** Output files are created in the current project's `output/` directory, not in the plugin directory.

### Preview Session

Want to see what happened before generating posts?

```
/build-in-public:preview
```

### Automatic Reminders

The plugin includes a `SessionEnd` hook that reminds you to generate posts when you've had a productive session.

### Project Configuration

**Important:** Add this to each project's `.gitignore` to avoid committing generated posts:

```gitignore
# Build in Public generated posts
output/
build-in-public_*.md
build-in-public_*.json
```

The plugin creates an `output/` directory in your project directory (not the plugin directory) to keep generated files organized and separate from your code.

## Output Example

### Short Post (Twitter/X - No Hashtags)
```
โœ… Just shipped: Add user authentication with JWT tokens
```

*Note: Hashtags removed from X/Twitter posts per platform best practices*

### Thread (Twitter/X - Compelling Hook)
```
Tweet 1/6:
Just shipped: Add user authentication with JWT tokens

Thread on how it came together ๐Ÿ‘‡

Tweet 2/6:
๐Ÿ’ป Tech stack: Python, FastAPI, PostgreSQL

Tweet 3/6:
๐Ÿ“ New files:
  โ€ข auth.py
  โ€ข jwt_handler.py
  โ€ข user_model.py

Tweet 4/6:
๐Ÿ“ฆ Commits:
  โœ… Add user authentication with JWT tokens
  โœ… Implement refresh token rotation

Tweet 5/6:
๐Ÿงช Tests: All passing โœ…

Nothing beats that green checkmark feeling.

Tweet 6/6:
What are you building today?
```

*Note: First tweet designed as a hook to drive engagement and thread views*

## Automation Integration

The JSON output is designed for automation tools. Example structure:

```json
{
  "summary": {
    "session_id": "abc123",
    "project_name": "my-api",
    "duration_minutes": 45,
    "files_created": ["auth.py", "jwt_handler.py"],
    "git_commits": ["Add user authentication"],
    "languages_used": ["Python", "SQL"]
  },
  "posts": {
    "short": ["Tweet-ready post 1", "Tweet-ready post 2"],
    "thread": ["Tweet 1/5", "Tweet 2/5", "..."],
    "medium": ["LinkedIn post"],
    "long": ["Instagram caption"],
    "hashtags": ["#BuildingInPublic", "#Python"]
  }
}
```

### Example: Auto-publish with your own script

```python
import json

with open('build-in-public_20250101_120000.json') as f:
    data = json.load(f)

# Post to Twitter
tweet = data['posts']['short'][0]
twitter_client.post(tweet)

# Post to BlueSky
bluesky_client.post(tweet)

# Post to LinkedIn
linkedin_post = data['posts']['medium'][0]
linkedin_client.post(linkedin_post)
```

## Configuration

### Customize Hashtags

Edit `scripts/generate_posts.py` to add your own default hashtags:

```python
hashtags = ['#BuildingInPublic', '#CodingInPublic', '#YourHashtag']
```

### Disable Session End Reminder

Remove or comment out the `SessionEnd` hook in `hooks/hooks.json`:

```json
{
  "SessionEnd": []
}
```

## Plugin Structure

```
build-in-public-plugin/
โ”œโ”€โ”€ .claude-plugin/
โ”‚   โ””โ”€โ”€ plugin.json          # Plugin manifest
โ”œโ”€โ”€ commands/
โ”‚   โ”œโ”€โ”€ generate.md          # /build-in-public:generate
โ”‚   โ””โ”€โ”€ preview.md           # /build-in-public:preview
โ”œโ”€โ”€ hooks/
โ”‚   โ””โ”€โ”€ hooks.json           # SessionEnd and Stop hooks
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ generate_posts.py    # Main post generation script
โ”‚   โ”œโ”€โ”€ session_end_hook.py  # Session end reminder
โ”‚   โ””โ”€โ”€ activity_logger.py   # Activity tracking
โ”œโ”€โ”€ skills/
โ”‚   โ””โ”€โ”€ build-in-public/
โ”‚       โ””โ”€โ”€ SKILL.md         # Auto-activation skill
โ””โ”€โ”€ README.md
```

## Requirements

- Claude Code (any recent version)
- Python 3.8+ (for the generation scripts)

## Contributing

1. Fork the repo
2. Create a feature branch
3. Make your changes
4. Submit a PR

## License

MIT License - see [LICENSE](LICENSE) for details.

## Credits

Created for the #BuildingInPublic community ๐Ÿš€

---

**Like this plugin?** Give it a โญ on GitHub and share your generated posts!