global-config

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Global Configuration

全局配置

Base settings for all Alicoder001 skills.
所有Alicoder001技能的基础设置。

Interaction Defaults

交互默认规则

  • Mirror the user's tone and technical depth.
  • Ask up to 2 clarifying questions when requirements are ambiguous.
  • Confirm constraints that affect output (stack, environment, timeline).
  • Default conversation to the user's language.
  • Keep reusable skill artifacts (
    SKILL.md
    , scripts, references) in English unless explicitly requested otherwise.
  • 匹配用户的语气和技术深度。
  • 当需求不明确时,最多提出2个澄清问题。
  • 确认会影响输出结果的约束条件(技术栈、环境、时间线)。
  • 默认使用用户的语言进行对话。
  • 可复用的技能工件(
    SKILL.md
    、脚本、参考资料)默认使用英文,除非用户明确要求其他语言。

Project Context Detection

项目上下文检测

NEVER ask these questions:
  • "What programming language?"
  • "What is your tech stack?"
  • "Do you want guided setup?"
  • "What framework are you using?"
Instead, auto-detect from these files:
FileWhat to Detect
package.json
Dependencies, scripts, framework
tsconfig.json
TypeScript project
.agents/CONTEXT.md
Full project context
GEMINI.md
Agent rules
next.config.*
Next.js project
vite.config.*
Vite project
nest-cli.json
NestJS project
Detection logic:
  1. Check if context files exist and use them silently.
  2. Check
    package.json
    dependencies and infer stack.
  3. If no context found, proceed with reasonable defaults for immediate task execution.
  4. If context is missing and the task clearly needs project-level setup, trigger
    project-init
    recovery flow with one short confirmation.
Routing boundary (important):
  • global-config
    sets defaults and routing only.
  • If setup/context recovery intent is detected, delegate to
    project-init
    instead of handling setup questions here.
Rule: If you cannot detect, proceed with the task. Do not block.
绝对不要询问以下问题:
  • "使用什么编程语言?"
  • "你的技术栈是什么?"
  • 是否需要引导式设置?"
  • "你使用什么框架?"
取而代之,从以下文件自动检测:
文件检测内容
package.json
依赖项、脚本、框架
tsconfig.json
TypeScript 项目
.agents/CONTEXT.md
完整项目上下文
GEMINI.md
Agent 规则
next.config.*
Next.js 项目
vite.config.*
Vite 项目
nest-cli.json
NestJS 项目
检测逻辑:
  1. 检查上下文文件是否存在,并静默使用这些文件的内容。
  2. 检查
    package.json
    的依赖项,推断技术栈。
  3. 如果未找到上下文,使用合理的默认值立即执行任务。
  4. 如果缺少上下文且任务明显需要项目级设置,触发
    project-init
    恢复流程,并仅进行一次简短确认。
路由边界(重要):
  • global-config
    仅用于设置默认值和路由规则。
  • 如果检测到设置/上下文恢复的意图,将任务委托给
    project-init
    ,而非在此处理设置问题。
规则:如果无法检测到上下文,继续执行任务,不要阻塞流程。

Language Policy

语言策略

  • Do not ask a generic language preference question in normal task flow.
  • Exception: setup-style onboarding (for example
    project-init
    ) must ask one language confirmation at the start when the first user message is non-English.
  • For Uzbek first messages in setup/recovery, use:
    O'zbekcha davom etamizmi?
  • After language is confirmed once, do not repeat the language question in the same setup flow.
  • 在常规任务流程中,不要询问通用的语言偏好问题。
  • 例外情况:设置式引导(例如
    project-init
    )在首次用户消息为非英文时,必须在开始时进行一次语言确认。
  • 对于设置/恢复流程中的乌兹别克语初始消息,使用:
    O'zbekcha davom etamizmi?
  • 一旦语言被确认,在同一设置流程中不要重复询问语言问题。

Global Rules

全局规则

Code Style

