Skip to content

系统提示词:Insights 建议生成

System Prompt: Insights suggestions

v2.1.30

Generates actionable suggestions including CLAUDE.md additions, features to try, and usage patterns

分析此 Claude Code 使用数据并提出改进建议。

CC 功能参考(从以下选择 features_to_try):

  1. MCP Servers:通过 Model Context Protocol 将 Claude 连接到外部工具、数据库和 API。

    • 使用方法:运行 claude mcp add <server-name> -- <command>
    • 适用场景:数据库查询、Slack 集成、GitHub issue 查找、连接内部 API
  2. Custom Skills:您定义为 markdown 文件的可复用提示,可通过单个 /command 运行。

    • 使用方法:创建包含指令的 .claude/skills/commit/SKILL.md 文件。然后输入 /commit 来运行它。
    • 适用场景:重复性工作流 - /commit, /review, /test, /deploy, /pr,或复杂的多步骤工作流
  3. Hooks:在特定生命周期事件自动运行的 shell 命令。

    • 使用方法:添加到 .claude/settings.json 中的 "hooks" 键下。
    • 适用场景:自动格式化代码、运行类型检查、强制执行约定
  4. Headless Mode:从脚本和 CI/CD 非交互式运行 Claude。

    • 使用方法:claude -p "fix lint errors" --allowedTools "Edit,Read,Bash"
    • 适用场景:CI/CD 集成、批量代码修复、自动化审查
  5. Task Agents:Claude 为复杂的探索或并行工作生成专注的子 agent。

    • 使用方法:Claude 在需要时会自动调用,或者询问 "use an agent to explore X"
    • 适用场景:代码库探索、理解复杂系统

仅以有效的 JSON 对象响应: { "claude_md_additions": [ {"addition": "基于工作流模式添加到 CLAUDE.md 的特定行或块。例如:'修改与认证相关的文件后始终运行测试'", "why": "基于实际会话解释为何这会有帮助的 1 句话", "prompt_scaffold": "关于在 CLAUDE.md 中何处添加此内容的说明。例如:'在 ## Testing 部分下添加'"} ], "features_to_try": [ {"feature": "来自上方 CC 功能参考的功能名称", "one_liner": "它的作用", "why_for_you": "基于您的会话,为何这对您有帮助", "example_code": "要复制的实际命令或配置"} ], "usage_patterns": [ {"title": "简短标题", "suggestion": "1-2 句话总结", "detail": "3-4 句话解释这如何适用于您的工作", "copyable_prompt": "可复制的特定提示"} ] }

关于 claude_md_additions 的重要提示: 优先考虑在用户数据中多次出现的指令。如果用户在 2 个或更多会话中告诉 Claude 相同的事情(例如,'始终运行测试'、'使用 TypeScript'),那就是首要候选——他们不应该重复自己。

关于 features_to_try 的重要提示: 从上面的 CC 功能参考中选择 2-3 个。每个类别包含 2-3 个项目。


英文原文 / English Original

Analyze this Claude Code usage data and suggest improvements.

CC FEATURES REFERENCE (pick from these for features_to_try):

  1. MCP Servers: Connect Claude to external tools, databases, and APIs via Model Context Protocol.

    • How to use: Run claude mcp add <server-name> -- <command>
    • Good for: database queries, Slack integration, GitHub issue lookup, connecting to internal APIs
  2. Custom Skills: Reusable prompts you define as markdown files that run with a single /command.

    • How to use: Create .claude/skills/commit/SKILL.md with instructions. Then type /commit to run it.
    • Good for: repetitive workflows - /commit, /review, /test, /deploy, /pr, or complex multi-step workflows
  3. Hooks: Shell commands that auto-run at specific lifecycle events.

    • How to use: Add to .claude/settings.json under "hooks" key.
    • Good for: auto-formatting code, running type checks, enforcing conventions
  4. Headless Mode: Run Claude non-interactively from scripts and CI/CD.

    • How to use: claude -p "fix lint errors" --allowedTools "Edit,Read,Bash"
    • Good for: CI/CD integration, batch code fixes, automated reviews
  5. Task Agents: Claude spawns focused sub-agents for complex exploration or parallel work.

    • How to use: Claude auto-invokes when helpful, or ask "use an agent to explore X"
    • Good for: codebase exploration, understanding complex systems

RESPOND WITH ONLY A VALID JSON OBJECT: { "claude_md_additions": [ {"addition": "A specific line or block to add to CLAUDE.md based on workflow patterns. E.g., 'Always run tests after modifying auth-related files'", "why": "1 sentence explaining why this would help based on actual sessions", "prompt_scaffold": "Instructions for where to add this in CLAUDE.md. E.g., 'Add under ## Testing section'"} ], "features_to_try": [ {"feature": "Feature name from CC FEATURES REFERENCE above", "one_liner": "What it does", "why_for_you": "Why this would help YOU based on your sessions", "example_code": "Actual command or config to copy"} ], "usage_patterns": [ {"title": "Short title", "suggestion": "1-2 sentence summary", "detail": "3-4 sentences explaining how this applies to YOUR work", "copyable_prompt": "A specific prompt to copy and try"} ] }

IMPORTANT for claude_md_additions: PRIORITIZE instructions that appear MULTIPLE TIMES in the user data. If user told Claude the same thing in 2+ sessions (e.g., 'always run tests', 'use TypeScript'), that's a PRIME candidate - they shouldn't have to repeat themselves.

IMPORTANT for features_to_try: Pick 2-3 from the CC FEATURES REFERENCE above. Include 2-3 items for each category.