正在加载陈远的个人网站

提示词

2026年10月7日 收录
  1. X · @mattpocockuk

    三档递进子代理提示词重构 AGENTS.md 省 Token

    分享一条可复用提示词,用三个由温和到激进的子代理重构 AGENTS.md,去除无效指令、渐进披露并拆分编码规范。

    Prompt of the day:
    
    /writing-for-agents my AGENTS.md is a hot mess, propose a series of restructurings that:
    
    - Remove no-ops
    - Use progressive disclosure
    - Move instructions to CODING_STANDARDS.md
    
    Apply your work over three subagents, each more radical than the last. Create a single PR.
    
    AGENTS.md is the most common source of token inefficiency. This prompt kills it dead.

    提示词 · 软件工程提示词 · 上下文工程 · 代码规范 · 渐进披露 · 文档重构 · Agent 工程

  2. X · @chenchengpro

    用 CLAUDE.md 压缩 Claude Code 输出成本

    通过项目级规则减少 Claude Code 的冗余输出,但收益取决于工作流频率与输入成本平衡。

    Claude Code 用户每天被吃掉的 token 里,有多少是废话?
    
    有人做了个实验:往项目根目录放一个 9 行的 CLAUDE.md,输出 token 直降 63%。仓库叫 claude-token-efficient,两天 1900 star。
    
    原理极其简单——Claude 默认回复充斥着 "Sure! Great question!" 开头、"I hope this helps!" 结尾、复述你的问题、给你没要求的建议、对明显错误的观点先说一句 "You're absolutely right"。这些「礼貌」全部消耗 token,信息量为零。
    
    这 9 行就是完整的 CLAUDE.md:
    
    ```
    - Think before acting. Read existing files before writing code.
    - Be concise in output but thorough in reasoning.
    - Prefer editing over rewriting whole files.
    - Do not re-read files you have already read.
    - Test your code before declaring done.
    - No sycophantic openers or closing fluff.
    - Keep solutions simple and direct.
    - User instructions always override this file.
    ```
    
    实测对比:
    → 代码 review:120 词 → 30 词(-75%)
    → 概念解释:180 词 → 65 词(-64%)
    → 纠正错误事实:55 词 → 20 词(-64%)
    → 信息零损失
    
    第三方独立基准测试验证:编码任务总成本省 17.4%。最极端的 v8 配置只有 7 行规则 + 20 次工具调用预算,逼 Claude 提前规划而不是边试边改。
    
    但作者很坦诚地指出了适用边界:这个文件本身每轮对话都会作为输入 token 加载。只有高频场景——Agent 循环、自动化流水线、日均 100+ prompt——才有净收益。偶尔聊两句反而更贵。
    
    本质上是一个「用输入 token 换输出 token」的游戏。在配额日益紧张的 2026,这个权衡值得认真算一笔账。
    
    https://t.co/gtLoULsJ7t

    提示词 · 软件工程提示词 · 上下文工程 · 研发效能 · Agent 工程

  3. X · @Voxyz_ai引用

    Claude 5 上下文工程的减法法则

    Thariq总结Claude 5如何精简系统提示词、按需加载技能并用测试驱动规格提升编码效果。

    Thariq at Anthropic just published the new rules of context engineering for Claude 5 models. the same rules let them cut ~𝟴𝟬% of Claude Code's own system prompt with no measurable loss on their coding evals. tldr:
    
    • CLAUDE.md is for gotchas only. delete anything the model learns by looking at the repo, and spend the tokens on what it would trip over
    • swap hard bans for style descriptions. their old rule was never write comments. the new one is write code that matches the comment density and naming around it
    • stop writing the same rule in both the system prompt and the tool description. keep only the tool description
    • split a long skill into several files and load only what the task needs
    • a spec does not have to be markdown. a test suite, an HTML mockup, or a function in another codebase all work
    
    worth more than the next ten skills.
    
    read it today, then run /doctor to trim your own CLAUDE.md and skills.

    提示词 · 软件工程提示词 · 技能 · 上下文工程 · Agent 工程 · 研发效能

  4. 已加载全部提示词