匠人学院 JR Academy
  • Position

    Where am I now, and where should I go?

    How your job is changing, where your experience can take you and what you still need for a target role, worked out from what you have actually done. Free, and the full result needs no sign-up.

    Analyse my career and skills

    Look up a career

    Will AI replace my job?AI impact and transition paths for common careersNew jobs in the AI eraWhat they do, what they need, how to move in

    Focused tools

    AI Engineer interview readiness30 timed questions on what you still need before interviewsCareer personality testDirections that suit how you workReturning to China checkJob prospects in China by school, major and graduation date

    AI coach

    Talk to your AI coachStill unsure after your result? Talk through what is holding you back
  • Core courses

    AI Engineer BootcampEngineering bootcamp from LLM apps to agentsAI Engineer Full-Stack Project Class16 weeks · RAG and full-stack AI projectsVibe Coding Masterclass8 weeks · direct agents to build and ship a productAI Essentials10 hours · use AI for email, reports, data and copyAI Office Automation Course8 weeks · help a whole company adopt AIOne-Person Company (OPC) Bootcamp15 weeks in person · build a one-person company with AIAll courses →

    AI engineering

    Machine Learning & Data Engineering Full-Stack ClassAI Agent & MCP Project BootcampAI Engineer Core TechniquesAI Engineer FoundationsAI Engineer Advanced: RAG to Agents and TuningClaude Code TasterAll AI engineering courses →

    AI at work

    AI Coding for everyoneClaude Code One-Day Masterclass (Non-Technical)Enterprise AI Automation BootcampAI Marketing BootcampAI Risk, Governance and Audit CourseOpenClaw 4-Week Personal AI Assistant BootcampAll AI-at-work courses →

    Career development

    AI Product Manager (BA) Bootcamp + InternshipAustralia IT Interview BootcampAustralia IT Technical Interview BootcampAustralia IT Resume BootcampAustralia Big Tech Job Search BootcampAustralia IT Career Planning BootcampAll career courses →

    Learn free first

    Vibe CodingAI for office workPrompt MasterAI EngineerAI data analysisResource centerInstructorsAll learning paths →
  • Evidence

    What will convince an employer?

    Certifications, projects, team work and competition entries, collected into one portfolio.

    See the portfolio

    Certifications

    Cert Master · all certificationsPrep and mock exams for AWS, Azure, GCP, Claude and moreAWS CLF-C02Entry-level AWS cloud certificationAWS SAA-C03Entry certification for cloud architectsClaude certificationsAnthropic Claude certification seriesAll certifications →

    Projects and team work

    P3 team projectsBuild a project with real teammates in a simulated team workflowP3 project experienceThe parts of a P3 project that go on your resumeDemo DayProject showcaseP3 certificatesProof once a project is completeAll of P3 →

    Competitions and work

    HackathonsBuild something against the clockSubmit your workAdd your project to the showcaseCareerOS portfolioDo tasks in the desktop app; your results become portfolio pieces
    Cert MasterBrowser extension, app and mini programScreenshot a question for analysis and practise anywhereAbout Cert Master
  • Connect

    How do I get myself in front of employers?

    Resume, interviews, referrals and mentors. See how far you are from the target role first, then decide what to fix.

    Start with Jobpin

    Resume and openings

    Graduate careersGraduate preparation across Australia, China, Malaysia, Singapore, the US and UKJobpinAI job search workspace: resume, roles, applicationsAI resumeRewrite your resume against a job descriptionReferralsRoles shared by students and mentorsOpportunitiesInternships, projects and collaborationsOffer boardOffers students have received

    Interviews

    AI Engineer interview guideSeven areas, with worked examplesFDE interview guideFive rounds, from scoping to the customer roundAI mock interviewPractise by text or voice and see the gapsInterview storiesReal interview experiencesSystem Design handbookPrepare for system design interviewsAll interview prep →

    Mentors

    1:1 mentorsBook AI, career and technical mentors by the hourGroup tutoringShare a tutor with a few others and pay less eachCareer coachingResume, interview and direction packages
    Jobpin desktopOne workspace for the whole job searchOrganise real experience and refine resume versions for target roles on macOS or Windows.About Jobpin
BusinessMembershipDownload CareerOS
0
匠人学院 JR Academy

Follow Us

linkedinfacebooktwitterinstagramyoutube

We Accept

/image/layout/pay-paypal.png/image/layout/pay-visa.png/image/layout/pay-master-card.png/image/layout/pay-airwallex.png/image/layout/pay-alipay.png
Airbotix · AI learning & creation for kids Another Life · AI story game
Products46

