SuperAPI AI Directory

dot-skill

Agents & models

View repository

Updated 10-15 23:46

About this skill

Language / Language: This skill supports both English and Chinese. Detect the user's language from their first message and respond in the same language throughout. Below are instructions in both languages — follow the one matching the user's language.

This Skill supports both Chinese and English. Based on the language of the user's first message, reply in the same language throughout. Instructions in both languages are provided below; choose the corresponding version to execute according to the user's language.

Execution Root / Execution root directory: Run all Bash commands from the directory that contains this SKILL.md. All tools/... and prompts/... paths below are relative to the skill root.

Critical rule / Key rule: Do not prepend commands with guessed host-specific paths such as cd ~/.hermes/..., cd ~/.claude/..., cd ~/.openclaw/..., cd ~/.codex/..., cd ~/.dsh/..., or hard-coded /Users/.../dot-skill paths. The current working directory is already the correct skill root. Run python3 tools/... directly.

All Bash commands must be executed in the directory where the current SKILL.md is located. The tools/... and prompts/... appearing below are both relative paths relative to the skill root directory.

dot-skill creator (host-compatible version)

Trigger conditions

Start when the user says any of the following:

  • /dot-skill
  • "Help me create a skill"
  • "I want to distill a person"
  • "Create a new skill"
  • "Make me a skill for XX"

Compatible hosts:

  • Claude Code
  • OpenClaw
  • Hermes
  • Codex
  • DeepSeek Harness

The unified main entry point is dot-skill. In hosts that support slash commands, use /dot-skill. For Hermes, only /dot-skill this one slash entry point is guaranteed to be stable;colleague、relationship、celebrity the compatible semantics of are retained at the tool layer and preset layer, but it is not guaranteed that every compatible name can be routed as a Hermes slash command.

When the user says the following about an existing Skill, enter evolution mode:

  • "I have new files" / "append"
  • "This is wrong" / "He wouldn't do this" / "He should be"
  • /update-skill {character} {slug}

Compatible update aliases:

  • /update-colleague {slug}

When the user asks to view generated Skills, execute the list command in the "Management Operations" section below.


Tool usage rules

This Skill runs in any compatible host; it only requires that the host can read local files and execute Bash / Python commands. Use the following tool conventions:

Task Tool used
Read PDF documents Read tool (native PDF support)
Read image screenshots Read tool (native image support)
Read MD/TXT files Read tool
Parse Feishu message JSON export Bash → python3 tools/feishu_parser.py
Feishu fully automatic collection (recommended) Bash → python3 tools/feishu_auto_collector.py
Feishu documents (browser login session) Bash → python3 tools/feishu_browser.py
Feishu documents (MCP App Token) Bash → python3 tools/feishu_mcp_client.py
DingTalk fully automatic collection Bash → python3 tools/dingtalk_auto_collector.py
Parse email .eml/.mbox Bash → python3 tools/email_parser.py
Write/update Skill files Write / Edit tool
Version management Bash → python3 tools/version_manager.py
List existing Skills Bash → python3 tools/skill_writer.py --action list

Base directory:

  • colleague → ./skills/colleague/{slug}/
  • relationship → ./skills/relationship/{slug}/
  • celebrity → ./skills/celebrity/{slug}/

If you need to change to a global path, use --base-dir to point to the root directory of the corresponding character family.


Main flow: create a new Skill

Step 0: Confirm character family

If the user is using /dot-skill, first confirm which category is to be distilled this time:

  1. colleague
  2. relationship
  3. celebrity

If the upper-level host has already explicitly passed in the family, directly fix the corresponding character family.

If the current family is celebrity, you must also confirm the research profile:

  1. budget-friendly
  2. budget-unfriendly

Defaults to using budget-friendly. Only when the user explicitly requests deeper research, higher confidence, or is willing to accept a slower and more expensive distillation process, switch to budget-unfriendly。

Step 1: Basic information entry

Select the corresponding intake prompt based on the character family:

  • colleague → prompts/intake.md
  • relationship → prompts/relationship/intake.md
  • celebrity → prompts/celebrity/intake.md

colleague and relationship only asks 3 questions. celebrity follows prompts/celebrity/intake.md asks 4 questions, of which the 4th question must confirm research_profile。

Default 3 basic questions:

  1. Nickname/codename(required)
  2. Basic information(one sentence: company, level, position, gender, write whatever comes to mind)
    • Example:字节 2-1 后端工程师 男
  3. Personality profile(one sentence: MBTI, zodiac sign, personality tags, corporate culture, impression)
    • Example:INTJ 摩羯座 甩锅高手 字节范 CR很严格但从来不解释原因

Everything except the name can be skipped. After collection, summarize and confirm, then proceed to the next step.

Step 2: Raw material import

Ask the user to provide raw materials, showing four methods to choose from:

原材料怎么提供?

  [A] 飞书自动采集(推荐)
      输入姓名,自动拉取消息记录 + 文档 + 多维表格

  [B] 钉钉自动采集
      输入姓名,自动拉取文档 + 多维表格
      消息记录通过浏览器采集(钉钉 API 不支持历史消息)

  [C] 飞书链接
      直接给文档/Wiki 链接(浏览器登录态 或 MCP)

  [D] 上传文件
      PDF / 图片 / 导出 JSON / 邮件 .eml

  [E] 直接粘贴内容
      把文字复制进来

可以混用,也可以跳过(仅凭手动信息生成)。

Method A: Feishu automatic collection (recommended)

First-time use requires configuration:

python3 tools/feishu_auto_collector.py --setup

Group chat collection(using tenant_access_token, requires the bot to be in the group):

python3 tools/feishu_auto_collector.py \
  --name "{name}" \
  --output-dir ./knowledge/{slug} \
  --msg-limit 1000 \
  --doc-limit 20

Private chat collection(requires user_access_token + private chat chat_id):

Private chat messages can only be obtained through the user identity (user_access_token); the app identity has no permission to access private chats.

Prerequisites:

The user needs to provide the following information:

  1. Feishu app credentials:app_id and app_secret(obtained by creating a custom app on the Feishu Open Platform)
  2. User permissions: the app needs to enable the following user permissions (scope):
    • im:message — read/send messages as the user
    • im:chat — read the chat list as the user
  3. OAuth authorization code (code): obtained from the callback URL after the user completes OAuth authorization in the browser

If the user lacks any of the above information, guide them to complete the configuration. Do not assume the user has already configured it.

Complete process for obtaining user_access_token:

When the user has provided app_id, app_secret, and confirmed that user permissions have been enabled:

  1. Help the user generate the OAuth authorization link:

    https://open.feishu.cn/open-apis/authen/v1/authorize?app_id={APP_ID}&redirect_uri=http://www.example.com&scope=im:message%20im:chat
    

    ⚠️ Note:redirect_uri needs to be added in the Feishu app's "Security Settings → Redirect URL" http://www.example.com

  2. The user opens the link in the browser, logs in and authorizes

  3. The page will redirect to http://www.example.com?code=xxx, the user copies the code to you

  4. Exchange the code for a token:

    python3 tools/feishu_auto_collector.py --exchange-code {CODE}
    

    Or write a Python script yourself to call the Feishu API and exchange for it:

    # 1. 获取 app_access_token
    POST https://open.feishu.cn/open-apis/auth/v3/app_access_token/internal
    Body: {"app_id": "xxx", "app_secret": "xxx"}
    
    # 2. 用 code 换 user_access_token
    POST https://open.feishu.cn/open-apis/authen/v1/oidc/access_token
    Header: Authorization: Bearer {app_access_token}
    Body: {"grant_type": "authorization_code", "code": "xxx"}
    

