Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "kit",
"description": "Community plugin & skills marketplace for Claude Code",
"version": "1.8.0",
"version": "1.9.0",
"owner": {
"name": "hamsurang",
"email": "zlemzlem5656@naver.com"
Expand Down Expand Up @@ -46,6 +46,11 @@
"name": "obsidian-brain",
"source": "./plugins/obsidian-brain",
"description": "Archive learnings from Claude Code sessions to Obsidian vault as Zettelkasten notes and use vault knowledge as conversational context"
},
{
"name": "velog-cli",
"source": "./plugins/velog-cli",
"description": "Manage velog.io blog posts from the terminal — create, edit, publish, and browse posts via the velog CLI"
}
]
}
1 change: 1 addition & 0 deletions README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ bash scripts/scaffold-plugin.sh
| [obsidian](./plugins/obsidian) | Obsidian 볼트에서 노트 검색, 생성, 편집, 정리 및 obsidian-cli와 Obsidian Headless를 통한 프론트매터 관리 | [minsoo.web](https://github.com/minsoo-web) |
| [library-analyzer](./plugins/library-analyzer) | 병렬 에이전트를 활용하여 오픈소스 라이브러리의 기여 준비도를 분석하는 스킬 | [minsoo.web](https://github.com/minsoo-web) |
| [obsidian-brain](./plugins/obsidian-brain) | Claude Code 세션의 학습 내용을 Obsidian 볼트에 제텔카스텐 노트로 아카이빙하고 볼트 지식을 대화 컨텍스트로 활용하는 스킬 | [minsoo.web](https://github.com/minsoo-web) |
| [velog-cli](./plugins/velog-cli) | 터미널에서 velog.io 블로그 포스트를 관리 — velog CLI로 글 작성, 수정, 퍼블리시, 트렌딩 조회 | [minsoo.web](https://github.com/minsoo-web) |

*플러그인을 기여하고 싶으신가요? [기여 방법](docs/contributors/contributing.md)을 확인하세요.*

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ bash scripts/scaffold-plugin.sh
| [obsidian](./plugins/obsidian) | Work with Obsidian vaults — search, create, edit, organize notes and manage frontmatter via obsidian-cli and Obsidian Headless | [minsoo.web](https://github.com/minsoo-web) |
| [library-analyzer](./plugins/library-analyzer) | Analyze open-source libraries for contribution readiness with parallel agents | [minsoo.web](https://github.com/minsoo-web) |
| [obsidian-brain](./plugins/obsidian-brain) | Archive learnings from Claude Code sessions to Obsidian vault as Zettelkasten notes and use vault knowledge as conversational context | [minsoo.web](https://github.com/minsoo-web) |
| [velog-cli](./plugins/velog-cli) | Manage velog.io blog posts from the terminal — create, edit, publish, and browse posts via the velog CLI | [minsoo.web](https://github.com/minsoo-web) |

*Have a plugin to share? See [Contributing](docs/contributors/contributing.md).*

Expand Down
13 changes: 13 additions & 0 deletions plugins/velog-cli/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "velog-cli",
"version": "1.0.0",
"description": "Manage velog.io blog posts from the terminal — create, edit, publish, and browse posts via the velog CLI.",
"author": {
"name": "minsoo.web",
"github": "minsoo-web"
},
"license": "MIT",
"keywords": ["velog", "blog", "publishing", "markdown", "cli"],
"repository": "https://github.com/hamsurang/velog-cli",
"skills": "./skills/"
}
37 changes: 37 additions & 0 deletions plugins/velog-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# velog-cli

Claude Code plugin for managing [velog.io](https://velog.io) blog posts from the terminal.

## Installation

```bash
# Install the velog CLI binary
brew tap hamsurang/velog-cli && brew install velog-cli

# Install the Claude Code plugin
claude plugin install velog-cli@hamsurang/kit
```

## Features

- **Authentication**: Login/logout with velog.io credentials
- **Post management**: Create, edit, delete, publish posts from markdown files
- **Browsing**: List your posts, drafts, trending, and recent posts
- **AI-optimized output**: `--format compact` for structured JSON output

## Usage

The skill activates automatically when you mention velog or want to manage blog posts:

- "List my velog posts"
- "Publish this markdown as a velog post"
- "Show trending posts on velog"
- "Edit my post about Rust"

## Prerequisites

- [velog-cli](https://github.com/hamsurang/velog-cli) (`brew install velog-cli` or `cargo install velog-cli`)

## License

MIT
207 changes: 207 additions & 0 deletions plugins/velog-cli/skills/velog-cli/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
---
name: velog-cli
description: >
Use when the user wants to manage velog.io blog posts from the terminal.
Activates when the user mentions velog, wants to publish a blog post, list
their velog posts, create or edit articles, manage drafts, or check trending
posts on velog.io. Also use when the user writes markdown content and wants
to publish it as a blog post, or when they ask about their velog account
status. Even if they just say "post this to my blog" or "publish this",
consider activating if velog-cli is installed.
---

# velog-cli Skill

`velog` is a CLI client for [velog.io](https://velog.io), a developer blogging platform.
It lets you manage blog posts entirely from the terminal — create from markdown files,
edit, publish drafts, browse trending posts, and more.

## Prerequisites

The `velog` binary must be installed:

```bash
# macOS
brew tap hamsurang/velog-cli && brew install velog-cli

# Cargo (any platform)
cargo install velog-cli
```

If `velog` is not found, tell the user to install it first.

## Authentication

Most write operations require authentication. Check status before attempting mutations.

```bash
# Check if logged in
velog auth status

# Login (interactive — prompts for tokens from browser DevTools)
velog auth login

# Logout
velog auth logout
```

**How to get tokens**: The user opens velog.io in their browser, opens DevTools (F12) →
Application → Cookies, and copies `access_token` and `refresh_token`. The CLI prompts
for these during `velog auth login`.

Credentials are stored at `~/.config/velog-cli/credentials.json` and auto-refresh when expired.

## Post Management

### List Posts

```bash
# List your own posts (requires auth)
velog post list

# List your drafts
velog post list --drafts

# Trending posts (filterable by period)
velog post list --trending
velog post list --trending --period week

# Recent posts across velog
velog post list --recent

# Posts by a specific user
velog post list -u <username>

# Control result count (1–100, default 20)
velog post list --limit 50

# Pagination
velog post list --recent --cursor <cursor>
velog post list --trending --offset 20
```

### Show a Post

```bash
# Show your own post by slug
velog post show <slug>

# Show another user's post
velog post show <slug> -u <username>
```

The slug is the URL path segment (e.g., `my-first-post` from `velog.io/@user/my-first-post`).

### Create a Post

```bash
# From a markdown file (saved as draft by default)
velog post create -t "Post Title" -f article.md

# From stdin
echo "# Hello World" | velog post create -t "Hello"

# Publish immediately (not draft)
velog post create -t "Title" -f article.md --publish

# With tags and custom slug
velog post create -t "Title" -f article.md --tags "rust,cli,velog" --slug my-custom-slug

# Private post
velog post create -t "Title" -f article.md --publish --private
```

### Edit a Post

```bash
# Update content from a file
velog post edit <slug> -f updated.md

# Update title
velog post edit <slug> -t "New Title"

# Update tags
velog post edit <slug> --tags "new,tags"

# Update everything
velog post edit <slug> -t "New Title" -f updated.md --tags "new,tags"
```

### Publish a Draft

```bash
velog post publish <slug>
```

### Delete a Post

```bash
# With confirmation prompt
velog post delete <slug>

# Skip confirmation
velog post delete <slug> -y
```

## Output Formats

All commands accept `--format` to control output style:

| Format | Use case | Description |
|--------|----------|-------------|
| `pretty` | Human reading (default) | Tables, colors, markdown rendering |
| `compact` | AI agents, scripts | Minified JSON on a single line |
| `silent` | CI/CD, exit-code-only checks | Queries emit JSON, mutations emit nothing |

When Claude is running velog commands programmatically, use `--format compact` to get
structured JSON output that's easy to parse:

```bash
velog post list --format compact
velog post show my-post --format compact
```

## Common Workflows

### Write and publish a blog post

1. Write markdown content to a file
2. Create as draft: `velog post create -t "Title" -f article.md --tags "tag1,tag2"`
3. Preview on velog.io if needed
4. Publish: `velog post publish <slug>`

### Update an existing post

1. Find the slug: `velog post list --format compact`
2. Edit: `velog post edit <slug> -f updated.md`

### Browse trending posts for inspiration

```bash
velog post list --trending --period week --limit 10
```

## Shell Completions

```bash
# Generate completions
velog completions zsh # or bash, fish, elvish, powershell
```

## Error Handling

1. **Not authenticated**: Run `velog auth status` first. If not logged in, guide
the user through `velog auth login`.
2. **Post not found**: Verify the slug with `velog post list --format compact`.
3. **Binary not found**: Tell the user to install via `brew` or `cargo`.

## Tips for AI Agent Usage

- Always use `--format compact` when you need to parse the output programmatically.
- Check auth status before attempting create/edit/delete/publish operations.
- When creating posts from user-written content, save to a temp file first, then
pass via `-f`. This avoids shell escaping issues with stdin piping.
- Default behavior is to save as draft — use `--publish` only when the user
explicitly asks to publish immediately.
- Use `--format silent` for mutations when you only care about success/failure
(check exit code).
Loading