< 自用文 學習 > 用 Claude Code 做一個日歷

環境:

OS: Windows 11
IDE:TREA
Model: Sonnet / Qwen (免費 Token 用完)

參考:

Claude Code Beginner Guide – Get Started in 20 Minutes (2025)?

by?Alex Finn?油管博客

https://www.youtube.com/watch?v=iYiuzAsWnHU&list=TLGG1L6Rr9WQcXAwNzA5MjAyNQ

可以試試:https://cobalt.tools/? 下載。

正文:

一、安裝 Claude Code (以后用 CC 代替)

參考我之前的文章:?https://blog.csdn.net/davenian/article/details/148855154?

二、使用 QwenCode 代替 Sonnet

阿里有免費 90 天 Token,什么事兒還沒做 token 用了 30%,推薦 GLM? 20塊充值包。它們的方法都一樣, 給 CC 一個接口 URL, 然后是 API 格式的 KEY

TREA/Cursor 都是調用 PowerShell,我是用 npm 安裝的 CC ,第一次要在終端里運行“Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser" 再執行 claude 來運行 CC

引自 秋芝:https://ccnk05wgo092.feishu.cn/wiki/BxLTwlkvkiQhJkkJ7vgc95aZnMe

三、用 CC 制作一個日歷

1 告訴要做什么

prompt: 
i want to build a calendar app using next.js. it should show a calender view of this week and make it so i can create new events and assign dates and times to the events. it should be a realty beautiful app.  

用中文也一樣,提示詞:

我想使用 Next.js 構建一個日歷應用。它應該顯示本周的日歷視圖,并且讓我能夠創建新事件,為事件分配日期和時間。它應該是一個非常漂亮的應用。

當時沒想寫文章,第一版的截圖沒有做。? 大概是白色+淺灰線

2 告訴它改進

提示詞,我用的中文

好的,干得不錯。我首先想讓這個日歷看起來非常漂亮,有干凈的顏色和易于閱讀的簡約界面。請為我制定執行這個任務的計劃。現在它非常樸素有些丑,沒有任何樣式。  

做出來是這樣的,一行代碼沒敲,因為不會 next.js

3 創建規則文件 CLAUDE.md?

角色類似項目管理員,來指定規劃與規則。

留意文件名,CLAUDE 是大寫, md 是小寫。這個文章是用來設定規則。

## 標準工作流程
1. 首先,仔細思考問題,閱讀代碼庫中的相關文件,并將計劃寫入任務文件 todo.md。
2. 該計劃應包含一個待辦事項列表,以便您在完成時可以勾選。
3. 在開始工作之前,請與我確認,我將核實該計劃。
4. 然后,開始處理待辦事項,并隨時標記已完成的項目。
5. 在每一步中,請向我簡要說明您所做的更改。
6. 使您執行的每項任務和代碼更改都盡可能簡單。我們希望避免進行任何大規模或復雜的更改。每次更改應影響盡可能少的代碼。一切都以簡單為中心。
7. 最后,在 todo.md 文件中添加一個審查部分,總結您所做的更改和任何其他相關信息。

英文:

## Standard Workflow
1. First think through the problem, read the codebase for relevant files, and write a plan to tasks file todo.md.
2. The plan should have a list of todo items that you can check off as you complete them
3. Before you begin working, check in with me and I will verify the plan.
4. Then, begin working on the todo items, marking them as complete as you go.
5. Please every step of the way just give me a high level explanation of what changes you made
6. Make every task and code change you do as simple as possible. We want to avoid making any massive or complex changes. Every change should impact as little code as possible. Everything is about simplicity.
7. Finally, add a review section to the todo.md file with a summary of the changes you made and any other relevant information.

用@CLAUDE.me? 讓CC過一下。 視頻只用幾秒帶過“we're going to put in a few rules here that are really powerful that are going to make Claude code even better at coding So here's the rules we're going to put in I'll also include this down below in the description?” 沒有演示。 所以我沒領悟到,是在代碼第二次生成后,才讓 CC 讀取這個規則。 造成 todo.md 是空的。

todo.md 文件作用是,查看待辦清單 / Check List?

油管博客 Finn 用提示詞讓 AI 生成 PLAN

提示詞:

what do you think we should add to make this calendar even more powerful?

中文:

你認為我們應該添加什么功能來讓這個日歷應用更加強大?

(到此,看一下白送的 TOKEN 還有多少?)

以下是 CC 的 思考 輸出, FINN視頻里用的 OPUS 模型,給出的 PLAN 要強些有限。

what do you think we should add to make this calendar even more powerful?

? Thinking…