CareerOS and tools

  • CareerOS
  • Cert Master
  • Jobpin
  • Jobpin web
  • Jobpin report
  • Jobpin desktop download
  • My job search reports
  • Buy report credits
  • Jobpin billing
  • AI Toolbox
  • AI Skill Marketplace

Membership

  • Membership
  • AI membership

Courses

  • Bootcamps
  • Training Camp
  • Kanban learning
  • AI Builder course
  • MCP course
  • NotebookLM workshop
  • Business Analyst course
  • Web Full-Stack Bootcamp
  • DevOps Bootcamp
  • Data Engineering Bootcamp
  • Data Analysis Bootcamp
  • Coding for Beginners
  • Algorithm Bootcamp

Career services

  • Graduate careers
  • Graduate careers in Australia
  • Graduate careers in China
  • Graduate careers in Malaysia
  • Graduate careers in Singapore
  • Graduate careers in the US
  • Graduate careers in the UK
  • 1:1 coaching
  • Career coaching
  • AI Engineer VIP
  • BA & PM Internship
  • Data Science Internship
  • Data Analysis Internship
  • Marketing Internship
  • Resume Review
  • Interview Coaching
  • Job Application Service
  • Job Monitoring
  • LinkedIn Management
  • LinkedIn Networking
Library57

Learning paths

  • All Learning Paths
  • AI Engineer
  • Context Engineering
  • Vibe Coding
  • Prompt Master
  • AI Builder
  • AI Product Manager
  • Python Basics
  • AI Productivity
  • AI Data Analysis
  • AI Finance
  • AI Content Creation
  • AI Image Creation
  • Frontend Development
  • Hermes Agent
  • OpenClaw Local Agent

Interactive labs

  • Prompt Lab
  • Frontend Lab
  • JavaScript Lab
  • Python Lab
  • AWS Lab
  • Azure Lab
  • LLM Lab
  • Git Lab

Reference and guides

  • Resources
  • Wiki
  • Cheat sheets
  • Roadmaps
  • AI roadmaps
  • Videos
  • Ebooks
  • Blog
  • Interview handbook
  • Mock exams
  • Free resources

Cities

  • Sydney
  • Melbourne
  • Brisbane
  • Adelaide
  • Singapore
  • Kuala Lumpur
  • London
  • New York
  • San Francisco
  • Los Angeles
  • Seattle
  • Toronto
  • Vancouver

Immigration

  • Australia Immigration
  • Skilled Visa 189/190/491
  • Employer Sponsored 482/186/494
  • Business Visa 188/888
  • UK Immigration
  • US Immigration
  • Canada Immigration
  • Singapore immigration
  • Malaysia immigration
Business20

For business

  • AI for Business
  • Business portal sign-in
  • Corporate Training
  • Internship Partnership
  • Recruitment Partnership
  • Enterprise (EN)

Metatree AI Lab

  • Metatree AI Lab (Chinese)
  • AI solutions (Chinese)
  • Digital employees (Chinese)
  • Case studies (Chinese)
  • Metatree AI Lab
  • AI services
  • Digital employees
  • Case studies

AI education for kids

  • Airbotix — AI Learning & Creation for Kids
  • AU Family Resource Hub
  • NAPLAN Report Guide
  • My School Data Guide
  • Sydney Private School Fees 2026
  • Kids Coding Programs
About15

Company

  • About Us
  • Our Mentors
  • Become a Mentor
  • Metaverse Classroom
  • JR Careers
  • Another Life — AI Story Game
  • Contact Us

Help and policies

  • FAQs
  • Terms & Conditions
  • Privacy Policy
  • Cancellation & Refund Policy
  • Site map

Friend links

  • CS Browser

Contact

  • hello@jiangren.com.au
  • 0421-672-555

Offices

Level 10b, 144 Edward Street, Brisbane CBD (Headquarter)
Level 2, 171 La Trobe St, Melbourne VIC 3000
45A13, Block B, Oriental Hope Tianxiang Plaza, 500 Tianfu Avenue Middle Section, Wuhou District, Chengdu, Sichuan, China
Business Hub, 155 Waymouth St, Adelaide SA 5000
Disclaimer
footer-disclaimerfooter-disclaimer

JR Academy acknowledges Traditional Owners of Country throughout Australia and recognises the continuing connection to lands, waters and communities. We pay our respect to Aboriginal and Torres Strait Islander cultures; and to Elders past and present. Aboriginal and Torres Strait Islander peoples should be aware that this website may contain images or names of people who have since passed away.

