正在加载陈远的个人网站

提示词

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

    用 Pre-commit 钩子限制 AI 生成文件体积的提示词

    Matt Pocock 分享一条提示词:用 pre-commit 钩子拦截超 5000 token 的文件,迫使 Agent 拆分模块、保持代码库整洁。

    Prompt of the day:
    
    Create a pre-commit hook that prevents files over 5,000 tokens. Tokens = bytes/4.
    
    Run only on staged files. Ignore files which are not authored by agents, like lockfiles or codegen.
    
    Provide explicit instructions on how to split files in the error message.
    
    The simplest investment I ever made in my codebase. So good.

    提示词 · 软件工程提示词 · 预提交钩子 · 文件拆分 · 代码质量 · Agent 工程

  2. 已加载全部提示词