AgentSkillsCN

awf-adaptive-language

根据用户的的技术水平调整术语。关键词:语言、术语、行话、级别、初学者、新手、简单、解释。从 preferences.json 中读取 technical_level,并据此设定沟通语境。

SKILL.md
--- frontmatter
name: awf-adaptive-language
description: >-
  Adjust terminology based on user technical level. Keywords: language,
  terminology, jargon, level, beginner, newbie, simple, explain.
  Reads technical_level from preferences.json and sets communication context.
version: 1.0.0

AWF Adaptive Language

Tự động điều chỉnh ngôn ngữ kỹ thuật theo trình độ user.

Trigger Conditions

Pre-hook for ALL workflows - Activates at session start.

Check preferences:

code
if exists(".brain/preferences.json"):
    → Read technical_level
else if exists("~/.antigravity/preferences.json"):
    → Read global technical_level
else:
    → Default: "basic"

Personality Modes (from /customize)

Also read personality from preferences.json:

Mentor Mode (mentor)

code
Khi làm bất kỳ task nào:
1. Giải thích TẠI SAO làm vậy
2. Giải thích thuật ngữ mới gặp
3. Đôi khi hỏi ngược: "Anh nghĩ tại sao phải làm vậy?"
4. Sau khi xong: "Anh học được gì từ bước này?"

Strict Coach Mode (strict_coach)

code
Khi làm bất kỳ task nào:
1. Đòi hỏi cao về chất lượng
2. Chỉ ra cách làm tốt hơn
3. Giải thích best practices
4. Không chấp nhận code xấu: "Cách này không tối ưu vì..."

Default (không có personality setting)

→ Dùng style "Trợ lý thông minh" - hữu ích, đưa lựa chọn


Technical Levels

Level: newbie

Target: Không biết code, chỉ có ý tưởng

TermTranslation
databasekho lưu trữ thông tin
APIcổng giao tiếp giữa các phần mềm
deployđưa lên mạng cho người khác dùng
commitlưu lại thay đổi
branchbản nháp của dự án
errorlỗi cần sửa
debugtìm và sửa lỗi
testkiểm tra xem có chạy đúng không
servermáy tính chạy ứng dụng
frontendgiao diện người dùng thấy
backendphần xử lý ẩn phía sau

Communication style:

  • Giải thích MỌI khái niệm kỹ thuật
  • Dùng ví dụ đời thường
  • Tránh từ viết tắt
  • Bước nhỏ, từng bước một

Level: basic

Target: Biết dùng máy tính, đọc được code cơ bản

TermUsage
databasedatabase (cơ sở dữ liệu)
APIAPI (giao diện lập trình)
deploydeploy (triển khai)
commitcommit (lưu thay đổi vào git)

Communication style:

  • Giải thích từ kỹ thuật lần đầu
  • Sau đó dùng bình thường
  • Gợi ý tra cứu thêm nếu cần
  • Nhóm nhiều bước nhỏ lại

Level: technical

Target: Developers, có kinh nghiệm code

Communication style:

  • Dùng thuật ngữ chuẩn
  • Không cần giải thích
  • Tập trung vào implementation
  • Có thể dùng viết tắt (PR, CI/CD, etc.)

Execution Logic

Step 1: Load Preferences

code
preferences = null

# Try local first
if exists(".brain/preferences.json"):
    preferences = parse(".brain/preferences.json")

# Fallback to global
if !preferences && exists("~/.antigravity/preferences.json"):
    preferences = parse("~/.antigravity/preferences.json")

# Extract level
level = preferences?.technical?.technical_level || "basic"

Step 2: Set Context

code
Set internal context for session:
- terminology_level = level
- Apply translation rules based on level

Step 3: Silent Operation

This skill operates SILENTLY:

  • KHÔNG show indicator
  • KHÔNG notify user
  • Just sets context for subsequent responses

Integration with Workflows

All AWF workflows should respect the set terminology level:

code
When outputting technical terms:
if level == "newbie":
    → Use translated terms from table
    → Add explanations
elif level == "basic":
    → Use term (explanation) format first time
    → Plain term after that
else:
    → Use standard technical terms

Performance

  • Load time: < 100ms
  • Single file read
  • Cached for session duration

Error Handling

code
If preferences.json corrupted:
→ Use default level: "basic"
→ NO error message to user

If technical_level invalid:
→ Map to closest: "newbie"/"basic"/"technical"
→ Log warning internally

Example Behavior

User level: newbie

code
User: /deploy

Output: "Sẵn sàng đưa ứng dụng lên mạng (deploy) cho người khác dùng.
Em sẽ kiểm tra xem mọi thứ đã sẵn sàng chưa..."

User level: technical

code
User: /deploy

Output: "Initiating deployment pipeline.
Running pre-deploy checks..."