代码风格

  • Prefer TypeScript with strict mode when TypeScript is used.
  • Follow naming conventions from
    typescript
    .
  • Apply mobile-first responsive design for UI work.
  • 当使用TypeScript时,优先启用严格模式。
  • 遵循TypeScript的命名规范。
  • UI工作采用移动优先的响应式设计。

Communication

沟通方式

  • Be concise and professional.
  • Use code examples for non-trivial explanations.
  • Format responses in markdown.
  • 简洁专业。
  • 对于非浅显的说明,使用代码示例。
  • 用Markdown格式排版回复内容。

Local Skill Capture

本地技能保存

  • Support both explicit save triggers:
    @save-skill
    and
    skillga saqla
    .
  • Treat these triggers as a request to persist project-specific guidance as a local skill.
  • Ask one short confirmation before writing:
    Save this as a local skill? (yes/no)
    .
  • Save using the standard local path:
    .agents/skills/local/<skill-name>/SKILL.md
    .
  • If a matching local skill already exists, update/merge it instead of creating duplicates.
  • 支持两种显式保存触发指令:
    @save-skill
    skillga saqla
  • 将这些触发指令视为将项目特定指导保存为本地技能的请求。
  • 写入前进行一次简短确认:
    Save this as a local skill? (yes/no)
  • 使用标准本地路径保存:
    .agents/skills/local/<skill-name>/SKILL.md
  • 如果匹配的本地技能已存在,更新/合并该技能,而非创建重复项。

Error Handling

错误处理

  • Wrap async code in try-catch where failures are expected.
  • Provide helpful error messages.
  • Log errors appropriately.
  • 在预期可能失败的异步代码中添加try-catch包裹。
  • 提供有帮助的错误提示信息。
  • 合理记录错误日志。

Security

安全规范

  • Never expose secrets or API keys.
  • Validate all user inputs.
  • Use environment variables.

  • 绝不泄露密钥或API密钥。
  • 验证所有用户输入。
  • 使用环境变量存储敏感信息。

Skill Priority Order

技能优先级顺序

When multiple skills apply, follow this order:
  1. project-init - First only for setup/context recovery intent
  2. global-config - Baseline defaults and routing guardrails
  3. agent/reasoning - Before any complex task
  4. agent/planning - For task decomposition
  5. core/ skills - Foundation
  6. arch/ skills - Architecture decisions
  7. frontend/ or backend/ - Implementation
  8. perf/ - Optimization
  9. agent/ - Other agent behaviors

当多个技能适用时,遵循以下优先级:
  1. project-init - 仅在设置/上下文恢复意图时优先使用
  2. global-config - 基线默认值和路由规则
  3. agent/reasoning - 执行任何复杂任务前使用
  4. agent/planning - 用于任务分解
  5. core/ 技能 - 基础功能
  6. arch/ 技能 - 架构决策
  7. frontend/backend/ - 代码实现
  8. perf/ - 性能优化
  9. agent/ - 其他Agent行为

Session Memory

会话记忆

Remember these across the conversation:
  • Project type and stack (Next.js, NestJS, etc.).
  • Constraints and priorities (performance, accessibility, SEO).
  • Key files and structure discussed.

在对话过程中记住以下内容:
  • 项目类型和技术栈(Next.js、NestJS等)。
  • 约束条件和优先级(性能、可访问性、SEO)。
  • 讨论过的关键文件和结构。

Quick Reference

快速参考

SettingDefault
CommunicationMirror user tone and language, concise
TypeScriptStrict when applicable
StylingTailwind CSS (if selected)
StateTanStack Query + Zustand (if selected)
FormsReact Hook Form + Zod (if selected)
APIREST/tRPC (if selected)
设置项默认值
沟通方式匹配用户语气和语言,简洁表达
TypeScript适用时启用严格模式
样式方案Tailwind CSS(若被选中)
状态管理TanStack Query + Zustand(若被选中)
表单处理React Hook Form + Zod(若被选中)
API方案REST/tRPC(若被选中)