Communitygithub.com

swapit — 家庭有害物質インベントリ&交換エンジン

家庭内の内分泌かく乱物質や残留性化学物質(BPA/BPS、フタル酸エステル、PFAS/PTFE、パラベン、難燃剤、VOC、マイクロプラスチック)を特定し、実際の曝露リスクに基づいてスコアリングし、より安全な代替品への交換を追跡する、ステートフルかつローカルファーストのツールです。

swapit — 家庭有害物質インベントリ&交換エンジン とは?

swapit は、家庭内の有害物質を体系的に管理・置き換えるための、ステートフルなCLIツール兼ダッシュボードです。ユーザーが所有するアイテムを登録し、それぞれに含まれる可能性のある有害物質(BPA、フタル酸エステル、PFASなど)を知識グラフから特定し、使用頻度や状態(焦げ付きの有無など)を考慮した現実的な曝露リスクスコアを算出します。その結果に基づいて、最も効果的な交換優先順位を提案し、代替品の選定、調達状況の追跡、そしてHTMLレポートやライブダッシュボードでの可視化を提供します。データはすべてローカルに保存され、プライバシーが厳格に保護されます。さらに、匿名化された知識や調達情報をコミュニティと共有するオプション機能(コモンズ)も備えており、オプトインでのみ利用できます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/broomva/skills/tree/HEAD/skills/commerce/swapit

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

swapit — 家庭有害物質インベントリ&交換エンジン は何をしますか?

このスキルの目的

swapit は、「家の中にプラスチックやBPAがたくさんあるはず」という漠然とした不安を、具体的で優先順位付けされた追跡可能な計画に変えます。ステートフルであるため、家庭のインベントリはディスク上に保存され、セッションをまたいで維持されます。ローカルファーストであり、有料サービスは不要で、明示的に(M3)コモンズにオプトインしない限り、デバイスの外にデータが出ることはありません。

1回の実行で以下が生成されます:

  1. 所有するアイテムのインベントリ。各アイテムには汎用のアイテムクラスがタグ付けされます。
  2. 実際の曝露を反映したアイテムごとのリスクスコア — 毎日高温で使用される傷ついたノンスティックフライパンは、ガレージの未開封のプラスチック製収納箱よりもはるかに高いスコアになります。
  3. 最も曝露を削減できる**「交換優先」リスト**(上位5%)。
  4. 交換追跡 — 選択した代替品、調達状況、チェックリスト、ブックマーク。
  5. 共有可能なHTMLレポート(M2では swapit serve によるライブダッシュボードも可能)。

3つの領域(とプライバシーの不変条件)

領域保持する内容共有
1 · 知識有害物質 → アイテムクラス → 代替品(汎用的、引用付きの事実)共有可能;キャッシュされ、(M3で)コモンズと同期
2 · インベントリあなたのアイテム、部屋、数量、ブランド、写真、交換、ブックマーク非公開 — デバイスの外に絶対に出ない
3 · コモンズ (M3)共有知識グラフを豊かにする匿名化された貢献オプトイン、レビュー付き、汎用的な事実のみ

プライバシーの不変条件(拘束力あり): 領域2のインベントリ(アイテム、部屋、数量、ブランド、写真、購入情報、場所)は、同期の境界を決して越えません。共有可能なのは領域1の汎用的な事実のみで、明示的なオプトインと確認可能な swapit sync --dry-run を経由します。これは、クライアント側の許可リストシリアライザ(scripts/anonymize.py)とコモンズサーバー側のバックストップ、さらにすべての実際のインベントリアイテムがゲートによって拒否されることを確認するファズテストによって強制されます。禁止フィールドリスト:anonymize.CONTRIBUTION_FORBIDDEN(state.PRIVATE_FIELDS のインベントリ構造サブセット)。

データモデル

状態は ~/.config/swapit/ に保存されます($SWAPIT_HOME で上書き可能;$XDG_CONFIG_HOME を尊重します)。

~/.config/swapit/
├── knowledge/   hazards.jsonl · item-classes.jsonl · alternatives.jsonl · products.jsonl · procurement.jsonl
├── inventory/   events.jsonl(追記専用監査) · items.json · swaps.json · rooms.json · bookmarks.json
├── contributions/ queue.jsonl   (M3)
├── sync/        config.json · sync-log.jsonl   (M3)
└── photos/