Get the private chat chat_id:

Users usually do not know the chat_id. When the user has a user_access_token but no chat_id, you shouldwrite a Python script yourselfto obtain it:

  • Method: use user_access_token to send a message to the other party's open_id; the return value will include the chat_id
    POST https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id
    Header: Authorization: Bearer {user_access_token}
    Body: {"receive_id": "{对方open_id}", "msg_type": "text", "content": "{\"text\":\"你好\"}"}
    # 返回值中的 chat_id 就是私聊会话 ID
    
  • Note:GET /im/v1/chats GET /im/v1/chats will not return private chat sessions; this is a limitation of the Feishu API, not a permissions issue. Do not try to use this endpoint to find private chats.
  • If the user does not know the other party's open_id, they can use tenant_access_token to call the Contacts API to search:
    GET https://open.feishu.cn/open-apis/contact/v3/scopes
    # 返回应用可见范围内所有用户的 open_id
    

Run collection:

After obtaining user_access_token and chat_id:

python3 tools/feishu_auto_collector.py \
  --open-id {对方open_id} \
  --p2p-chat-id {chat_id} \
  --user-token {user_access_token} \
  --name "{name}" \
  --output-dir ./knowledge/{slug} \
  --msg-limit 1000

Flexibility principle: the above API calls do not necessarily have to use the collector script. If the script does not work or the scenario does not match, you can directly write a Python script to call the Feishu API to complete the task. Core API references:

  • Get token:POST /auth/v3/app_access_token/internal、POST /authen/v1/oidc/access_token
  • Send message (get chat_id):POST /im/v1/messages?receive_id_type=open_id
  • Pull messages:GET /im/v1/messages?container_id_type=chat&container_id={chat_id}
  • Check contacts:GET /contact/v3/scopes、GET /contact/v3/users/{user_id}

Automatically collect content:

  • Group chats: messages sent by them in all group chats shared with them (filter out system messages and stickers)
  • Private chats: the complete private chat conversation with them (including messages from both parties, used to understand the conversational context)
  • Feishu documents and Wiki created/edited by them
  • Related multi-dimensional tables (if permitted)

After collection is complete, use Read to read the files in the output directory:

  • knowledge/{slug}/messages.txt → message records (group chats + private chats)
  • knowledge/{slug}/docs.txt → document content
  • knowledge/{slug}/collection_summary.json → collection summary

If collection fails, determine the cause based on the error and try to fix it. Common issues:

  • Group chat collection: the bot has not been added to the group chat
  • Private chat collection: user_access_token expired (valid for 2 hours, can be refreshed with refresh_token)
  • Insufficient permissions: guide the user to enable the corresponding permissions on the Feishu Open Platform and reauthorize
  • Or switch to method B/C

Method B: DingTalk automatic collection

First-time use requires configuration:

python3 tools/dingtalk_auto_collector.py --setup

Then enter the name and collect with one click:

python3 tools/dingtalk_auto_collector.py \
  --name "{name}" \
  --output-dir ./knowledge/{slug} \
  --msg-limit 500 \
  --doc-limit 20 \
  --show-browser   # 首次使用加此参数,完成钉钉登录

Collected content:

  • DingTalk documents and knowledge bases created/edited by them
  • Multi-dimensional tables
  • Message records (⚠️ the DingTalk API does not support pulling historical messages; automatically switch to browser collection)

After collection is complete, Read read:

  • knowledge/{slug}/docs.txt
  • knowledge/{slug}/bitables.txt
  • knowledge/{slug}/messages.txt

If message collection fails, prompt the user to take a screenshot of the chat records and upload it.


Method D: Upload files

  • PDF / images:Read The tool reads directly
  • Feishu message JSON export:
    python3 tools/feishu_parser.py --file {path} --target "{name}" --output /tmp/feishu_out.txt
    
    Then Read /tmp/feishu_out.txt
  • Email files .eml / .mbox:
    python3 tools/email_parser.py --file {path} --target "{name}" --output /tmp/email_out.txt
    
    Then Read /tmp/email_out.txt
  • Markdown / TXT:Read The tool reads directly

Method C: Feishu links

When the user provides a Feishu document/Wiki link, ask how to read it:

检测到飞书链接,选择读取方式:

  [1] 浏览器方案(推荐)
      复用你本机 Chrome 的登录状态
      ✅ 内部文档、需要权限的文档都能读
      ✅ 无需配置 token
      ⚠️  需要本机安装 Chrome + playwright

  [2] MCP 方案
      通过飞书 App Token 调用官方 API
      ✅ 稳定,不依赖浏览器
      ✅ 可以读消息记录(需要群聊 ID)
      ⚠️  需要先配置 App ID / App Secret
      ⚠️  内部文档需要管理员给应用授权

选择 [1/2]:

Choose 1 (browser solution):

python3 tools/feishu_browser.py \
  --url "{feishu_url}" \
  --target "{name}" \
  --output /tmp/feishu_doc_out.txt

If not logged in on first use, a browser window will pop up asking for login (one-time).

Choose 2 (MCP solution):

First-time use requires initialization configuration:

python3 tools/feishu_mcp_client.py --setup

Afterward, read directly:

python3 tools/feishu_mcp_client.py \
  --url "{feishu_url}" \
  --output /tmp/feishu_doc_out.txt

Read message records (requires the group chat ID, format oc_xxx):

python3 tools/feishu_mcp_client.py \
  --chat-id "oc_xxx" \
  --target "{name}" \
  --limit 500 \
  --output /tmp/feishu_msg_out.txt

After either method outputs, use Read to read the result file and enter the analysis process.


Method E: Direct paste

The content pasted by the user is directly used as text source material, with no need to call any tools.


If the user says "no files" or "skip", generate the Skill using only the manual information from Step 1.

Step 3: Analyze source material

First, parse this execution matrix according to the character family:

character intake persona analyzer persona builder merger storage root
colleague prompts/intake.md prompts/persona_analyzer.md prompts/persona_builder.md prompts/merger.md ./skills/colleague/{slug}
relationship prompts/relationship/intake.md prompts/relationship/persona_analyzer.md prompts/relationship/persona_builder.md prompts/relationship/merger.md ./skills/relationship/{slug}
celebrity prompts/celebrity/intake.md prompts/celebrity/persona_analyzer.md prompts/celebrity/persona_builder.md prompts/celebrity/merger.md ./skills/celebrity/{slug}

Shared by all families:

  • Work analyzer:prompts/work_analyzer.md
  • Work builder:prompts/work_builder.md
  • Correction handler:prompts/correction_handler.md

If the current one is celebrity, you must first go through the research sub-process, then enter analysis.

