Agent skill
rustfeed-feed-ops
rustfeed のフィード管理(追加、削除、更新)と記事操作(取得、既読管理、お気に入り)のCLI/TUIコマンド実行をサポートします。フィード操作、記事取得、データベース操作時に使用します。
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/rustfeed-feed-ops
SKILL.md
Rustfeed フィード操作ガイド
このスキルは rustfeed の CLI/TUI を使ったフィード管理と記事操作の方法を提供します。
クイックスタート
CLI実行
# CLI実行
cargo run --bin rustfeed-cli -- <command>
# TUI実行
cargo run --bin rustfeed-tui
フィード管理
フィード追加
cargo run --bin rustfeed-cli -- add <FEED_URL>
例:
# 技術ブログのフィード追加
cargo run --bin rustfeed-cli -- add https://blog.rust-lang.org/feed.xml
# 複数のフィードを順次追加
cargo run --bin rustfeed-cli -- add https://example.com/rss
cargo run --bin rustfeed-cli -- add https://another.com/atom.xml
対応形式: RSS 1.0, RSS 2.0, Atom
フィード一覧表示
cargo run --bin rustfeed-cli -- list
出力内容:
- フィードID
- タイトル
- URL
- 購読開始日
フィード削除
cargo run --bin rustfeed-cli -- delete <FEED_ID>
例:
# ID 3 のフィードを削除
cargo run --bin rustfeed-cli -- delete 3
注意: 削除すると関連する記事も全て削除されます
フィード情報更新
cargo run --bin rustfeed-cli -- update <FEED_ID>
目的: フィードのメタデータ(タイトル、説明)を再取得して更新
記事操作
記事取得(フェッチ)
# 全フィードから新着記事を取得
cargo run --bin rustfeed-cli -- fetch
# 特定フィードのみ取得
cargo run --bin rustfeed-cli -- fetch --feed-id <ID>
動作:
- 登録済みの全フィードにアクセス
- 新着記事を取得してデータベースに保存
- 既存記事は重複チェックでスキップ
エラーハンドリング:
- タイムアウト: 30秒でリトライ
- 404エラー: スキップして次のフィードへ
- パースエラー: エラーログ出力してスキップ
記事一覧表示
# 全記事表示
cargo run --bin rustfeed-cli -- articles
# 未読のみ表示
cargo run --bin rustfeed-cli -- articles --unread
# お気に入りのみ表示
cargo run --bin rustfeed-cli -- articles --favorite
# 特定フィードの記事のみ
cargo run --bin rustfeed-cli -- articles --feed-id 2
表示内容:
- 記事ID
- タイトル
- URL
- 公開日時
- 既読/未読ステータス
- お気に入りステータス
記事を既読にする
cargo run --bin rustfeed-cli -- mark-read <ARTICLE_ID>
# 複数記事を一括で既読に
cargo run --bin rustfeed-cli -- mark-read 1 2 3
記事をお気に入りに追加
cargo run --bin rustfeed-cli -- favorite <ARTICLE_ID>
# お気に入り解除
cargo run --bin rustfeed-cli -- unfavorite <ARTICLE_ID>
データベース操作
データベースパス
デフォルト: ~/.rustfeed/rustfeed.db
カスタムパス指定:
RUSTFEED_DB_PATH=/path/to/custom.db cargo run --bin rustfeed-cli -- list
データベースのバックアップ
# バックアップ作成
cp ~/.rustfeed/rustfeed.db ~/.rustfeed/rustfeed.db.backup
# バックアップから復元
cp ~/.rustfeed/rustfeed.db.backup ~/.rustfeed/rustfeed.db
データベースのリセット
# データベース削除(全データ消去)
rm ~/.rustfeed/rustfeed.db
# 次回実行時に自動的に新しいデータベースが作成される
cargo run --bin rustfeed-cli -- list
TUI操作
TUI起動
cargo run --bin rustfeed-tui
TUI キーバインド
| キー | 動作 |
|---|---|
j / ↓ |
下に移動 |
k / ↑ |
上に移動 |
Enter |
記事を開く |
r |
フィードをリフレッシュ |
m |
既読/未読トグル |
f |
お気に入りトグル |
q |
終了 |
注意: TUI は開発中の機能です。最新の実装は rustfeed-tui/src/ を参照してください。
よくあるタスク
日次の記事取得ルーチン
# 新着記事を取得して未読のみ表示
cargo run --bin rustfeed-cli -- fetch && \
cargo run --bin rustfeed-cli -- articles --unread
新しいフィードソースを追加して即座に取得
cargo run --bin rustfeed-cli -- add https://example.com/feed.xml && \
cargo run --bin rustfeed-cli -- fetch
記事の検索(データベース直接クエリ)
# sqlite3を使用
sqlite3 ~/.rustfeed/rustfeed.db "SELECT title, url FROM articles WHERE title LIKE '%Rust%';"
トラブルシューティング
フィード取得が失敗する
症状: "Failed to fetch feed" エラー
原因と対処:
-
ネットワークエラー
bash# ネットワーク接続確認 curl -I https://example.com/feed.xml -
無効なフィードURL
bash# フィード形式を検証 curl https://example.com/feed.xml | head -20 -
タイムアウト
- デフォルトタイムアウト: 30秒
- カスタムタイムアウト設定は
rustfeed-core/src/feed/を確認
データベースがロックされている
症状: "database is locked" エラー
対処:
# 他のrustfeedプロセスを確認
ps aux | grep rustfeed
# プロセスを終了
kill <PID>
文字化けが発生する
症状: 記事タイトルやコンテンツが正しく表示されない
原因: エンコーディング問題
対処:
feed-rsが自動でエンコーディングを処理- 問題が続く場合は Issue を報告
開発者向け情報
コマンド実装の追加
新しいCLIコマンドを追加する場合:
rustfeed-cli/src/commands/に新しいモジュールを作成rustfeed-cli/src/main.rsのCommandsenum に追加- コマンドロジックを実装
CLAUDE.mdを更新
データベーススキーマ確認
sqlite3 ~/.rustfeed/rustfeed.db ".schema"
ログ出力の有効化
# DEBUGレベルのログ出力
RUST_LOG=debug cargo run --bin rustfeed-cli -- fetch
# 特定モジュールのみ
RUST_LOG=rustfeed_core::feed=trace cargo run --bin rustfeed-cli -- fetch
参考リソース
- フィード形式仕様: RSS 2.0, Atom
- SQLiteドキュメント: https://www.sqlite.org/docs.html
- Clap(CLIパーサー): https://docs.rs/clap/latest/clap/
- Ratatui(TUI): https://ratatui.rs/
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?