Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Cline、めっちゃ便利、お金が飛ぶ💸
Search
iwamot
PRO
March 28, 2025
Technology
22k
22
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Cline、めっちゃ便利、お金が飛ぶ💸
2025-03-28
ENECHANGE I/O Day アウトプット大会(社内イベント)
iwamot
PRO
March 28, 2025
More Decks by iwamot
See All by iwamot
MCP Appsを作ってみよう
iwamot
PRO
4
830
自己紹介
iwamot
PRO
1
130
パワポ作るマンをMCP Apps化してみた
iwamot
PRO
0
1k
8万デプロイ
iwamot
PRO
2
440
AIエージェント・マイクロサービス時代。AWSでの手軽な構築法を考えて試してみた
iwamot
PRO
1
140
これがLambdaレス時代のChatOpsだ!実例で学ぶAmazon Q Developerカスタムアクション活用法
iwamot
PRO
10
3k
Developer Certificate of Origin、よさそう
iwamot
PRO
0
130
復号できなくなると怖いので、AWS KMSキーの削除を「面倒」にしてみた CODT 2025 クロージングイベント版
iwamot
PRO
1
230
復号できなくなると怖いので、AWS KMSキーの削除を「面倒」にしてみた
iwamot
PRO
3
220
Other Decks in Technology
See All in Technology
SREは、MCPとAutopilotをこう使え!
kazumax55
3
950
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
9
1.1k
顧客に向き合う開発組織へ。リアーキテクチャとフィーチャーチーム化で挑む組織改革
safie
0
2.3k
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
520
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
3
2k
CLIライブラリ開発を支える技術
htnabe
0
150
すぐできる衛星通信対応 あとは山奥に行くだけ
tatetate55
0
140
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
2
1k
AIに賢く動いてもらうためのコンテキスト〜Snowflake女子会 vol.8
snowwmn0824
0
150
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
120
AIエージェントの権限管理 3: Agentic RAG の Fine grained access control 編
ren8k
0
200
AIで社員の自主発信に広報目線を組み込む
_mossann_t
0
140
Featured
See All Featured
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
700
Balancing Empowerment & Direction
lara
6
1.3k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
A designer walks into a library…
pauljervisheath
211
25k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
The SEO identity crisis: Don't let AI make you average
varn
0
560
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
WENDY [Excerpt]
tessaabrams
14
39k
Building AI with AI
inesmontani
PRO
1
1.2k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
330
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Transcript
Cline、めっちゃ便利、お金が飛ぶ 2025-03-28 ENECHANGE I/O Day アウトプット大会(社内イベント) CTO室 岩本隆史
こんな話をします 1. Clineとは 2. 実施した初期設定 3. リファクタリングに使った結果 4. 所感 2/25
Clineとは
VS Codeの拡張機能で使えるAIアシスタント https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev 4/25
チャットでコーディング。Planで計画、Actで実行 5/25
いろんなプロバイダ、モデルが選べる 6/25
AIのやりたいことを自動承認できる 7/25
実施した初期設定
全体設定 モデル → PlanもActも、Amazon Bedrock / Claude 3.7 Sonnet(拡張思考なし) 自動承認
→ ファイル参照のみ許可 Memory Bank → 「Custom Instructions」をドキュメントどおり設定 セッションをまたいでコンテキストを維持できる https://docs.cline.bot/improving-your-prompting-skills/custom-instructions- library/cline-memory-bank 9/25
プロジェクト設定 memory-bank/ → ドキュメントどおり作成 https://docs.cline.bot/improving-your-prompting-skills/custom-instructions- library/cline-memory-bank cline_docs/projectBrief.md → ドキュメントを参考にChatGPTで作成 https://docs.cline.bot/getting-started/getting-started-new-coders/our-favorite-
tech-stack#example-project-brief .clineignore → .gitignoreをコピーして微調整 https://docs.cline.bot/improving-your-prompting-skills/prompting#clineignore- file-guide 10/25
initialize memory bank → $2.1170 memory-bank/ ├── .clinerules ├── activeContext.md
├── productContext.md ├── progress.md ├── projectbrief.md ├── systemPatterns.md └── techContext.md 11/25
.clinerules を作成 → $0.7450 プロジェクト固有のガイドライン https://docs.cline.bot/getting-started/getting-started-new-coders/our-favorite-tech- stack#clinerules-template のサンプルテンプレートを見せ、Clineで作成 12/25
リファクタリングに使った結果
タスク: iwamot/collmbo のモジュール分割 app/litellm_ops.py の関数について、litellmライブラリに依存しているものとそ うでないものが混在していると思います。 認知負荷を下げたいので、litellmに依存していない関数を、別のモジュールに移 動してください。 移動先のモジュール名については、移動対象の関数の責務を考慮して、適切なも のを考えてください。
これはリファクタリングです。アプリケーション全体の挙動は変更しないようご 注意ください。 14/25
Clineの回答 #1 リファクタリング計画: litellm_ops.py の分割 litellm_ops.py を分析した結果、以下の関数はlitellmライブラリに依存していな いことがわかりました: format_litellm_message_content -
文字列操作とslack_to_markdownの呼び出 しのみ format_assistant_reply - 文字列操作とmarkdown_to_slackの呼び出しのみ build_system_text - 文字列操作とslack_to_markdownの呼び出しのみ これらの関数は主にメッセージのフォーマット処理を担当しており、litellmライ ブラリに依存していません。 15/25
Clineの回答(つづき) 移動先モジュール名の提案 これらの関数の責務を考慮すると、適切な移動先モジュール名は message_formatting.py だと考えます。理由は: これらの関数はすべてメッセージのフォーマット処理に関連している Slackとマークダウン間の変換や、表示用のテキスト整形を行っている 名前が機能を明確に表している 16/25
Clineの回答(つづき) 実装計画 新しいファイル app/message_formatting.py を作成 上記3つの関数を litellm_ops.py から message_formatting.py に移動
litellm_ops.py で message_formatting.py からこれらの関数をインポート 既存のインポート文を適切に調整 テストが正常に動作することを確認 この変更により、コードの責務がより明確に分離され、認知負荷が軽減されま す。litellm_ops.pyはlitellmに関連する操作に集中し、message_formatting.pyはメ ッセージのフォーマット処理に特化します。 17/25
追加の指示を3つ はい、問題ないです。ただし、最後に ./validate.sh を実行し、エラーが出ないこ とを確認してください。エラーが出た場合は修正を検討してほしいですが、難し い場合は私に相談してください。 方向性はOKです。format_litellm_message_content、format_assistant_reply、 build_system_text に依存しているファイルが他にもあるかもしれないので、呼び 出し元はすべてimport文を修正してくださいね。
すでに考慮されているかもしれませんが、tests/litellm_ops_test.py ではなく tests/message_formatting_test.py に移動すべきテストケースもあるかもしれませ ん。必要に応じて、合わせてご対応ください。 18/25
タスク完了 → $4.1667 https://github.com/iwamot/collmbo/pull/80 でマージ 19/25
コスト:初期設定430円、リファクタリング625円 タスク USD JPY initialize memory bank 2.1170 318 .clinerules
作成 0.7450 112 リファクタリング 4.1667 625 update memory bank (参考) 3.1133 467 20/25
所感
めっちゃ便利 VScode + Cline + Claude 3.7 sonnet によるコーディング体験は個人的には1996 年のインターネットに近いものを感じた。これが無い時代にはもう戻らない。
https://x.com/nappa/status/1897441076094623787 22/25
お金が飛ぶ Cline + VS Code + Claude 3.7 Sonnet で、自分の使い方だと時給
500 円くらいの AI という感じ。ほっといて勝手に作業してくれるので、悪くない。移行系とかリ ファクタリングとかメモリーリーク調査とか、コードレビューを時給 500 円でや ってもらうという感じ。 https://x.com/voluntas/status/1894599131391562030 23/25
対策1:PlanをDeepSeek-R1に変更 モデル 1,000トークンの入力 ($) 1,000トークンの出力 ($) Claude 3.7 Sonnet 0.003
0.015 DeepSeek-R1 0.00135 0.0054 2025年2月時点では、ClineもDeepSeek-R1を推している https://docs.cline.bot/getting-started/model-selection-guide#best-models-by-mode-plan- or-act 24/25
対策2:プロンプトキャッシュを利用(申請中) https://aws.amazon.com/jp/bedrock/prompt-caching/ 25/25