? The user is asking for my recommendations on what features we could add to make ??
? the calendar even more powerful. They want me to think about what additional ? ? ?
? functionality would enhance the calendar app. This is about planning and?
? suggesting features, not implementing them yet since I'm in plan mode.

? Let me think about what would make a calendar app more powerful and useful: ? ? ??

? 1. Data Persistence - Currently events are only stored in local state, so they ? ?
? disappear on refresh
? 2. Event Management - Can't edit, delete, or view event details
? 3. Different View Types - Only has weekly view, could add monthly, daily, year ? ?
? view
? 4. Recurring Events - No support for repeating events
? 5. Categories/Tags - Better organization of events
? 6. Search and Filtering - Finding specific events
? 7. Import/Export - Integration with other calendar systems
? 8. Notifications/Reminders - Alert users about upcoming events
? 9. Time Zone Support - Handle different time zones
? 10. Drag and Drop - Moving events around visually
? 11. Multi-user Support - Sharing and collaboration
? 12. Event Templates - Quick creation of similar events
? 13. Analytics/Insights - Time tracking, productivity metrics
? 14. Mobile Responsiveness - Better touch interactions
? 15. Keyboard Shortcuts - Power user features
? 16. Print Support - Physical calendar printing
? 17. Dark/Light Mode - Theme switching
? 18. Integration APIs - Connect with other services
? 19. Event Conflicts - Detect overlapping events
? 20. Meeting Features - Video calls, attendees, locations

? I should organize these into categories and prioritize them based on impact and ??
? development effort.

● Looking at the current calendar app, I can see several areas where we could ? ? ??
? significantly enhance its power and usability. Let me analyze what would make ? ??
? the biggest impact:

● Read(calendar-app\src\components\Calendar.tsx)
? ? ?Read 50 lines (ctrl+r to expand)
? ? ?calendar-app\CLAUDE.md

? Thinking…

? Based on my analysis of the current calendar app, I can see that it's beautiful ??
? but has some fundamental limitations:

? 1. Current State:?
? ? - Only weekly view
? ? - Events are stored in local state (lost on refresh)
? ? - Can only create events, not edit/delete them
? ? - No recurring events
? ? - No categories or organization
? ? - Basic event structure

? Let me think about what would make the biggest impact for users while keeping ? ??
? changes simple and manageable:

? High Impact, Low Complexity:
? 1. Data Persistence - Save events to localStorage so they persist across sessions?
? 2. Event Management - Edit, delete, and view event details?
? 3. Multiple Views - Monthly and daily views in addition to weekly
? 4. Drag & Drop - Move events by dragging them around

? Medium Impact, Medium Complexity:
? 5. Recurring Events - Daily, weekly, monthly repeating events
? 6. Event Categories - Color-coded categories for organization
? 7. Search & Filter - Find events quickly
? 8. Today Navigation - Quick jump to current date

? High Impact, Higher Complexity:
? 9. Import/Export - .ics file support for integration with other calendars
? 10. Notifications - Browser notifications for upcoming events
? 11. Event Conflicts - Detect and warn about overlapping events
? 12. Mini Calendar - Small month view for navigation

? I should prioritize based on user value and development complexity. The most ? ? ?
? impactful improvements would be:

