Agent skill

Daofy

by chinawsb in chinawsb/daofy

Daofy for Delphi 用法 skill(按需加载)。当实际需要调用 delphifile 写入/修改 Delphi 文件、 需要做编译/审计/自动化测试,或遇到 Trae 等只暴露 runmcp 的客户端包装时使用。

MITAuto-check passedAgent Workflows

Install Daofy

skills CLI
$ npx skills add chinawsb/daofy --skill daofy -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install chinawsb/daofy daofy --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/chinawsb/daofy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/resources/agent-skills/daofy .claude/skills/daofy && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
daofy
GitHub stars
107
Token cost
~791 tokens
SKILL.md length
179 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Daofy for Delphi 用法 skill(按需加载)。当实际需要调用 delphifile 写入/修改 Delphi 文件、 需要做编译/审计/自动化测试,或遇到 Trae 等只暴露 runmcp 的客户端包装时使用。

  • Works in 7 steps: 确定 Delphi 编译器/环境时,调用… → 读取 Delphi 文件时调用… → 写入 Delphi 文件时使用… → …
  • Tasks that involve MCP servers
  • SKILL.md covers 客户端包装, 工作流, 编码规则按需加载 and DFM 中文内容, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Daofy is an agent skill from chinawsb/daofy. Daofy for Delphi 用法 skill(按需加载)。当实际需要调用 delphifile 写入/修改 Delphi 文件、 需要做编译/审计/自动化测试,或遇到 Trae 等只暴露 runmcp 的客户端包装时使用。 强制路由规则(Delphi 文件必用 delphifile)由 Daofy Rule 与 initialize.instructions 常驻保证,本 skill 只讲"怎么用"。

Its SKILL.md is about 790 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering MCP servers. It works with Model Context Protocol. The repository describes itself as: Daofy for Delphi — MCP Server that compiles Delphi projects and queries knowledge base for AI assistants. The licence is MIT.

When your agent uses it

  • Tasks that involve MCP servers

Example prompts

  • “/daofy”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. 确定 Delphi 编译器/环境时,调用 check_environment(action="detect")
  2. 读取 Delphi 文件时调用 delphi_file(action="read", file_path=...)。
  3. 写入 Delphi 文件时使用 delphi_file(action="write", edits=[...]);同一文件多处
  4. 写入后按需调用 delphi_file(action="format", file_path=...)。
  5. 编译、审计、布局、运行时 uses 检查使用 delphi_project。
  6. 自动化测试使用 automate_delphi;需要完整流程时读取
  7. 深度编码/编译/审查规范用 get_coding_rules(section=..., examples=...) 按需获取,不要在常驻上下文里堆规范。

What it can do on your machine

Read from SKILL.md and the folder at commit 1e0ecfb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Daofy loads about 791 tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 179 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~791

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from chinawsb/daofy at commit 1e0ecfb, republished under its MIT licence (© chinawsb). 179 words, ~791 tokens.