ノードスキーマ(完全な引用付きデータセットは seed/*.jsonl を参照):

  • hazard — id · name · aliases · class · mechanism · exposure_routes · regulatory · severity(0-3) · evidence_strength · sources
  • item_class — id · name · category · description · hazards[]{hazard_id, presence_likelihood, rationale} · detection_hints · sources
  • alternative — id · name · replaces[] · material · rationale · tradeoffs · caveats · avoids_hazards · residual_concerns · sources
  • procurement_option(購入先、公開)— id · alternative · item_class · retailer · region(ISO-3166-1 a2) · area · url · price_min · price_max · currency · as_of · availability · confidence · corroboration_count
  • item(非公開)— id · name · item_class · room · quantity · brand · condition · usage{frequency, food_contact, heat, child_contact} · status · notes · photos
  • swap(非公開)— id · item_id · chosen_alternative · procurement{status, cost, vendor} · checklist[] · bookmarks[]

リスクモデル

risk = severity × presence_likelihood × evidence × exposure_relevance × frequency × condition
  • exposure_relevance は、アイテムの使用方法に応じて有害物質の経路を活性化します(食品接触+高温は経口/食品接触/高温の有害物質で最大になります;皮膚接触はパーソナルケア製品で重要;吸入は掃除用品/家具で重要;子供との接触は増幅されます)。
  • アイテムスコア = 有害物質ごとのリスクのスケール合計 → 高 / 中 / 低 のバンドに分類。
  • これが優先順位付けのインテリジェンスです — procurer の「支配的な故障モード」に類似:まず曝露の大部分を占める少数のアイテムを修正し、すべてのプラスチック製のものに対する罪悪リストを作るのではありません。

モード

モード機能
init状態を作成し、シード知識グラフをロード
add家庭アイテムを追加(名前、クラス、部屋、状態、使用方法)→ その評価を出力
assessアイテムまたはアドホックなアイテムクラスを評価 → 有害物質 + リスク + 順位付き代替品
listインベントリを一覧表示、--room/--band/--status/--class/--hazard でフィルタ、リスクでソート
swap交換計画を作成/更新:代替品の選択、ステータス設定、チェックリスト、ブックマーク、コスト
score家庭の曝露サマリー + 交換優先ランキング
report自己完結型HTMLレポートを生成(カテゴリC)
procureprocurerへの引き継ぎ概要 + 交換ターゲットに関する既知の購入先オファー(--region でフィルタ);見つけたオファー(--retailer/--url/--price-*)を公開コモンズに記録
knowledge知識グラフを閲覧/検索(list/search/show)
rooms部屋を一覧表示/追加
selfheal知識エッジ + インベントリ参照 + 根拠を検証;エラーがあれば非ゼロで終了
servehttp://127.0.0.1:8731 でライブローカルダッシュボード — カンバンボード、チェックリスト、ブックマーク、ステータス;すべてのクリックが状態に書き戻される
contribute匿名化された事実をキューに入れる — product / hazard(アイテムクラス→有害物質) / alternative / procurement(公開購入先オファー) / item-class(新しい分類ノード);ローカルに適用され、コモンズ用にゲートされる
sync貢献キューをプッシュし、コミュニティ知識をプル(オプトイン);--dry-run で送信される内容を正確にプレビュー;--configure でエンドポイントを設定

典型的なフロー

swapit init
swapit add --name "古いテフロン鍋" --class nonstick-cookware --room kitchen \
           --condition scratched --frequency daily --food-contact --heat
swapit score                      # 何を最初に交換すべきか
swapit swap itm_xxxx --to cast-iron-skillet --status sourcing --add-task "10インチのスキレットを購入"
swapit procure itm_xxxx           # -> 概要を `procurer` スキルに引き継ぎ
swapit report --open              # 共有可能なHTML

他のスキルとの連携

  • procurer — swapit procure <item> でニーズ(「3つのポリカーボネート製ボトルをガラス/ステンレスに交換」)と準備されたプロキュアラープロンプトを構築;プロキュアラーは引用付きの情報源と予算枠を返す。
  • bookkeeping (P6) — 新規の耐久性のある有害物質/製品の発見(例:新たに特徴づけられたアイテムクラス)は、research/entities/ にプロアクティブにファイルされ、後でコモンズに流せる。
  • health — 個人の曝露コンテキスト。content-creation — グラフからの教育用投稿。

根拠の規律

シード知識は、権威ある機関(NIEHS、ATSDR/CDC、米国環境保護庁、米国食品医薬品局、ECHA/EU REACH、カリフォルニア州OEHHA Prop 65、WHO、EWG)のみを引用します。すべてのレコードは1つ以上の情報源を持ちます;verified: false はこれらが参照グレード(新しく取得したものではない)であることを示します — sourced pass(またはコモンズ)を実行してリフレッシュしてください。selfheal は、どのノードも引用を失った場合に失敗します。これは公衆衛生科学に基づいた消費者向けガイダンスであり、医学的または法的なアドバイスではありません。

リソース

  • scripts/swapit.py — CLIエントリポイント + コマンドハンドラ
  • scripts/state.py — 2領域状態レイヤー(PRIVATE_FIELDS が同期境界を定義)
  • scripts/ops.py — 単一の状態変更書き込みパス(CLI + ダッシュボードで共有)
  • scripts/knowledge.py — 知識グラフのロード + エッジ解決
  • scripts/risk.py — 曝露リスクスコアリングエンジン
  • scripts/report.py — 自己完結型HTMLレポートジェネレーター(カテゴリC)
  • scripts/server.py — swapit serve ライブダッシュボード(stdlib http.server、localhostのみ)
  • scripts/anonymize.py — プライバシーゲート:許可リストの事実ビルダー + 禁止フィールドスキャン
  • scripts/sync.py — コモンズ同期クライアント(キュー、--dry-run プレビュー、プッシュ/プル、マージ)
  • scripts/selfheal.py — 整合性バリデーター
  • templates/dashboard.html — ライブダッシュボード(インラインCSS/JS、カテゴリC)
  • commons/ — ネットワーク化されたコモンズ参照サーバー(FastAPI + SQLite;デプロイはゲート付き)
  • seed/{hazards,item-classes,alternatives}.jsonl — 根拠のあるスターター知識
  • tests/ — リスク、知識、自己修復、CLI、プライバシー/匿名化、同期、レポート、サーバーのテスト

コラボレーション(コモンズ)

貢献は汎用的な事実のみです — swapit contribute product|hazard|alternative|procurement|item-class で匿名化された事実(公開製品→アイテムクラスマッピング、有害物質エッジの修正、代替品、購入先オファー、または新しい分類ノード)を構築し、ローカルに適用してキューに入れます。swapit sync --dry-run で送信される内容が正確に表示されます;swapit sync でキューをプッシュし、コミュニティ知識をプルします(--configure 後、オプトイン)。異なるユーザーからの同一の事実は、複製ではなく確証(コンテンツアドレス指定)します;コモンズは2人の異なる貢献者が確証した場合にのみ事実を提供します(corroboration >= 2)— モデレーションは確証ゲートであり、信頼度ゲートではありません。confidence は呼び出し元が提供するものであり、単独の提出者が自分自身で承認する可能性があるためです。プライバシーの不変条件は両方の側面(クライアント anonymize ゲート + サーバーバックストップ)で強制されます — インベントリは決して越境しません。

購入先(調達)コモンズ

procurement_option 事実は公開オファーです:region(ISO-3166-1 alpha-2)内の retailer によって販売される、より安全な alternative。オプションで url、price_min/price_max + currency + as_of、area、availability を含みます。これは (alternative, retailer, region) でコンテンツアドレス指定されます — 同じオファーはユーザー間で確証されます;異なる地域は異なる事実です(地理的スケール軸)。価格/URL/エリアは改良可能な市場データです:厳密に新しい as_of を持つ確証は、価格を前方にリフレッシュし、より新しいデータを後退させることはありません。プライバシーの境界は明確です — 公開オファーは retailer + price_* を使用し、決して非公開の vendor/cost(あなたがどこで購入し、いくら支払ったか)を使用しません(それらは領域2に残ります)。swapit procure <item> --region <CC> で既知のオファーを表示し、見つけた新しいオファーを記録します — 誰でも使用できる、オープンで詳細な、地理的にスコープされたデータセットを成長させます。

ロードマップ

  • M1(出荷済み、0.1.0) — データモデル、シード知識、CLI、リスクエンジン、静的HTMLレポート、自己修復。
  • M2(出荷済み、0.2.0) — swapit serve:状態への読み書きが可能なライブローカルダッシュボード。
  • M3(0.3.0) — 匿名化コラボレーション + ネットワーク化コモンズ(commons/、FastAPI + SQLite)。許可リストシリアライゼーションとクライアント・サーバー両方のファズテストによってプライバシーの不変条件を強制。
  • M4(このリリース、0.4.0) — 地理的にスケールされた調達コモンズ + 分類法の成長:procurement_option(公開購入先、キーは (alternative, retailer, region)、前方のみの価格リフレッシュ)および item_class(確証ゲート付き分類法成長)の事実種別;procure がオファーを表示・記録;米国/コロンビア/ドイツ/英国のシードオファー;固定ベクトルによってロックされたクロス言語ハッシュパリティ。broomva.tech インフラへのライブデプロイは明示的な許可に依存(クレデンシャル/DNS);スキルはオフラインでも完全に機能します。

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

broomva/skills

Local TTS, voice cloning, voice design, and video dubbing via the OmniVoice Studio MCP server (open-source ElevenLabs alternative; nothing leaves the machine, runs on MPS/CUDA/CPU). Use when: (1) generating speech from text in any of 646 languages, (2) cloning a voice from a 3-second reference clip, (3) designing a voice by gender/age/accent/pitch/style, (4) dubbing a video into another language, (5) listing voice profiles or personality presets, (6) producing narration where privacy, cost, or absent API keys matter, (7) non-English narration where Edge TTS/kokoro fall short, (8) batch audio for blog posts or content pipelines. Triggers: 'omnivoice', 'voice clone', 'clone this voice', 'tts', 'narrate', 'generate speech', 'voice synthesis', 'dub video', 'voice design', 'local tts', 'multilingual voice', 'narrate this post', 'elevenlabs alternative'.

broomva/skills

>- Speak an explanation out loud while working in any project — tiered text-to-speech with a pluggable backend (ElevenLabs by default and quota-guarded, macOS `say` via `--fast` for free instant local speech, local OmniVoice as an unlimited private tier). Markdown-aware, so code fences, URLs and deep paths collapse to short spoken placeholders instead of being dictated character by character, while snake_case identifiers survive intact so the listener can still search for them. Every utterance is saved to disk for later replay. Also carries a **talk mode** toggle: turn it on and the agent speaks a full readback of every turn, for as long as that session lasts — the whole response, not a summary of it, with `brief` and `marker` levels for when you want less. Talk mode is off by default and scoped to the single session that enabled it, so parallel agents in other worktrees stay silent. Use when the user asks to hear something rather than read it — an explanation of a change, a walkthrough of what just happen...

broomva/skills

Shop Tiendas D1 (Colombia, d1.com.co) from the command line — search the catalogue, resolve your nearest physical store, price a basket against that store's real stock, and quote delivery. D1 runs VTEX IO (account `d1tiendas`), so this drives its public storefront API with no admin key at all — catalogue and cart work fully anonymously, and a one-time emailed code unlocks order history. Handles the two traps that make naive D1 automation wrong — availability is regionalized (an unregioned query reports a national catalogue nobody can actually buy from) and prices arrive in two different units (search reports whole pesos, checkout reports hundredths, a silent 100x). Builds and prices baskets; it deliberately cannot pay, handing a checkout URL to a human instead. USE WHEN the user wants to find D1 products or prices, check whether D1 delivers somewhere, build or cost a D1 grocery basket, compare D1 items, or review their D1 orders. NOT FOR other Colombian retailers (Éxito, Jumbo, Ara, Alkosto), and not for c...

broomva/skills

Tekton — the shared architecture-intent substrate for co-designing systems with the agent. One typed graph across six tiers (system / journey / data / infra / decisions / qualities); views are queries, not separate diagrams. The canonical artifact is a diff-friendly YAML model both human and agent read and write; it renders to Mermaid (agent-legible, GitHub-native) and a self-contained tabbed HTML viewer (human-visual). Cross-tier traceability (`tekton query <from> <to>`) answers "which infra does this user-journey step touch?" as a path query. USE WHEN: designing or thinking deeply about architecture, a system, a data model, user journeys/flows, or a technical plan WITH the agent; when a Category-C HTML doc isn't enough because you need to see AND edit AND traverse the design across tiers; "let's design X", "architect this", "model the system", "draw the flow", "how does this fit together", "diagram this", "/tekton". NOT FOR: a one-off throwaway diagram (use Mermaid inline); prose-only ADRs (write the ADR...

broomva/skills

Generate a polished Remotion video and X thread showcasing the full agent skills inventory. Use when creating social media content about skills, rendering category-based skill visualizations, or producing animated showcases of agent capabilities. Triggers on "skills video", "showcase skills", "skills thread", "render skills", "social content for skills", or requests to visualize the skills inventory.

broomva/skills

OpenCaptions extension for Content Engine — adds intent-driven CWI (Caption With Intent) captions to the post-production pipeline. Hooks into the grade → caption → final stage. Generates captions that understand video intent (pitch, volume, emotion, emphasis) and style themselves accordingly with variable font weight, size, and color. Uses the OpenCaptions CLI or MCP server. Triggers on: 'add captions', 'opencaptions', 'CWI captions', 'intent captions'.

broomva/skills

Produce polished product launch videos using the Liquid Glass aesthetic — dark void backgrounds, 3D perspective floating UI panels, particle effects, spring animations, and cinematic pacing. Built on Remotion with Imagen 4.0 for frames and Veo 3.1 for B-roll. Use when: (1) creating a product demo or launch video, (2) showcasing a UI/app/tool with cinematic polish, (3) building a social-ready video from screenshots and renders, (4) applying the liquid glass floating panel style, (5) composing Remotion videos with 3D transforms and spring animations. Triggers on: 'launch video', 'product video', 'liquid glass video', 'demo video', 'showcase video', 'remotion video', 'floating panel', 'glass aesthetic'.

関連スキル