| name | gatekeeper |
| description | 通用守门员 skill,用于在复杂、高风险、多人接力、多步骤、跨文件、规则变更、方案决策、创建新资料或推进下一阶段之前,先做前置检查:澄清目标、确认依据、识别风险、避免重复建设、限定范围、确定唯一下一步和停止点。Use when an assistant should pause before acting to save tokens, improve project efficiency, protect project quality, and prevent scope drift, duplicate work, unsupported assumptions, or premature completion claims. |
守门员
Purpose
Use this skill before taking action when the next step is not obviously safe.
The guard answers three questions:
- What exactly are we trying to do?
- What evidence makes this step allowed?
- What is the smallest safe next action?
When To Use It
Use the gatekeeper when:
- the task affects multiple files, people, or later stages
- the user asks to continue, finish, publish, create a durable item, change a rule, or move to the next stage
- evidence is unclear, scope may expand, or duplicate work is possible
- one wrong step would create meaningful rework, quality risk, or downstream confusion
Do not use the full guard when:
- the user asks for one clear small command
- a single-file change has a clear target, evidence, and scope
- the task is only an explanatory answer and creates no durable change
Lightweight And Full Modes
For low-risk tasks, use a lightweight check:
Target:
Evidence:
Next step:
For high-risk, cross-object, durable, or stage-advancing work, use the full template.
The gatekeeper is not an approval board. Its job is to keep work moving safely, not to create delay. Decide directly when current evidence supports a decision; stop only when evidence is missing, scope is uncontrolled, or risk is too high.
Why It Saves Tokens
- It locks the target before reading broadly, so old context, similar examples, and unrelated material do not flood the task.
- It identifies the minimum evidence needed for the next action.
- It marks out-of-scope work early, reducing unnecessary searches, explanations, and debates.
- It checks for duplication before creating new files, rules, templates, or skills.
- It stops when evidence is missing instead of producing long output in the wrong direction.
Why It Improves Project Efficiency
- It defines what to do, what not to do, and where to stop before execution starts.
- It turns complex work into one smallest safe next step.
- It prevents repeated objects from increasing maintenance and coordination cost.
- It leaves a compact handoff: done, open, blocked, and next.
- It reruns the guard when the direction changes, catching small drift before it becomes rework.
Why It Protects Project Quality
- It requires evidence for action, reducing decisions based on memory, guesses, or stale material.
- It separates in-scope from out-of-scope work, preventing unauthorized expansion and mixed responsibilities.
- It names forbidden actions and stop points, preventing premature publication, completion claims, or skipped checks.
- It separates symptoms from root causes, reducing shallow fixes.
- It verifies the delivered object directly and preserves open risks for the next step.
Relationship To Scripts
The gatekeeper is not a script. It is a pre-action decision process.
Under the gatekeeper mechanism, necessary scripts may be built when they make the work safer or cheaper to repeat. Good script candidates include:
- recurring checks that are easy to miss manually
- stable reading, comparison, scanning, validation, or generation tasks
- repeated copy, search, or formatting work that wastes tokens
- quality checks that should be repeatable and verifiable
- shared checks that multiple people or agents need to run consistently
Still run the guard before building a script:
- define the single problem the script solves
- check whether an existing tool, script, or process can be reused
- limit the script's inputs, outputs, and usage boundary
- do not write a script for every check; script only when the task is recurring, stable, verifiable, and easy to miss manually
- verify script results directly; do not treat "script ran successfully" as proof that the task is correct
How To Use It In Your Own Project
-
Choose a version.
- Use
gatekeeper-zh for Chinese-speaking teams.
- Use
gatekeeper for English or bilingual teams.
-
Put it where your assistant can load it.
- If your tool supports skill folders, copy the whole skill folder into that tool's skills directory.
- If your tool has no skill mechanism, use
SKILL.md as a team pre-action checklist and place it in your collaboration guide or assistant instructions.
- Keep
SKILL.md and agents/openai.yaml together; do not copy only half of the skill.
-
Define the trigger.
- Tell the team to use the gatekeeper before complex, high-risk, cross-object, durable, or stage-advancing work.
- A plain instruction such as "run the gatekeeper first" is enough.
- In tools that support skill invocation, use
$gatekeeper or $gatekeeper-zh.
-
Adapt the local terms.
- Define what counts as current evidence in your project.
- Define durable objects, such as guidelines, templates, configs, release materials, and process notes.
- Define actions that require duplication checks, such as creating files, rules, templates, or scripts.
- Define actions that must stop for confirmation, such as missing evidence, expanding scope, or high quality risk.
-
Start with high-risk cases.
- Do not force the full template onto every small task.
- Start with work that often causes rework: creating materials, changing rules, cross-file edits, handoffs, and pre-release checks.
- Use the lightweight mode for low-risk work so the gatekeeper does not become bureaucracy.
-
Add scripts gradually.
- Use the gatekeeper manually first.
- Notice recurring, stable, verifiable, easy-to-miss checks.
- Script those checks later, while keeping human judgement for the final decision.
-
Review and tune.
- If the gatekeeper stops too often, lighten the stop rules.
- If it lets errors through, clarify evidence, duplication checks, or stop points.
- Change one small part at a time so the team can keep using it.
Process
-
Restate the task.
- Say the user's actual request in one short sentence.
- Name the expected deliverable.
- Separate the current request from older context.
-
Check the evidence.
- List the sources that directly support the next action.
- Mark any assumption that has not been verified.
- Prefer explicit user instructions and current source material over memory, old notes, examples, or similar-looking work.
-
Draw the boundary.
- State what is in scope.
- State what is out of scope.
- Name the action that must not happen yet.
-
Check for duplication.
- Before creating a new rule, document, template, process, or skill, ask whether an existing item can absorb the need.
- Create a new item only when it has a distinct reusable job.
- If the need is only a small correction, fold it into the existing item.
-
Choose the next step.
- Pick one smallest useful action.
- If evidence is missing, the next step is to gather that evidence or ask a focused question.
- If the risk is too high, stop and explain the blocker.
-
Act within the boundary.
- Do only the permitted step.
- If new information changes the boundary, pause and run the guard again.
- Do not turn a plan, test, draft, or partial result into a completion claim.
-
Close the loop.
- Verify the changed or delivered item directly.
- State what was done, what remains open, and what the next person should read or do first.
Output Templates
Use this block before action:
【守门员检查】
1. 当前请求:
2. 交付物:
3. 已确认依据:
4. 未确认假设:
5. 范围内:
6. 范围外:
7. 禁止动作:
8. 唯一下一步:
9. 停止点:
Use this block before creating something new:
【新增前判重】
1. 拟新增对象:
2. 已有可复用对象:
3. 是否必须新建:
4. 新建理由:
5. 不得重复的内容:
6. 下一步:
Use this block when handing off:
【交接摘要】
1. 已完成:
2. 未完成:
3. 阻断项:
4. 下一步:
5. 先读 / 先看:
Short Example
User request: create a new team collaboration guideline.
【守门员检查】
1. 当前请求:Decide whether a new collaboration guideline is needed.
2. 交付物:Create one guideline if needed; otherwise fold the need into an existing item.
3. 已确认依据:The user requested a new guideline; existing materials are not checked yet.
4. 未确认假设:Whether a similar guideline already exists.
5. 范围内:Check existing materials and decide create vs. fold.
6. 范围外:Write a full new guideline immediately.
7. 禁止动作:Create a new file before duplication check.
8. 唯一下一步:Check whether an existing item can absorb the need.
9. 停止点:Reusable item found, or new item justified.
Stop Rules
Stop before acting when:
- The target is guessed from memory instead of supported by current evidence.
- The user asked to continue, finish, publish, or mark done, but the evidence only supports planning or drafting.
- A new item would duplicate an existing item.
- The task depends on missing source material.
- The proposed fix is aimed at the symptom while the cause belongs to a different layer.
- The requested action would exceed the scope the user gave.
- Tool output is unreadable, incomplete, or too broad to trust.
Style
- Be short and concrete.
- Prefer one safe next step over a long speculative plan.
- Use "unknown" rather than filling gaps.
- Preserve useful work, but do not protect a wrong direction.
- Keep the guard separate from the final answer: first decide, then do.