All content on the JR Academy website, including course materials, logos, and information provided, is protected under Australian intellectual property laws. Unauthorized use, sale, distribution, reproduction, or modification is strictly prohibited. Violations may result in legal action. By accessing our website, you agree to respect our intellectual property. JR Academy Pty Ltd reserves all rights, including patents, trademarks, and copyrights. Any infringement will be subject to legal prosecution. View Terms of Service

© 2017-2026 JR Academy Pty Ltd. All rights reserved.

ABN 26621887572

HomeLearnCoursesCerts
  1. Home
  2. Learn
  3. Blog
  4. Cline 实战手册:开源免费的 VS Code AI 编程 Agent — 进阶技巧与实战案例
JR Academy · BlogCareer insights

Cline 实战手册:开源免费的 VS Code AI 编程 Agent — 进阶技巧与实战案例

.clinerules 项目规则、成本控制、Auto-approve 自动化、多模型策略、真实项目案例

Published2026-12-01
Reading time2 min
Author

Contents

  • .clinerules:给 AI 定规矩
  • 成本控制:花最少的钱办最大的事
  • 模型分级策略
  • 降低成本的实操技巧
  • Auto-approve:信任之后提速
  • 实战案例:全栈 CRUD 应用
  • Memory Bank:跨会话记忆

Cline 进阶配置与实战

.clinerules:给 AI 定规矩

.clinerules 是 Cline 的项目级配置——类似 Cursor 的 .cursorrules,告诉 AI 这个项目的编码规范、技术栈偏好和注意事项。它是 markdown 文件,放在项目根目录或 .clinerules/ 目录下。

<!-- .clinerules/coding-style.md -->
# 编码规范

- TypeScript strict mode,不用 any
- React 组件用函数式 + hooks,不用 class
- 样式用 Tailwind CSS,不写自定义 CSS
- 状态管理用 Zustand,不用 Redux
- API 请求用 fetch,不装 axios
- 测试用 Vitest + Testing Library
- 提交信息用 conventional commits 格式

# 目录结构
- 组件放 src/components/{Feature}/
- hooks 放 src/hooks/
- 工具函数放 src/lib/

高级用法——条件规则,让前后端代码遵循不同规范:

<!-- .clinerules/frontend.md -->
# 仅当修改 src/components/ 或 src/pages/ 下的文件时生效

- 组件必须导出 Props 类型
- 每个组件配一个 .test.tsx
- 用 @tanstack/react-query 做数据请求

.clinerules 会随 git 提交,团队成员拉代码就自动生效——比口头传达「我们项目不用 Redux」靠谱得多。

成本控制:花最少的钱办最大的事

Cline 的 BYO-key 模式意味着你为每个 token 付费。好消息是你有完全的控制权,坏消息是不注意会烧钱。

模型分级策略

任务复杂度        推荐模型              大约成本/万 token
─────────────────────────────────────────────────
简单(改名/加注释)  Gemini Flash / DeepSeek   ~$0.01
中等(写功能/修 bug) Claude Sonnet            ~$0.09
困难(架构重构)      Claude Opus              ~$0.45
─────────────────────────────────────────────────

Cline 侧边栏右上角实时显示当前任务的 token 消耗和成本。养成习惯:每完成一个任务瞄一眼花了多少钱。

降低成本的实操技巧

  1. 精准 @ 引用——手动 @ 相关文件,比让 Cline 搜索全项目省 50%+ token
  2. 任务拆小——一个大任务拆成 3-5 个小任务,每个新开对话。避免上下文越滚越大
  3. Plan 先行——Plan 模式只读文件,token 消耗远低于 Act 模式的试错循环
  4. 及时结束对话——任务完成就开新对话,不要在同一个对话里追加不相关的任务
# 真实成本参考(Claude Sonnet,一个下午的工作量)
# 10 个小任务(新建组件、修 bug、加测试)
# 总计 ~150 万 token → 大约 $4.50
# 平均每个任务 $0.45

Auto-approve:信任之后提速

Cline 默认每步都要你确认,安全但慢。熟悉后可以开启 Auto-approve:

级别 自动批准的操作 适合场景
保守 只批准读文件 刚开始用 Cline
中等 读文件 + 安全命令(lint/test) 日常开发
激进 读/写文件 + 所有命令 信任度高、有 git 兜底
YOLO 全部自动批准 实验性项目、不怕搞坏

我的建议:日常开发用「中等」级别——自动批准读操作和 npm test / npm run lint 这类安全命令,文件修改还是手动确认。配合 git 分支使用,Cline 在 feature branch 上随便折腾,main 不受影响。

