Summarize the experience learned in this AI coding session and push it to the team knowledge base.
[Important] All generated documents must be written in Chinese.
When to Use
- When teamai suggests this session has valuable content worth sharing
- When you've solved a tricky problem and want to document the solution
- When you've discovered a useful workflow or pattern
- After a long session with diverse tool usage
How It Works
- Summarize: Review the tools used, problems solved, and patterns discovered in this session
- Generate document: Write a Markdown document in Chinese, covering:
- What the task/problem was
- Key decisions and reasons
- Solutions, workarounds, or patterns discovered
- Which tools/skills were particularly useful
- Pitfalls and precautions
- Save temporary file: Write to a temporary file
- Push to team: Run
teamai contribute --file <path> --title "<title>"
Document Template
[Required] The document must include YAML frontmatter for search indexing and knowledge discovery.
---
title: "<简短标题,描述核心问题或发现>"
author: <username>
date: <YYYY-MM-DD>
tags: [tag1, tag2, tag3]
---
## 背景
在做什么?遇到了什么问题?
## 解决方案
怎么解决的?关键步骤是什么?
## 经验总结
- 经验 1
- 经验 2
## 相关 Skills
- skill-name-1
- skill-name-2
Frontmatter field descriptions
| Field | Required | Description | Example |
|---|---|---|---|
| title | ✅ | Short title (<60 characters) | "K8s Pod OOM Troubleshooting Guide" |
| author | ✅ | Contributor username | jeffyxu |
| date | ✅ | Date YYYY-MM-DD | 2026-03-28 |
| tags | ✅ | 2-5 key tags | [k8s, oom, troubleshooting] |
Tag selection suggestions
Choose 2-5 from the following categories:
- Tech stack: python, typescript, go, k8s, docker, sglang, cuda
- Problem type: troubleshooting, performance, deployment, config, api
- Pattern: workflow, pattern, tool-usage, best-practice
- Scenario: debugging, testing, monitoring, security
Example
# AI 生成总结文档到 /tmp/session-summary.md 后
teamai contribute --file /tmp/session-summary.md --title "K8s pod 启动超时排查"
Important
- Run this as a sub-agent (Agent tool) to avoid polluting the main session's context
- The document is pushed to the team repo's
teamai-learningsbranch, underlearnings/, with no pull request - Team members will see it on their next
teamai pull - Keep summaries concise and actionable — this is a knowledge base, not a diary