Download SKILL.mdSave it as .claude/skills/daofy/SKILL.md (or your agent's skills folder).
name
daofy
description
Daofy for Delphi 用法 skill(按需加载)。当实际需要调用 delphi_file 写入/修改 Delphi 文件、 需要做编译/审计/自动化测试,或遇到 Trae 等只暴露 run_mcp 的客户端包装时使用。 强制路由规则(Delphi 文件必用 delphi_file)由 Daofy Rule 与 initialize.instructions 常驻保证,本 skill 只讲"怎么用"。
<!-- daofy-managed-skill: true -->
<!-- daofy-managed-skill-version: 2026.08.06 -->

Daofy for Delphi — 用法 Skill(按需加载)

本 skill 是按需加载的详细用法手册,不是常驻规则。 强制路由约束(Delphi 文件必须用 delphi_file,禁用内置 Read/Edit/Write/grep)已由 Daofy Rule(安装到客户端规则目录)与 MCP initialize.instructions 常驻保证,此处不再复述, 以免与 Rule 重复注入。本 skill 只补充 Rule 没覆盖的"客户端包装"与"工作流"。

客户端包装

  • 直接暴露 MCP 工具的客户端:调用 delphi_file 时只传 Daofy 参数,例如 action/file_path/start_line/end_line。
  • Trae 等只暴露 run_mcp 的客户端:外层传 server_name 和 tool_name,内层 args 才放 Daofy 参数;server_name 是该客户端 MCP 配置里的 Daofy 服务别名, 按实际配置填写,不是 Daofy 固定值;不要把 server_name/tool_name 混进 delphi_file 的参数对象。
python
run_mcp({
  "server_name": "<client-configured-daofy-server-name>",
  "tool_name": "delphi_file",
  "args": {
    "action": "read",
    "file_path": "C:\\path\\Unit1.pas",
    "start_line": 1,
    "end_line": 100
  }
})

工作流

  1. 确定 Delphi 编译器/环境时,调用 check_environment(action="detect") (首次编译前先 action="check"),不要用 shell 跑 where dcc32 / dcc64 --version 等探测命令——编译器路径/版本由 Daofy 统一探测与缓存。 工具参数不确定时再用 tool_help 或 get_coding_rules。
  2. 读取 Delphi 文件时调用 delphi_file(action="read", file_path=...)。
  3. 写入 Delphi 文件时使用 delphi_file(action="write", edits=[...]);同一文件多处 修改合并为一次写入。
  4. 写入后按需调用 delphi_file(action="format", file_path=...)。
  5. 编译、审计、布局、运行时 uses 检查使用 delphi_project。
  6. 自动化测试使用 automate_delphi;需要完整流程时读取 delphi://automation/workflow。
  7. 深度编码/编译/审查规范用 get_coding_rules(section=..., examples=...) 按需获取,不要在常驻上下文里堆规范。

编码规则按需加载

get_coding_rules 支持 section 和 examples 两个维度按需加载,避免一次性注入全部规则:

python
# 只加载写代码规则
get_coding_rules(section="writing")

# 只加载某个子章节
get_coding_rules(section="delphi_file_write_rule")

# 加载写代码规则 + 命名规范示例
get_coding_rules(section="writing", examples="naming")

# 加载编译规则 + 格式化示例
get_coding_rules(section="compile", examples="formatting")

常用 section: writing, compile, review, agent_rules, kb_search, delphi_file_write_rule, delphi_file_dirty_flag, delphi_file_output_format, delphi_file_usage_tips

常用 examples: naming, formatting, documentation, error-handling

DFM 中文内容

编辑 DFM 文件时,中文内容(Caption、Text、Hint 等)直接写原文,不需要转义:

python
# ✅ 正确:直接写中文
delphi_file(action="write", file_path="MainForm.dfm", edits=[
    {"start_line": 5, "end_line": 5, "new_text": '    Caption = "中文标题"'}
])

# ❌ 错误:不要手动转义 Unicode
delphi_file(action="write", file_path="MainForm.dfm", edits=[
    {"start_line": 5, "end_line": 5, "new_text": '    Caption = \u4e2d\u6587\u6807\u9898'}
])

原理:delphi_file 读写时自动处理编码(GBK/UTF-8/BOM),中文内容保持原文写入。

与其他 IDE skill 的关系

如果 Kai/RAD Studio IDE skill 同时存在,仍然优先遵守 Daofy 对 Delphi 文件的工具 路由规则。Daofy 的 delphi_file 负责编码检测、备份、DFM 转换、脏标记和 edit guard; 缺少 Daofy 工具时,刷新 MCP 连接或询问用户,不要静默回退到普通文件编辑。

不限制的范围

Daofy MCP Server 自身的 Python、Markdown、测试和配置文件可以按当前 Agent 的普通代码 编辑流程处理;本 skill 的直接读写限制只针对 Delphi 源码和工程文件。

© chinawsb, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in src/resources/agent-skills/daofy of chinawsb/daofy.

Open the folder on GitHubat commit 1e0ecfb

Compare with similar skills

Daofy next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Daofy compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Daofy this skillchinawsb/daofy107—~791Automated safety check: PassMIT
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k4 repos~1.2kAutomated safety check: PassMIT
MCP Integration for Pluginsanthropics/claude-plugins-official38k11 repos~3.1kAutomated safety check: PassApache-2.0
Crush Configurationcharmbracelet/crush29k—~3.7kAutomated safety check: PassCustom licence
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 4 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    38k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Crush Configuration

    charmbracelet/crush

    Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.

    29k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Migrates the compatible subset of settings and global file-based MCP servers from the Warp desktop app into Warp Agent CLI without exposing credentials or state.

    65k GitHub starsUsed in 1 repo~2.1k tokens
    Agent WorkflowsAuto-check passed

Categories

Questions about Daofy

What does Daofy do?

Daofy for Delphi 用法 skill(按需加载)。当实际需要调用 delphifile 写入/修改 Delphi 文件、 需要做编译/审计/自动化测试,或遇到 Trae 等只暴露 runmcp 的客户端包装时使用。. Daofy is an agent skill from chinawsb/daofy.

When should I use Daofy?

Daofy fits situations like: tasks that involve MCP servers.

How do I install Daofy in Claude Code?

Run `npx skills add chinawsb/daofy --skill daofy -a claude-code`. Or copy the skill folder (src/resources/agent-skills/daofy in chinawsb/daofy) into .claude/skills/daofy in your project. Claude Code loads it when a task matches its description.

How do I install Daofy in Codex?

Run `npx skills add chinawsb/daofy --skill daofy -a codex`. Or copy the skill folder (src/resources/agent-skills/daofy in chinawsb/daofy) into .agents/skills/daofy in your project. Codex loads it when a task matches its description.

Can I use Daofy in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add chinawsb/daofy --skill daofy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/daofy, .gemini/skills/daofy, .github/skills/daofy and .opencode/skills/daofy in your project.

What does Daofy need to run?

SKILL.md names no scripts, command-line tools or credentials: Daofy is instructions for the agent only. Our summary lists: Python 3.

Does Daofy access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Daofy safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Daofy use?

Daofy is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Daofy use?

About 791 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Daofy?

Skills that share tags, products or a category with Daofy: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 38k stars) and Crush Configuration (charmbracelet/crush, 29k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Daofy?

chinawsb (a GitHub user) maintains it in chinawsb/daofy, which has 107 GitHub stars. The repository was last updated on September 16, 2026.

Source: chinawsb/daofy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.