SuperAPI AI Directory

pr

Coding & development

View repository

Updated 10-16 05:05

About this skill

When writing the PR body, use this template:

## Summary(摘要)

<图表、diff 草图,或树>

## Evidence(证据)

- **Before:** <截图 / 输出 / 失败中的测试运行>
  **After:** <截图 / 输出 / 通过了的测试运行>

## Merge Danger(合并风险)

**Door:** <单向门或双向门>

<可选:说明>

**Blast Radius:** <一个词的描述>

<Optional: potential impact of the merge>


## 各章节

跳过所有开场白,行文保持简短。使用 `GLOSSARY.md` 里用户的领域语言。

### Summary(摘要)

挑最小的、能把关键点讲清楚的视图。

- 逻辑或算法用伪代码展示:

```text
on(save)
  if content is unchanged
    return cached result
  write new content
  return fresh result
  • Show runtime control flow with a call tree:
submitForm
  createSession
    persistPrompt
    launchAgent
  navigateToSession
  • Show UI structure with a component tree, including the state and module boundaries that truly matter:
<SessionPage> (apps/example/src/routes/session.tsx)
  useSessionEvents()
  <SessionToolbar>
    <RunSkillButton> (packages/ui)
  • Show file responsibilities or large-scale refactors with a shallow file tree:
src/
├── commands/       # 解析用户动作
├── sessions/       # 掌管会话状态
└── transport/      # 发送 API 请求
  • Show component interactions, control flow, or data flow with Mermaid:
sequenceDiagram
    participant User
    participant UI
    participant Daemon
    User->>UI: 选择命令
    UI->>Daemon: 发送展开后的提示
    Daemon-->>UI: 流式返回结果
  • When the focus is "what changed" and the surrounding shape already exists, use diff. Make the shape of the diff match the topic.

Component changes:

 <SessionPage>
   useSessionEvents()
   <SessionToolbar>
+    <RunSkillButton />
   <SessionTimeline>
+    <SkillResultCard />

File layout changes:

 src/
 ├── commands/
+│   └── show-me.ts       # 展开 slash 命令
 ├── sessions/
-└── transport.ts
+└── transport/
+    ├── client.ts
+    └── stream.ts

Call tree or call stack changes:

 submitForm
   createSession
     persistPrompt
+    expandSkillMention
     launchAgent
-  navigateToSession
+  navigateToSession
+    subscribeToEvents

State or control flow changes:

 on(save)
-  write content
+  if content is unchanged
+    return cached result
+  write new content
+  invalidate cache
  • When most of the content is new, omitting context would obscure attribution or order, or the user needs a copyable target shape, show the full code block:
function expandSkill(command: string): string {
  const skillName = command.slice(1);
  return `use the ${skillName} skill`;
}

Guidelines

Place each view next to the short text it supports. Keep only the calls, files, props, state, and boundaries necessary to answer the user's current question or address the options needed for the current point of discussion.

You may use one of these views, or several, but it is unlikely you will use all of them. Use your judgment, and don't overwhelm the user.

Evidence

Concrete evidence proving the change actually works. Show a before-and-after comparison.

A screenshot is S-tier, provided the environment is already set up and the change itself is visual.

Execution-based evidence is A-tier: test results, console output. Use pseudocode to show the specific test that first failed and then passed.

Merge Danger

State whether it is a one-way door or a two-way door. A two-way door can be walked back; a one-way door cannot. A PR with low rollback cost is lower risk. Changes involving destructive operations or hard-to-reverse decisions are one-way doors.

Blast radius is the potential impact or scope of the changes introduced by this PR. Consider every possibility. For example: layout shifts, breakage for consumers, mobile responsiveness, etc.