实战案例:全栈 CRUD 应用

来看一个完整的真实案例——用 Cline 从零搭建一个 Todo 应用:

用 Next.js 14 + Prisma + SQLite 搭一个 Todo 应用:
- 首页显示待办列表,支持新增、完成、删除
- 用 Server Actions 处理数据操作
- Tailwind CSS 做样式,要好看
- 加一个筛选功能:全部 / 未完成 / 已完成
- 写 3 个核心测试用例

Cline 的执行过程(约 15 分钟,花费 ~$2):

  1. Plan 阶段(2 分钟):列出技术方案、文件结构、依赖清单
  2. 初始化(3 分钟):npx create-next-app、装 Prisma、配 schema
  3. 写业务代码(5 分钟):组件、Server Actions、数据库操作
  4. 样式打磨(3 分钟):Tailwind 样式、响应式布局
  5. 测试 + 修复(2 分钟):跑测试、修失败的 case、再跑

全程 Cline 自动跑了 npm run dev,用内置浏览器截了 3 次图验证 UI,修了 2 个自己写出来的 bug。

Memory Bank:跨会话记忆

Cline 的对话记忆不会在关闭后保留。社区流行的解决方案是 Memory Bank——用一组 markdown 文件记录项目上下文:

<!-- cline-memory-bank.md -->
# 项目概述
这是一个 SaaS 计费系统,用 Next.js + Stripe + Supabase。

# 架构决策
- 认证用 Supabase Auth,不用 NextAuth
- 支付用 Stripe Checkout,不做自定义支付页
- 定价模型:三档月付(Basic/Pro/Enterprise)

# 重要约定
- 所有金额用 cents(整数),不用浮点数
- 时区统一用 UTC
- 邮件模板在 src/emails/,用 React Email

把这个文件放在 .clinerules/ 目录下,每次新对话 Cline 都会读到这些上下文。比每次手动解释项目背景高效 10 倍。

Author
Share or copy the link
← Previous articleCline 实战手册:开源免费的 VS Code AI 编程 Agent — 核心功能深度解析Next article →Cline 实战手册:开源免费的 VS Code AI 编程 Agent — 常见问题、定价与选型建议

Related articles

USYD 医疗初创盘点、网络平台注意义务法案、全身 MRI 广告研究

2026-12-02

UQ 皮肤癌在线硕士开办 20 周年、中澳绿色钢铁对话、HIV 预防提醒

2026-12-02

UNSW iFire 2.3 火场模拟系统、AI 卵巢癌预后研究、艺术家与 AI 版权调查

2026-12-02

ANS-C01 退役倒计时 29 天 · AIB-C01 Beta $50 新认证上线 · MLA-C02 Beta 报名开放

2026-12-02

Amazon开放首个自研大模型Ergo,代理作弊率实测差距悬殊,Anthropic格密码结果暂无现实威胁

2026-12-02

GitHub Copilot 实战指南 — Copilot AI Code Review:30 秒让 AI 帮你审 PR,三档深度随需切换

2026-12-01
View all articles →

Done reading? Next steps

Not sure what to learn next? Tell us where you are

Tell us what you do now and where you want to go. See your gaps in skills, evidence, experience, expression and positioning, and what to work on first. No sign-in needed.

Compare with my situation
  • SkillAI Coding for EveryoneShip real products with Cursor + AI, no coding background needed. The 6-week Foundation track builds 4 deliverables; the 8-week Advanced track adds an Admin CMS, a chatbot and a data dashboard.See the program →
  • PositioningLearning roadmaps by roleFrontend, backend, data, AI and more, laid out stage by stage in the order to learn them.All roadmaps →
  • ExpressionTry an AI mock interviewPick a role and run a mock interview to practise explaining your experience and projects.Practise now →

Not sure what to do next?

Take this page's topic with you and see where your gaps are.

Compare with my situation
JR Academy
AI learning for the global Chinese community
BootcampsFree resourcesLearn AICareer coaching
精选推荐
AI Career Impact Map
Assess career exposure and explore transition paths and learning options
Popular tool
AI & Data Bootcamps
Build your skills through structured courses and hands-on projects
Popular courses
1:1 Career Coaching
Work with an experienced mentor on your resume and interview preparation
Career coaching
Custom Corporate Training
AI training tailored to your team
Business services
Popular tags
Vibe CodingAI codingCursorClaudeJob searchPromptFrontend developmentBackend development
Subscribe to updates

Receive AI learning resources, technical tutorials and career advice by email.

We respect your privacy and do not send spam.