celebrity / budget-friendly

  1. Read prompts/celebrity/research.md, according to its 6-dimension parallel collection strategy do research planning
  2. First create the directory:
    mkdir -p "{skill_dir}/knowledge/research/raw" "{skill_dir}/knowledge/research/merged"
    
  3. Confirm the collection strategy (already determined during the intake phase):
    • Local-first: First analyze the user's local materials, mark which dimensions are covered, and only supplement missing dimensions via the web
    • Web + local: Full 6-dimension web research, merged with local materials at the same time, cross-validated
    • Web-only: Standard 6-dimension web research
  4. If the user explicitly provides a processable video link or subtitle source, and the processing result will not be written to disk as long text:
    bash tools/research/download_subtitles.sh "{url}" "{skill_dir}/knowledge/subtitles"
    python3 tools/research/srt_to_transcript.py "{subtitle_file}" "{skill_dir}/knowledge/transcripts/{name}.txt"
    
  5. According to 6 dimensions research, raw research notesat leastmust be split into 3 files (each file covers 2 dimensions), and you cannot write only one research_notes.md:
    • knowledge/research/raw/01_core_profile.md(Dimension 1 Works + Dimension 6 Timeline)
    • knowledge/research/raw/02_conversations_and_material.md(Dimension 2 Conversations + Dimension 4 Decisions)
    • knowledge/research/raw/03_expression_and_reception.md(Dimension 3 Expression DNA + Dimension 5 Others' Perspectives)
  6. During the research process, you must comply with taste principles(see the research prompt for details):
    • Long-form > quotable lines, controversy > consensus, change > fixed, primary > secondary
    • Comply with source blacklist: Never cite Zhihu, WeChat public accounts, Baidu Baike, or content farms
    • Comply with source priority: user local materials > primary works > long interviews > decision records > social media > external analysis > secondhand retellings
  7. Merge research:
    python3 tools/research/merge_research.py "{skill_dir}"
    
    Output:knowledge/research/merged/summary.md
  8. Read knowledge/research/merged/summary.md, confirm:
    • Files scanned >= 3
    • Unique URLs >= 2
    • Potential long quote lines = 0
    • URLs in research notes must bespecific pages that were actually opened, not platform homepages, search pages, topic pages, or placeholder paths If this is not satisfied, continue supplementing research notes until it is satisfied or the reason collection is limited is clearly recorded.
  9. Quality gate (Phase 1.5): Before entering analysis, a structured collection summary must be shown to the user:
    ┌──────────────────────────────┬──────────┬─────────────────────────────┐
    │ 维度                         │ 来源数    │ 关键发现                     │
    ├──────────────────────────────┼──────────┼─────────────────────────────┤
    │ 1 著作                       │ N        │ [核心论点 / 缺失]            │
    │ 2 对话                       │ N        │ [关键模式 / 缺失]            │
    │ 3 表达 DNA                   │ N        │ [风格标记 / 缺失]            │
    │ 4 决策                       │ N        │ [决策模式 / 缺失]            │
    │ 5 他者视角                   │ N        │ [外部观点 / 缺失]            │
    │ 6 时间线                     │ N        │ [认知轨迹 / 缺失]            │
    ├──────────────────────────────┼──────────┼─────────────────────────────┤
    │ 矛盾点                       │ N        │ [摘要]                       │
    │ 薄弱维度                     │ [列表]   │ 补充方案:[计划]              │
    │ 冷门人物?                   │ 是/否    │                              │
    └──────────────────────────────┴──────────┴─────────────────────────────┘
    
    Wait for user confirmation before continuing. If the user points out problems or needs a certain dimension to be more in-depth, supplement the research first.
  10. Obscure figure detection: If total sources < 10, handle according to the obscure figure protocol:
    • Limit mental models to 2–3
    • Mark weak models as "based on limited information"
    • Expand the honest boundaries section
    • Tell the user what supplementary materials they can provide to improve quality
  11. The subsequent analysis input for a celebrity must prioritize:
    • Primary materials (source weight 1-3)
    • merged research summary
    • Supplementary descriptions provided by the user

celebrity / budget-unfriendly

  1. First read:
    • prompts/celebrity/budget_unfriendly/research.md
    • references/celebrity_budget_unfriendly_framework.md
  2. First create the directory:
    mkdir -p "{skill_dir}/knowledge/research/raw" "{skill_dir}/knowledge/research/merged" "{skill_dir}/knowledge/research/reviews"
    
  3. Confirm the collection strategy (already determined during the intake phase): local-first / web+local / web-only
  4. According to 6-track independent file structure Write research notes (cannot be merged, observations cannot be cloned):
    • knowledge/research/raw/01_writings.md(Dimension 1: Works and Systems Thinking)
    • knowledge/research/raw/02_conversations.md(Dimension 2: Improvised Dialogue and Pressure Response)
    • knowledge/research/raw/03_expression_dna.md(Dimension 3: Linguistic Fingerprint)
    • knowledge/research/raw/04_decisions.md(Dimension 4: Behavior and Choices)
    • knowledge/research/raw/05_external_views.md(Dimension 5: Others' Perspectives and Criticism)
    • knowledge/research/raw/06_timeline.md(Dimension 6: Cognitive Trajectory)
  5. The research process must follow taste principles + source blacklist + source priority(see research prompt); each piece of evidence must be labeled with source weight (1-7).
  6. Merge research:
    python3 tools/research/merge_research.py "{skill_dir}"
    
  7. Read knowledge/research/merged/summary.md, confirm the minimum threshold:
    • Files scanned >= 6
    • Unique URLs >= 8
    • Primary-source markers >= 3
    • Source metadata blocks >= 6
    • Contradiction bullets >= 6
    • Inference bullets >= 6
    • Potential long quote lines = 0
    • Track coverage count = 6
    • URLs in research notes must bespecific pages actually opened, not platform homepages, search pages, topic pages, or placeholder paths. If not satisfied, continue filling in the corresponding track instead of proceeding directly to the subsequent review.
  8. Quality Gate (Phase 1.5): Before entering audit, show the user a structured collection summary (including primary ratio, number of contradictions, candidate mental models, known-answer candidates, weak dimensions, and obscure-figure determination). Wait for user confirmation before continuing.
  9. Then read:
    • prompts/celebrity/budget_unfriendly/audit.md
    • prompts/celebrity/budget_unfriendly/synthesis.md
    • references/celebrity_budget_unfriendly_template.md
  10. First generate knowledge/research/reviews/research_audit.md
    • The audit must explicitly give PASS / FAIL
    • The audit must check: source-tier compliance (no blacklist), primary ratio > 50%, adherence to taste principles, obscure-figure assessment
    • If the audit is FAIL, fill in according to the Backfill Tasks given by the audit; do not jump to synthesis
  11. Distillation Gate (Phase 2.5): After the audit passes, show the user a summary of candidate mental models (including triple-gate determination, evidence anchors, failure modes). After confirming reasonableness, proceed to synthesis.
  12. Then generate knowledge/research/reviews/synthesis.md
    • A triple-gate determination must be made for candidate mental models:
      • cross-context recurrence
      • generative power
      • exclusivity
    • At the same time, extract intellectual lineage seeds (influenced by / diverged from) and Agentic Protocol seeds (a list of dimensions for how this figure would analyze new problems)
  13. Then generate according to prompts/celebrity/budget_unfriendly/validation.md :
    • knowledge/research/reviews/validation.md
    • Validation must explicitly give PASS / FAIL
    • Must perform known-answer check (at least 2 questions) + edge-case check (1 question) + voice check (100-character blind test) + copyright check + Agentic Protocol check
    • If validation is FAIL, the draft must be fixed first before continuing
  14. Inputs for subsequent analysis that are budget-unfriendly must prioritize:
    • 6-track raw notes
    • merged research summary
    • research audit
    • synthesis review (including intellectual lineage seeds and Agentic Protocol seeds)
    • validation review
    • User-supplied materials

Common constraints of the two types of celebrity profile:

  • If external collection fails or is blocked by platform verification:
    • Clearly tell the user the reason collection is limited
    • Retain existing raw research materials and merged summary
    • Continue generating, but treat source_grounding as incomplete
    • Do notfabricate URLs, citations, book titles, or video titles, or insert generalized homepage links in order to pass quality checks
  • Do notcopy full transcripts, full subtitles, or long passages of original text into the repository
  • Only structured summaries, source metadata, and very short quotations may be retained to avoid copyright risk

After completing family parsing, analyze along two lines:

Line A (Work Skill):

  • Reference prompts/work_analyzer.md
  • Extract: responsible systems, technical specifications, workflows, output preferences, experiential knowledge
  • In the celebrity scenario,work it leans more toward methodology, judgment frameworks, and decision-making habits; do not mechanically frame it as "job responsibilities"

Line B (Persona):

  • Use the persona analyzer corresponding to the current family
  • If celebrity and research_profile=budget-unfriendly, switch to:
    • prompts/celebrity/budget_unfriendly/persona_analyzer.md
  • Translate the tags filled in by the user into specific behavioral rules
  • Extract from the raw material: expression style, decision-making patterns, interpersonal behavior
  • In the celebrity scenario, the following must be retained:
    • mental models
    • decision heuristics
    • expression DNA
    • contradictions
    • honest boundaries

Step 4: Generate and preview

Use prompts/work_builder.md to generate the Work content. Use the persona builder corresponding to the current family to generate the Persona content.

Specific mapping:

  • colleague → prompts/persona_builder.md
  • relationship → prompts/relationship/persona_builder.md
  • celebrity → prompts/celebrity/persona_builder.md
  • celebrity + budget-unfriendly → prompts/celebrity/budget_unfriendly/persona_builder.md

Show the user a summary (5-8 lines each), and ask:

Work Skill 摘要:
  - 负责:{xxx}
  - 技术栈:{xxx}
  - CR 重点:{xxx}
  ...

Persona 摘要:
  - 核心性格:{xxx}
  - 表达风格:{xxx}
  - 决策模式:{xxx}
  ...

确认生成?还是需要调整?

Step 5: Write to file

After the user confirms, do not manually assemble skills/colleague/{slug} file trees like this. Use the writer uniformly:

  1. First resolve the current storage root:
    • colleague → ./skills/colleague
    • relationship → ./skills/relationship
    • celebrity → ./skills/celebrity
  2. Use the Write tool to write three temporary files:
    • /tmp/dot_skill_{slug}_meta.json
    • /tmp/dot_skill_{slug}_work.md
    • /tmp/dot_skill_{slug}_persona.md
  3. meta.json must contain at least:
    • name
    • display_name
    • character
    • research_profile(required when character=celebrity )
    • classification.language(must be set to the user's current language, for example zh-CN or en)
    • profile
    • tags
    • knowledge_sources
  4. Then call:
    python3 tools/skill_writer.py \
      --action create \
      --character {character} \
      --research-profile {research_profile} \
      --slug {slug} \
      --name "{name}" \
      --meta /tmp/dot_skill_{slug}_meta.json \
      --work /tmp/dot_skill_{slug}_work.md \
      --persona /tmp/dot_skill_{slug}_persona.md \
      --base-dir {resolved_base_dir}
    
  5. This command will uniformly generate:
    • SKILL.md
    • work.md
    • persona.md
    • work_skill.md
    • persona_skill.md
    • manifest.json
    • meta.json
    • If you need to install the generated character Skill into the host:
      • Claude Code: append --install-claude-skill
      • OpenClaw: append --install-openclaw-skill
      • Codex: append --install-codex-skill
      • DeepSeek Harness: no dedicated flag is needed; after generation, place the character Skill directory into ~/.dsh/skills/{character}-{slug} or the project .dsh/skills/{character}-{slug}
      • Claude Code on Windows: you may additionally append --install-claude-command-shim
  6. If the current one is celebrity, after creation you must run the quality check once more:
    python3 tools/research/quality_check.py "{resolved_base_dir}/{slug}/SKILL.md" --profile {research_profile}
    
  7. If celebrity 's quality check still reports source_grounding failure:
    • You may add honest source notes and limitation notes
    • But only when real, specific, traceable external sources are obtained may URLs be added
    • Do notuse generalized links such as site homepages, topic pages, search pages, or personal space homepages to "game" the check
    • If there are no real sources, keep FAIL and explain to the user what materials need to be supplied later

When informing the user, the file location must be returned according to the current family; do not default to writing colleague.


Evolution mode: append files

When the user provides new files or text:

  1. Read the new content in the same way as Step 2
  2. Resolve the base dir according to the current family
  3. Use Read to read the existing {resolved_base_dir}/{slug}/work.md and persona.md
  4. Use the merger prompt corresponding to the current family to analyze the incremental content
  5. Archive the current version (using Bash):
    python3 tools/version_manager.py \
      --action backup \
      --character {character} \
      --slug {slug} \
      --base-dir {resolved_base_dir}
    
  6. Write the work/persona increments to temporary patch files respectively
  7. Call:
    python3 tools/skill_writer.py \
      --action update \
      --character {character} \
      --slug {slug} \
      --work-patch /tmp/dot_skill_{slug}_work_patch.md \
      --persona-patch /tmp/dot_skill_{slug}_persona_patch.md \
      --base-dir {resolved_base_dir}
    
  8. If it is currently celebrity, execute quality check again after updating

Evolution mode: conversation correction

When the user expresses "that's wrong"/"it should be":

  1. Refer to prompts/correction_handler.md to identify the correction content
  2. Determine whether it belongs to Work (technical/process) or Persona (personality/communication)
  3. If it belongs to Work:
    • Generate /tmp/dot_skill_{slug}_work_patch.md
    • the patch must be a replaceable ## section, do not directly hand-edit the final file
    • Call:
      python3 tools/skill_writer.py \
        --action update \
        --character {character} \
        --slug {slug} \
        --work-patch /tmp/dot_skill_{slug}_work_patch.md \
        --base-dir {resolved_base_dir}
      
  4. If it belongs to Persona:
    • Write the correction to /tmp/dot_skill_{slug}_correction.json
    • A single correction can be directly written as {scene, wrong, correct}
    • Multiple persona corrections can be written as {"persona_corrections": [{...}, {...}]}
    • Call:
      python3 tools/skill_writer.py \
        --action update \
        --character {character} \
        --slug {slug} \
        --correction-json /tmp/dot_skill_{slug}_correction.json \
        --base-dir {resolved_base_dir}
      
  5. If it is currently celebrity, execute quality check again after updating
  6. Do not directly hand-edit work.md、persona.md、SKILL.md、meta.json; uniformly update through the writer

Management operations

List three types of Skills:

python3 tools/skill_writer.py --action list --character colleague --base-dir ./skills/colleague
python3 tools/skill_writer.py --action list --character relationship --base-dir ./skills/relationship
python3 tools/skill_writer.py --action list --character celebrity --base-dir ./skills/celebrity

Roll back a Skill version:

# colleague
python3 tools/version_manager.py --action rollback --character colleague --slug {slug} --version {version} --base-dir ./skills/colleague

# relationship
python3 tools/version_manager.py --action rollback --character relationship --slug {slug} --version {version} --base-dir ./skills/relationship

# celebrity
python3 tools/version_manager.py --action rollback --character celebrity --slug {slug} --version {version} --base-dir ./skills/celebrity

Delete a Skill: After confirming character, execute:

# colleague
rm -rf skills/colleague/{slug}

# relationship
rm -rf skills/relationship/{slug}

# celebrity
rm -rf skills/celebrity/{slug}


English Version dot-skill Creator (Compatible Host Edition)

Trigger Conditions

Activate when the user says any of the following:

  • /dot-skill
  • "Help me create a skill"
  • "I want to distill someone"
  • "Create a new skill"
  • "Make a skill for XX"

Compatible hosts:

  • Claude Code
  • OpenClaw
  • Hermes
  • Codex
  • DeepSeek Harness

The canonical entrypoint is dot-skill. In hosts that expose slash commands, use /dot-skill. Under Hermes specifically, only /dot-skill is guaranteed as a stable slash entrypoint. Compatibility semantics for colleague, relationship, and celebrity remain in the tool layer and preset layer, but Hermes does not guarantee that every compatibility name will be routed as a slash command.

Enter evolution mode when the user says:

  • "I have new files" / "append"
  • "That's wrong" / "He wouldn't do that" / "He should be"
  • /update-skill {character} {slug}

Compatibility update alias:

  • /update-colleague {slug}

When the user asks to see generated skills, use the list commands in "Management Operations" below.


Tool Usage Rules

This Skill runs in any compatible host that can read local files and execute Bash / Python commands. Use the following tool conventions:

Task Tool
Read PDF documents Read tool (native PDF support)
Read image screenshots Read tool (native image support)
Read MD/TXT files Read tool
Parse Feishu message JSON export Bash → python3 tools/feishu_parser.py
Feishu auto-collect (recommended) Bash → python3 tools/feishu_auto_collector.py
Feishu docs (browser session) Bash → python3 tools/feishu_browser.py
Feishu docs (MCP App Token) Bash → python3 tools/feishu_mcp_client.py
DingTalk auto-collect Bash → python3 tools/dingtalk_auto_collector.py
Parse email .eml/.mbox Bash → python3 tools/email_parser.py
Write/update Skill files Write / Edit tool
Version management Bash → python3 tools/version_manager.py
List existing Skills Bash → python3 tools/skill_writer.py --action list

Base directories:

  • colleague → ./skills/colleague/{slug}/
  • relationship → ./skills/relationship/{slug}/
  • celebrity → ./skills/celebrity/{slug}/

For a global path, use --base-dir with the storage root for that character family.


Main Flow: Create a New Skill

Step 0: Confirm the character family

If the user entered /dot-skill, first confirm which family should be distilled:

  1. colleague
  2. relationship
  3. celebrity

If the host already passed an explicit family, lock the character family immediately.

If the current family is celebrity, also confirm the research profile:

  1. budget-friendly
  2. budget-unfriendly

Default to budget-friendly. Only switch to budget-unfriendly when the user explicitly wants deeper research, higher confidence, or accepts a slower and more expensive distillation pass.

Step 1: Basic Info Collection

Choose the intake prompt by character family:

  • colleague → prompts/intake.md
  • relationship → prompts/relationship/intake.md
  • celebrity → prompts/celebrity/intake.md

For colleague and relationship, ask only 3 questions. For celebrity, use the 4-question intake in prompts/celebrity/intake.md; the fourth question must confirm research_profile.

The default 3 base questions are:

  1. Alias / Codename (required)
  2. Basic info (one sentence: company, level, role, gender — say whatever comes to mind)
    • Example: ByteDance L2-1 backend engineer male
  3. Personality profile (one sentence: MBTI, zodiac, traits, corporate culture, impressions)
    • Example: INTJ Capricorn blame-shifter ByteDance-style strict in CR but never explains why

Everything except the alias can be skipped. Summarize and confirm before moving to the next step.

Step 2: Source Material Import

Ask the user how they'd like to provide materials:

How would you like to provide source materials?

  [A] Feishu Auto-Collect (recommended)
      Enter name, auto-pull messages + docs + spreadsheets

  [B] DingTalk Auto-Collect
      Enter name, auto-pull docs + spreadsheets
      Messages collected via browser (DingTalk API doesn't support message history)

  [C] Feishu Link
      Provide doc/Wiki link (browser session or MCP)

  [D] Upload Files
      PDF / images / exported JSON / email .eml

  [E] Paste Text
      Copy-paste text directly

Can mix and match, or skip entirely (generate from manual info only).

Option A: Feishu Auto-Collect (Recommended)

First-time setup:

python3 tools/feishu_auto_collector.py --setup

Group chat collection (uses tenant_access_token, bot must be in the group):

python3 tools/feishu_auto_collector.py \
  --name "{name}" \
  --output-dir ./knowledge/{slug} \
  --msg-limit 1000 \
  --doc-limit 20

Private chat (P2P) collection (requires user_access_token + p2p chat_id):

Private messages can only be accessed via user identity (user_access_token). App identity cannot access private chats.

Prerequisites:

The user needs to provide:

  1. Feishu app credentials: app_id and app_secret (from Feishu Open Platform)
  2. User scopes: The app must have these user scopes enabled:
    • im:message — read/send messages as user
    • im:chat — read chat list as user
  3. OAuth authorization code: obtained after user completes OAuth in browser

If the user is missing any of these, guide them through setup. Don't assume anything is pre-configured.

Getting user_access_token:

Once the user provides app_id, app_secret, and confirms scopes are enabled:

  1. Generate the OAuth URL for them:

    https://open.feishu.cn/open-apis/authen/v1/authorize?app_id={APP_ID}&redirect_uri=http://www.example.com&scope=im:message%20im:chat
    

    ⚠️ The redirect_uri must be added in the app's "Security Settings → Redirect URLs"

  2. User opens URL, logs in, authorizes

  3. Page redirects to http://www.example.com?code=xxx, user copies the code

  4. Exchange code for token:

    python3 tools/feishu_auto_collector.py --exchange-code {CODE}
    

    Or write a Python script to call the Feishu API directly:

    # 1. Get app_access_token
    POST https://open.feishu.cn/open-apis/auth/v3/app_access_token/internal
    Body: {"app_id": "xxx", "app_secret": "xxx"}
    
    # 2. Exchange code for user_access_token
    POST https://open.feishu.cn/open-apis/authen/v1/oidc/access_token
    Header: Authorization: Bearer {app_access_token}
    Body: {"grant_type": "authorization_code", "code": "xxx"}
    

Getting the p2p chat_id:

Users typically don't know their chat_id. When the user has a user_access_token but no chat_id, write a Python script yourself to obtain it:

  • Method: Send a message to the other user's open_id — the response includes the chat_id
    POST https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id
    Header: Authorization: Bearer {user_access_token}
    Body: {"receive_id": "{target_open_id}", "msg_type": "text", "content": "{\"text\":\"hello\"}"}
    # The chat_id in the response is the p2p chat ID
    
  • Important: GET /im/v1/chats does NOT return p2p chats — this is a Feishu API limitation, not a permission issue. Do not try to use it for finding private chats.
  • If the user doesn't know the target's open_id, use tenant_access_token to search contacts:
    GET https://open.feishu.cn/open-apis/contact/v3/scopes
    # Returns open_ids of all users visible to the app
    

Running collection:

Once you have user_access_token and chat_id:

python3 tools/feishu_auto_collector.py \
  --open-id {target_open_id} \
  --p2p-chat-id {chat_id} \
  --user-token {user_access_token} \
  --name "{name}" \
  --output-dir ./knowledge/{slug} \
  --msg-limit 1000

Flexibility principle: The above API calls don't have to go through the collector script. If the script doesn't work or doesn't fit the scenario, write Python scripts directly to call Feishu APIs. Key API reference:

  • Get token: POST /auth/v3/app_access_token/internal, POST /authen/v1/oidc/access_token
  • Send message (get chat_id): POST /im/v1/messages?receive_id_type=open_id
  • Fetch messages: GET /im/v1/messages?container_id_type=chat&container_id={chat_id}
  • Search contacts: GET /contact/v3/scopes, GET /contact/v3/users/{user_id}

Auto-collected content:

  • Group chats: messages sent by them (system messages and stickers filtered)
  • Private chats: full conversation with both parties (for context understanding)
  • Feishu docs and Wikis they created/edited
  • Related spreadsheets (if accessible)

After collection, Read the output files:

  • knowledge/{slug}/messages.txt → messages (group + private)
  • knowledge/{slug}/docs.txt → document content
  • knowledge/{slug}/collection_summary.json → collection summary

If collection fails, diagnose the error and attempt to fix it. Common issues:

  • Group chat: bot not added to the group
  • Private chat: user_access_token expired (2-hour TTL, refresh with refresh_token)
  • Insufficient permissions: guide user to enable scopes and re-authorize
  • Or switch to Option B/C

Option B: DingTalk Auto-Collect

First-time setup:

python3 tools/dingtalk_auto_collector.py --setup

Then enter the name:

python3 tools/dingtalk_auto_collector.py \
  --name "{name}" \
  --output-dir ./knowledge/{slug} \
  --msg-limit 500 \
  --doc-limit 20 \
  --show-browser   # add this flag on first use to complete DingTalk login

Collected content:

  • DingTalk docs and knowledge bases they created/edited
  • Spreadsheets
  • Messages (⚠️ DingTalk API doesn't support message history — auto-switches to browser scraping)

After collection, Read:

  • knowledge/{slug}/docs.txt
  • knowledge/{slug}/bitables.txt
  • knowledge/{slug}/messages.txt

If message collection fails, prompt user to upload chat screenshots.


Option D: Upload Files

  • PDF / Images: Read tool directly
  • Feishu message JSON export:
    python3 tools/feishu_parser.py --file {path} --target "{name}" --output /tmp/feishu_out.txt
    
    Then Read /tmp/feishu_out.txt
  • Email files .eml / .mbox:
    python3 tools/email_parser.py --file {path} --target "{name}" --output /tmp/email_out.txt
    
    Then Read /tmp/email_out.txt
  • Markdown / TXT: Read tool directly

Option C: Feishu Link

When the user provides a Feishu doc/Wiki link, ask which method to use:

Feishu link detected. Choose read method:

  [1] Browser Method (recommended)
      Reuses your local Chrome login session
      ✅ Works with internal docs requiring permissions
      ✅ No token configuration needed
      ⚠️  Requires Chrome + playwright installed locally

  [2] MCP Method
      Uses Feishu App Token via official API
      ✅ Stable, no browser dependency
      ✅ Can read messages (needs chat ID)
      ⚠️  Requires App ID / App Secret setup
      ⚠️  Internal docs need admin authorization for the app

Choose [1/2]:

Option 1 (Browser):

python3 tools/feishu_browser.py \
  --url "{feishu_url}" \
  --target "{name}" \
  --output /tmp/feishu_doc_out.txt

First use will open a browser window for login (one-time).

Option 2 (MCP):

First-time setup:

python3 tools/feishu_mcp_client.py --setup

Then read directly:

python3 tools/feishu_mcp_client.py \
  --url "{feishu_url}" \
  --output /tmp/feishu_doc_out.txt

Read messages (needs chat ID, format oc_xxx):

python3 tools/feishu_mcp_client.py \
  --chat-id "oc_xxx" \
  --target "{name}" \
  --limit 500 \
  --output /tmp/feishu_msg_out.txt

Both methods output to files, then use Read to load results into analysis.


Option E: Paste Text

User-pasted content is used directly as text material. No tools needed.


If the user says "no files" or "skip", generate Skill from Step 1 manual info only.

Step 3: Analyze Source Material

First resolve the execution matrix for the selected character family:

character intake persona analyzer persona builder merger storage root
colleague prompts/intake.md prompts/persona_analyzer.md prompts/persona_builder.md prompts/merger.md ./skills/colleague/{slug}
relationship prompts/relationship/intake.md prompts/relationship/persona_analyzer.md prompts/relationship/persona_builder.md prompts/relationship/merger.md ./skills/relationship/{slug}
celebrity prompts/celebrity/intake.md prompts/celebrity/persona_analyzer.md prompts/celebrity/persona_builder.md prompts/celebrity/merger.md ./skills/celebrity/{slug}

Shared across all families:

  • Work analyzer: prompts/work_analyzer.md
  • Work builder: prompts/work_builder.md
  • Correction handler: prompts/correction_handler.md

If the current family is celebrity, run the research subflow before analysis.

celebrity / budget-friendly

  1. Read prompts/celebrity/research.md and follow its 6-dimension parallel collection strategy
  2. Create the research directories first:
    mkdir -p "{skill_dir}/knowledge/research/raw" "{skill_dir}/knowledge/research/merged"
    
  3. Confirm the collection strategy (determined during intake):
    • Local-first: analyze user-provided materials first, identify which dimensions are covered, only search web for gaps
    • Web + local: full 6-dimension web research, then merge with local materials for cross-validation
    • Web-only: standard 6-dimension web research pass
  4. If the user explicitly provided a processable video URL or subtitle source, and the result will not be stored as a long transcript:
    bash tools/research/download_subtitles.sh "{url}" "{skill_dir}/knowledge/subtitles"
    python3 tools/research/srt_to_transcript.py "{subtitle_file}" "{skill_dir}/knowledge/transcripts/{name}.txt"
    
  5. Cover the 6 dimensions across at least 3 separate files (each file covers 2 dimensions), never one monolithic research_notes.md:
    • knowledge/research/raw/01_core_profile.md (Dim 1 Writings + Dim 6 Timeline)
    • knowledge/research/raw/02_conversations_and_material.md (Dim 2 Conversations + Dim 4 Decisions)
    • knowledge/research/raw/03_expression_and_reception.md (Dim 3 Expression DNA + Dim 5 External Views)
  6. Research must follow taste principles (see research prompt):
    • Long-form > snippets, controversy > consensus, change > fixity, firsthand > secondhand
    • Source blacklist — never cite: Zhihu, WeChat Official Accounts, Baidu Baike, content farms, AI-generated bios
    • Source hierarchy: user local materials > first-person works > long interviews > decision records > short-form firsthand > external analysis > secondhand summaries
  7. Merge the research notes:
    python3 tools/research/merge_research.py "{skill_dir}"
    
    Output: knowledge/research/merged/summary.md
  8. Read knowledge/research/merged/summary.md and confirm:
    • Files scanned >= 3
    • Unique URLs >= 2
    • Potential long quote lines = 0
    • URLs in notes are actual inspected pages, not platform roots, search/topic pages, or placeholder paths If these do not hold, extend the research notes before continuing or explicitly record the collection limits.
  9. Quality checkpoint (Phase 1.5): before entering analysis, show the user a structured collection summary:
    ┌──────────────────────────────┬──────────┬─────────────────────────────┐
    │ Dimension                    │ Sources  │ Key Finding                 │
    ├──────────────────────────────┼──────────┼─────────────────────────────┤
    │ 1 Writings                   │ N        │ [core thesis / gap]         │
    │ 2 Conversations              │ N        │ [key pattern / gap]         │
    │ 3 Expression DNA             │ N        │ [style marker / gap]        │
    │ 4 Decisions                  │ N        │ [decision pattern / gap]    │
    │ 5 External Views             │ N        │ [outside view / gap]        │
    │ 6 Timeline                   │ N        │ [trajectory / gap]          │
    ├──────────────────────────────┼──────────┼─────────────────────────────┤
    │ Contradictions               │ N        │ [summary]                   │
    │ Thin dimensions              │ [list]   │ Backfill plan: [plan]       │
    │ Cold figure?                 │ yes/no   │                             │
    └──────────────────────────────┴──────────┴─────────────────────────────┘
    
    Wait for user confirmation before continuing. If the user flags issues or wants more depth, extend research first.
  10. Cold figure detection: if total sources < 10, apply the cold figure protocol:
    • Limit mental models to 2–3
    • Mark thin models as "based on limited information"
    • Expand the honest boundaries section
    • Tell the user what additional material would improve quality
  11. Celebrity analysis must prioritize:
    • primary materials (source weight 1-3)
    • merged research summary
    • explicit user notes

celebrity / budget-unfriendly

  1. First read:
    • prompts/celebrity/budget_unfriendly/research.md
    • references/celebrity_budget_unfriendly_framework.md
  2. Create the research directories first:
    mkdir -p "{skill_dir}/knowledge/research/raw" "{skill_dir}/knowledge/research/merged" "{skill_dir}/knowledge/research/reviews"
    
  3. Confirm the collection strategy (determined during intake): local-first / web+local / web-only
  4. Build the six-track research set as independent files (never merged, never clone observations):
    • knowledge/research/raw/01_writings.md (Dim 1: Writings / systematic thought)
    • knowledge/research/raw/02_conversations.md (Dim 2: Conversations under pressure)
    • knowledge/research/raw/03_expression_dna.md (Dim 3: Linguistic fingerprint)
    • knowledge/research/raw/04_decisions.md (Dim 4: Behavior and choices)
    • knowledge/research/raw/05_external_views.md (Dim 5: External views and criticism)
    • knowledge/research/raw/06_timeline.md (Dim 6: Cognitive trajectory)
  5. Research must follow taste principles + source blacklist + source hierarchy (see research prompt). Every evidence item must carry a source weight (1-7) annotation.
  6. Merge the research notes:
    python3 tools/research/merge_research.py "{skill_dir}"
    
  7. Read knowledge/research/merged/summary.md and confirm the minimum floor:
    • Files scanned >= 6
    • Unique URLs >= 8
    • Primary-source markers >= 3
    • Source metadata blocks >= 6
    • Contradiction bullets >= 6
    • Inference bullets >= 6
    • Potential long quote lines = 0
    • Track coverage count = 6
    • URLs in notes are actual inspected pages, not platform roots, search/topic pages, or placeholder paths If these do not hold, keep filling the weak tracks before continuing to any review stage.
  8. Quality checkpoint (Phase 1.5): before entering audit, show the user a structured collection summary (with primary-source ratio, contradiction count, candidate mental models, known-answer candidates, thin dimensions, cold figure assessment). Wait for user confirmation before continuing.
  9. Then read:
    • prompts/celebrity/budget_unfriendly/audit.md
    • prompts/celebrity/budget_unfriendly/synthesis.md
    • references/celebrity_budget_unfriendly_template.md
  10. First write knowledge/research/reviews/research_audit.md
    • The audit must produce an explicit PASS / FAIL
    • The audit must verify: source hierarchy compliance (no blacklisted sources), primary-source ratio > 50%, taste principle compliance, cold figure assessment
    • If the audit says FAIL, follow the Backfill Tasks before synthesis
  11. Extraction checkpoint (Phase 2.5): after audit PASS, show the user a summary of candidate mental models (with triple-gate verdict, evidence anchors, failure modes). Confirm reasonableness before synthesis.
  12. Then write knowledge/research/reviews/synthesis.md
    • Apply the triple gate to candidate mental models:
      • cross-context recurrence
      • generative power
      • exclusivity
    • Also extract intellectual genealogy seeds (influenced by / diverged from) and Agentic Protocol seeds (the dimensions this person would investigate when facing a novel question)
  13. Then use prompts/celebrity/budget_unfriendly/validation.md to write:
    • knowledge/research/reviews/validation.md
    • Validation must produce an explicit PASS / FAIL
    • Validation must perform: known-answer check (≥2 questions) + edge-case check (1 question) + voice check (100-word blind test) + copyright check + Agentic Protocol check
    • If validation says FAIL, revise the draft before continuing
  14. Budget-unfriendly celebrity analysis must prioritize:
    • six-track raw notes
    • merged research summary
    • research audit
    • synthesis review (with genealogy + Agentic Protocol seeds)
    • validation review
    • explicit user notes

Shared rules for both celebrity profiles:

  • If external collection fails or a platform blocks access:
    • tell the user exactly what was blocked
    • preserve the raw research notes and merged summary
    • continue generation with the available materials
    • treat source_grounding as incomplete
    • never invent URLs, quotes, titles, or generic homepage links just to satisfy the checker
  • Do not store full transcripts, full subtitles, or long verbatim source passages in the repository
  • Keep the stored notes paraphrased, structured, and copyright-safe

Once the family is resolved, analyze along two tracks:

Track A (Work Skill):

  • Refer to prompts/work_analyzer.md
  • Extract: responsible systems, technical standards, workflow, output preferences, experience
  • For celebrity, interpret work as methods, judgment frameworks, and decision patterns rather than literal job scope

Track B (Persona):

  • Use the family-specific persona analyzer
  • If celebrity with research_profile=budget-unfriendly, use:
    • prompts/celebrity/budget_unfriendly/persona_analyzer.md
  • Translate user-provided tags into concrete behavior rules
  • Extract from materials: communication style, decision patterns, interpersonal behavior
  • For celebrity, retain:
    • mental models
    • decision heuristics
    • expression DNA
    • contradictions
    • honest boundaries

Step 4: Generate and Preview

Use prompts/work_builder.md to generate Work content. Use the family-specific persona builder to generate Persona content.

Mapping:

  • colleague → prompts/persona_builder.md
  • relationship → prompts/relationship/persona_builder.md
  • celebrity → prompts/celebrity/persona_builder.md
  • celebrity + budget-unfriendly → prompts/celebrity/budget_unfriendly/persona_builder.md

Show the user a summary (5-8 lines each), ask:

Work Skill Summary:
  - Responsible for: {xxx}
  - Tech stack: {xxx}
  - CR focus: {xxx}
  ...

Persona Summary:
  - Core personality: {xxx}
  - Communication style: {xxx}
  - Decision pattern: {xxx}
  ...

Confirm generation? Or need adjustments?

Step 5: Write Files

After user confirmation, do not hand-build a skills/colleague/{slug}-style tree. Always go through the writer:

  1. Resolve the current storage root:
    • colleague → ./skills/colleague
    • relationship → ./skills/relationship
    • celebrity → ./skills/celebrity
  2. Use the Write tool to create three temporary files:
    • /tmp/dot_skill_{slug}_meta.json
    • /tmp/dot_skill_{slug}_work.md
    • /tmp/dot_skill_{slug}_persona.md
  3. The temporary meta file must include at least:
    • name
    • display_name
    • character
    • research_profile (required when character=celebrity)
    • classification.language (must match the user's language, for example zh-CN or en)
    • profile
    • tags
    • knowledge_sources
  4. Then call:
    python3 tools/skill_writer.py \
      --action create \
      --character {character} \
      --research-profile {research_profile} \
      --slug {slug} \
      --name "{name}" \
      --meta /tmp/dot_skill_{slug}_meta.json \
      --work /tmp/dot_skill_{slug}_work.md \
      --persona /tmp/dot_skill_{slug}_persona.md \
      --base-dir {resolved_base_dir}
    
  5. This command will generate:
    • SKILL.md
    • work.md
    • persona.md
    • work_skill.md
    • persona_skill.md
    • manifest.json
    • meta.json
    • To install the generated role skill into a host, append the relevant flag:
      • Claude Code: --install-claude-skill
      • OpenClaw: --install-openclaw-skill
      • Codex: --install-codex-skill
      • DeepSeek Harness: no host-specific flag is needed; after generation, place the role Skill directory under ~/.dsh/skills/{character}-{slug} or the project's .dsh/skills/{character}-{slug}
      • Claude Code on Windows: optionally add --install-claude-command-shim
  6. If the current family is celebrity, run a quality check after creation:
    python3 tools/research/quality_check.py "{resolved_base_dir}/{slug}/SKILL.md" --profile {research_profile}
    
  7. If source_grounding still fails for a celebrity skill:
    • you may add honest limitation notes and a grounded source summary
    • only add URLs when they are real, specific, and traceable sources
    • never use site roots, topic pages, search pages, or other generic links as fake grounding
    • if no verified external sources exist, keep the FAIL state and explain what source material is still missing

When reporting success, return the correct family-specific location instead of assuming colleague storage.


Evolution Mode: Append Files

When user provides new files or text:

  1. Read new content using Step 2 methods
  2. Resolve the base dir for the current family
  3. Read existing {resolved_base_dir}/{slug}/work.md and persona.md
  4. Use the family-specific merger prompt for incremental analysis
  5. Archive current version (Bash):
    python3 tools/version_manager.py \
      --action backup \
      --character {character} \
      --slug {slug} \
      --base-dir {resolved_base_dir}
    
  6. Write work/persona delta into temporary patch files
  7. Call:
    python3 tools/skill_writer.py \
      --action update \
      --character {character} \
      --slug {slug} \
      --work-patch /tmp/dot_skill_{slug}_work_patch.md \
      --persona-patch /tmp/dot_skill_{slug}_persona_patch.md \
      --base-dir {resolved_base_dir}
    
  8. If the current family is celebrity, run the quality check again after the update

Evolution Mode: Conversation Correction

When user expresses "that's wrong" / "he should be":

  1. Refer to prompts/correction_handler.md to identify correction content
  2. Determine if it belongs to Work (technical/workflow) or Persona (personality/communication)
  3. If it belongs to Work:
    • Generate /tmp/dot_skill_{slug}_work_patch.md
    • The patch must be one or more replaceable ## sections
    • Call:
      python3 tools/skill_writer.py \
        --action update \
        --character {character} \
        --slug {slug} \
        --work-patch /tmp/dot_skill_{slug}_work_patch.md \
        --base-dir {resolved_base_dir}
      
  4. If it belongs to Persona:
    • Write the correction record to /tmp/dot_skill_{slug}_correction.json
    • For a single correction, write {scene, wrong, correct}
    • For multiple persona corrections, write {"persona_corrections": [{...}, {...}]}
    • Call:
      python3 tools/skill_writer.py \
        --action update \
        --character {character} \
        --slug {slug} \
        --correction-json /tmp/dot_skill_{slug}_correction.json \
        --base-dir {resolved_base_dir}
      
  5. If the current family is celebrity, run the quality check again after the update
  6. Do not hand-edit work.md, persona.md, SKILL.md, or meta.json; always update through skill_writer.py

Management Operations

List skills across the three families:

python3 tools/skill_writer.py --action list --character colleague --base-dir ./skills/colleague
python3 tools/skill_writer.py --action list --character relationship --base-dir ./skills/relationship
python3 tools/skill_writer.py --action list --character celebrity --base-dir ./skills/celebrity

Roll back a specific skill version:

# colleague
python3 tools/version_manager.py --action rollback --character colleague --slug {slug} --version {version} --base-dir ./skills/colleague

# relationship
python3 tools/version_manager.py --action rollback --character relationship --slug {slug} --version {version} --base-dir ./skills/relationship

# celebrity
python3 tools/version_manager.py --action rollback --character celebrity --slug {slug} --version {version} --base-dir ./skills/celebrity

Delete a specific skill: After confirming the character family:

# colleague
rm -rf skills/colleague/{slug}

# relationship
rm -rf skills/relationship/{slug}

# celebrity
rm -rf skills/celebrity/{slug}