? 1. Data Persistence (Critical - events disappear on refresh)
? 2. Event Management (Critical - can't modify events once created)
? 3. Multiple Views (High value - see different time scales)
? 4. Drag & Drop (High UX improvement)
? 5. Event Categories (Organization and productivity)
? 6. Recurring Events (Common use case)
? 7. Search/Filter (Scales with more events)

? 8. Today Navigation - Implementing a quick return to the current date enhances ? ?
? user experience by providing instant temporal context.

? I'll map out a strategic approach to streamline calendar navigation and improve ??
? overall usability.

● Read(calendar-app\src\types\event.ts)
? ? ?Read 8 lines (ctrl+r to expand)

? Thinking…

? Now I have a good understanding of the current calendar structure. Let me analyze?
? what would make this calendar significantly more powerful while keeping each ? ? ?
? change simple and focused.

? Current limitations I've identified:
? 1. Events are lost on page refresh (no persistence)
? 2. Can't edit or delete events once created
? 3. Only weekly view available
? 4. No event organization or categories
? 5. No recurring events
? 6. No quick navigation features
? 7. No search functionality
? 8. No drag-and-drop interaction

? I should organize these improvements by priority and complexity, focusing on ? ? ?
? features that provide the most user value with manageable implementation?
? complexity.

● Based on my analysis of the current calendar app, I can see several powerful ? ? ?
? enhancements that would significantly improve the user experience. Let me
? present a comprehensive plan for making this calendar much more powerful:

●User approved Claude's plan:
? ? 🚀 Calendar Power-Up Enhancement Plan

? ? 🎯 Priority 1: Essential Missing Features

? ? 1. Data Persistence System

? ? - Implement localStorage to save events permanently
? ? - Events currently disappear on page refresh - critical fix
? ? - Add import/export functionality for calendar data backup

? ? 2. Complete Event Management

? ? - Edit Events: Click to modify existing events
? ? - Delete Events: Right-click or button to remove events
? ? - Event Details View: Full modal with all event information
? ? - Duplicate Events: Quick copy function for similar events

? ? 3. Multiple Calendar Views

? ? - Monthly View: Traditional month grid layout
? ? - Daily View: Detailed single-day schedule
? ? - Year View: Overview of entire year
? ? - View Toggle: Smooth transitions between views

? ? 🎯 Priority 2: Enhanced User Experience

? ? 4. Drag & Drop Functionality

? ? - Move events by dragging to different times/days
? ? - Resize events by dragging edges to adjust duration
? ? - Visual feedback during drag operations
? ? - Snap-to-grid for precise placement

? ? 5. Event Categories & Organization

? ? - Color-Coded Categories: Work, Personal, Health, etc.
? ? - Category Management: Create/edit/delete categories
? ? - Smart Filtering: Show/hide events by category
? ? - Category Statistics: Time spent per category

? ? 6. Smart Navigation & Search

? ? - Today Button: Instant jump to current date
? ? - Date Picker: Calendar widget for quick navigation
? ? - Search Bar: Find events by title, description, or category
? ? - Quick Filters: Today, This Week, Upcoming, etc.

? ? 🎯 Priority 3: Advanced Features

? ? 7. Recurring Events System

? ? - Repeat Options: Daily, weekly, monthly, yearly
? ? - Custom Patterns: Every 2 weeks, specific weekdays
? ? - End Conditions: Never, specific date, number of occurrences
? ? - Exception Handling: Skip holidays, modify single instances

? ? 8. Time Zone & Scheduling Intelligence

? ? - Multi-timezone Support: Handle different time zones
? ? - Conflict Detection: Warn about overlapping events
? ? - Suggested Times: Smart scheduling for new events
? ? - Duration Templates: Common meeting lengths (15min, 30min, 1hr)

? ? 9. Productivity & Analytics

? ? - Time Tracking: See how much time spent in different categories
? ? - Weekly/Monthly Reports: Visual charts of time allocation
? ? - Goal Setting: Target hours per category
? ? - Productivity Insights: Patterns in your schedule

? ? 🎯 Priority 4: Integration & Polish

? ? 10. Import/Export & Integration

? ? - ICS File Support: Import from Google Calendar, Outlook
? ? - JSON Export: Backup and share calendar data
? ? - URL Sharing: Share individual events or entire calendars
? ? - Print Support: Beautiful printable calendar layouts

? ? 11. Notifications & Reminders

? ? - Browser Notifications: Alerts for upcoming events
? ? - Customizable Timing: 5min, 15min, 1hr before
? ? - Sound Alerts: Optional audio notifications
? ? - Snooze Function: Delay reminders

? ? 12. Advanced UI Features

? ? - Keyboard Shortcuts: Power user navigation (n = new event, t = today)
? ? - Mini Calendar: Small month view for quick navigation
? ? - Event Templates: Save common event types for quick creation
? ? - Dark/Light Mode: Theme switching
? ? - Mobile-First Touch: Optimized gestures for mobile devices

? ? 📊 Implementation Strategy

? ? Phase 1 (Week 1): Core functionality - persistence, editing, multiple views ? ??
? ? Phase 2 (Week 2): UX improvements - drag/drop, categories, search
? ? Phase 3 (Week 3): Advanced features - recurring events, analytics
? ? Phase 4 (Week 4): Polish & integration - import/export, notifications

? ? Each feature will be implemented incrementally with minimal code changes, ? ? ??
? ? following the principle of simplicity and focused improvements.


? Thinking…

? Great! The user has approved my comprehensive plan for making the calendar more?
? powerful. Now I need to start implementing this step by step, beginning with the?
? most critical features from Priority 1.

? Let me create a detailed todo list for the implementation, starting with the?
? essential missing features that will have the biggest immediate impact.

? I'll start with:
? 1. Data Persistence System (localStorage)
? 2. Complete Event Management (edit/delete events)
? 3. Multiple Calendar Views

? These are the foundational improvements that will make the calendar actually ? ? ?
? usable as a real productivity tool.

● Perfect! Let me create a comprehensive todo list to implement these powerful
? calendar enhancements step by step.

? Thinking…

? Great! Now I have my todo list ready. Let me start with the most critical feature?
? - implementing localStorage data persistence. This is essential because currently?
? all events disappear when the page is refreshed, which makes the calendar?
? basically unusable for real-world purposes.

? I'll need to:
? 1. Create a utility for localStorage operations?
? 2. Modify the main page component to save/load events from localStorage
? 3. Ensure proper serialization/deserialization of Date objects

? Let me start by marking the first todo as in progress and then implementing the?
? localStorage functionality.

● Let me start implementing these powerful features! I'll begin with the most ? ? ??
? critical improvement - data persistence so your events don't disappear when ? ? ??
? you refresh the page.

? Thinking…

? I'll start by creating a utility for localStorage operations to handle saving and?
? loading events. This will ensure proper serialization of Date objects and provide?
? a clean API for data persistence.

后面就是修改代碼,還是自問自答,估計運行十多分鐘... 打了幾盤 cod Mobile...

變化: 如上面說的 添加 Month Day Today

生成的 APP 就是弱雞,字都看不清,拖拽不能用。

4 修改到能接受

把上面的問題對 CC 提出:?

拖拽不能用, 文字invisiable             

修改后:

還這樣兒,不改了。

總結 :

IDE 工具沒作用就是個文件瀏覽器作用,用處不大。

$20 不能用 OPUS,對比演示與生成代碼的效果看,差距很大。

如果不編輯修改代碼,CC 在CMD/PowerShell 也一樣。

至少讓CC 使用 Qwen API, 感覺以上的內容做完,給的免費TOKEN,不夠用,充個茅臺起步。

前兩天讓表妹用我的 GLM 推薦碼注冊,沒收到贈送 TOKEN。 感覺被忽悠了。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/96091.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/96091.shtml
英文地址,請注明出處:http://en.pswp.cn/web/96091.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Gmail 數據泄露安全警報以及啟示

目前,大規模數據泄露和針對性釣魚攻擊持續威脅著數十億 Gmail 用戶的安全,受ShinyHunters、UNC6040、UNC6395等威脅組織攻擊,25 億 Gmail 用戶面臨極大風險;攻擊者已從暴力破解轉向社會工程學與混合勒索,而密碼復用、弱…

2024年6月GESPC++三級真題解析(含視頻)

視頻講解:GESP2024年6月三級C真題講解 一、單選題 第1題 解析: 答案C, 認證語言有C/C、Python、Scratch 第2題 解析: 答案B,判斷閏年口訣“ 4閏 100不閏 400再閏 ” 第3題 解析: 答案C&#xff…

AiPPT生成的PPT內容質量怎么樣?會不會出現邏輯混亂或數據錯誤?

作為一個每天要和 PPT 打交道的職場人,我用 AiPPT快一年了,從最初的 “試試看” 到現在的 “離不開”,最讓我驚喜的就是它生成的 PPT 內容質量 —— 不僅邏輯清晰、數據專業,還能精準貼合不同場景需求,完全沒遇到過邏輯…

DINOv3 新穎角度解釋

1. Gram錨定(Gram Anchoring)的創新視角 新穎角度:oriane_simeoni(Meta AI研究人員)在X上分享了一個關于Gram錨定的深入線程,強調這一技術如何解決自監督學習中長期訓練導致的特征圖退化問題。 解釋&#x…

【T2I】Discriminative Probing and Tuning for Text-to-Image Generation

paper:CVPR 2024 2403 https://arxiv.org/abs/2403.04321 code: https://github.com/LgQu/DPT-T2IAbstract 盡管文本到圖像生成(T2I)取得了進展,但先前的方法往往面臨文本 -圖像對齊問題,例如生成圖像中的關…

【CentOS7】使用yum安裝出錯,報HTTPS Error 404 - Not Found

【CentOS7】使用yum安裝出錯,報HTTPS Error 404 - Not Found問題描述解決辦法博主有話說問題描述 在CentOS7中安裝docker,切換了國內的鏡像源進行yum安裝,始終報如下錯誤:HTTPS Error 404 - Not Found 正在嘗試其他鏡像&#xff…

vulnhub:Kioptrix level 2

0x00、環境下載 鏈接:https://www.vulnhub.com/entry/kioptrix-level-11-2,23/ 0x01、前期準備 1.1、檢查文件 hash值對比無誤后解壓 1.2、編輯虛擬機網卡 當不支持橋接時候,如練WiFi無無線網卡 方法1: 修改type為nat 方法2:將…

【CentOS7】docker安裝成功后測試,報Unable to find image ‘hello-world:latest‘ locally

【CentOS7】docker安裝成功測試,報Unable to find image hello-world:latest locally問題描述問題解決問題描述 根據大佬的博文【CentOS7】Linux安裝Docker教程(保姆篇),以及結合之前的博文【CentOS7】使用yum安裝出錯&#xff0…

福彩雙色球第2025104期籃球號碼分析

明天是2025年9月9號星期二,深圳天氣大雨。福彩雙色球第2025104期籃球號碼分析,上期開出籃球16,數字形式是1路球,合數偶數大號區域1字頭數字。籃球1尾數01和11遺漏21期上次遺漏8期上上次遺漏7期,籃球3尾數03和13遺漏18期…

[手寫系列]Go手寫db — — 第三版(實現分組、排序、聚合函數等)

[手寫系列]Go手寫db — — 第三版第一版文章地址:https://blog.csdn.net/weixin_45565886/article/details/147839627 第二版文章地址:https://blog.csdn.net/weixin_45565886/article/details/150869791 🏠整體項目Github地址:ht…

狂想-機器人觸感陣列理論驗證方案

將方案改為使用**限制移動范圍的半滾球**作為理論驗證原型,是一個極具智慧且可行的降維策略,它將極大降低驗證門檻,但同時會犧牲部分性能。### **方案轉變后的核心變化**1. **原理替換**:從依賴**光學流**(拍攝表面紋理…

UNBIASED WATERMARK:大語言模型的無偏差水印

摘要1.背景與問題提出大語言模型(LLMs)的快速發展引發了對其可能被濫用的擔憂。為降低這種風險,將水印技術融入大語言模型,以實現對模型輸出的追蹤和溯源成為一種思路。而此前研究認為,水印強度和模型輸出質量之間存在…

MySQL——事務、MVCC

目錄 什么是事務? 事務的四大特性 事務的隔離級別 事務的原理 redo log undo log MVCC實現原理 概念 隱藏字段 undo log版本鏈 readview 什么是事務? 事務是一組操作的集合,它是一個不可分割的工作單位,事務會把所有的操…

光伏項目無人機踏勘--如何使用無人機自動航線規劃APP

手機號免費注冊iSolarBP,一起來學習吧,注冊獲取無人機航線規劃APP https://isolar-bp.sungrowplant.com/isolarbp#/login?qrcodeId1952928161454551042https://isolar-bp.sungrowplant.com/isolarbp#/login?qrcodeId1952928161454551042 登錄--下載航…

優先搜索(DFS)實戰

目錄 一、DFS通用解題思路 二、逐題拆解 三、四題對比 四、總結:DFS解決矩陣問題的“萬能模板” 在算法解題中,矩陣連通性問題是高頻考點,而深度優先搜索(DFS)是解決這類問題的核心工具之一。它通過“一條路走到…

門控MLP(Qwen3MLP)與稀疏混合專家(Qwen3MoeSparseMoeBlock)模塊解析

Qwen3MLP Qwen3MLP是基于門控機制的MLP模塊,采用了類似門控線性單元(GLU)的結構。它通過三個線性變換層(gate_proj、up_proj和down_proj)和SiLU激活函數,先將輸入從隱藏維度擴展到中間維度,經過…

產線相機問題分析思路

現象:復現問題 原因:問題分析、溯源,定位根本原因; 方案:提出解決方案、規避措施 驗證:導入、驗證方案是否可行(先小批量、再大批量);一. 現象產線反饋4pcs預覽又臟污、劃…

【開關電源篇】EMI輸入電路-超簡單解讀

1. 輸入電路主要包含哪些元件?濾波設計需遵循什么原則? 輸入電路是電子設備(如開關電源)的“入口”,核心作用是抑制電磁干擾(EMI)、保護后級電路,其設計直接影響設備的穩定性和電磁…

勝券POS:打造智能移動終端,讓零售智慧運營觸手可及

零售企業運營中依然存在重重挑戰:收銀臺前的長隊消磨著顧客的耐心,倉庫里的庫存盤點不斷侵蝕著員工的精力,導購培訓的成本長期居高不下卻收效甚微……面對這些痛點,零售企業或許都在等待一個破局的答案。百勝軟件勝券POS&#xff…

(回溯/組合)Leetcode77組合+39組合總和+216組合總和III

為什么不能暴力,因為不知道要循環多少次,如果長度為n,難道要循環n次么,回溯的本質還是暴力,但是是可以知道多少層的暴力 之所以要pop是因為回溯相當于一個樹形結構,要pop進行第二個分支 剪枝:…