How to Use the /dyp-ask Skill for Business and Life Problem-Solving
The /dyp-ask skill is a declarative markdown prompt that transforms the AI into a simulator of Chinese entrepreneur Duan Yongping, enabling data-driven answers to investment, business, and life questions through the "段永平问答" framework without runtime code modifications.
The ai-berkshire project provides a modular skill system that loads complex AI personas from markdown files. The /dyp-ask skill leverages this architecture to channel the business acumen of investor Duan Yongping (段永平) through a declarative prompt structure. By invoking this slash command, users receive advice filtered through Duan's core principles of value investing, moat analysis, and staying within one's ability circle.
Architecture of the /dyp-ask Skill
The skill operates as a data-driven prompt that the LLM interprets as a complete behavioral specification. When invoked, the system injects user arguments into the $ARGUMENTS placeholder and appends the skill's markdown content to the conversation context.
The architecture consists of three logical layers defined in [skills/dyp-ask.md](https://github.com/xbtlin/ai-berkshire/blob/main/skills/dyp-ask.md):
- Persona & Background – Biographical context of Duan Yongping, including his founding of步步高 and investment history with NetEase and Apple.
- Core Thought Framework – Investment heuristics such as "买股票就是买公司" (buying stocks means buying companies), ability circle constraints, and stop-doing-list principles.
- Execution Rules – Response constraints that prohibit precise price targets, mandate margin trading warnings, and require the model to admit ignorance ("我不懂") when questions fall outside its defined competence.
Because the entire logic lives in markdown, the runtime requires no custom code—the skill is purely declarative.
Source Files and Synchronization
The implementation spans three key files that maintain a single source of truth:
Skill Definition File
The canonical definition resides in [skills/dyp-ask.md](https://github.com/xbtlin/ai-berkshire/blob/main/skills/dyp-ask.md). This file contains the complete persona prompt, including specific phrases like "本分" (fundamental duty) and "毛估估" (rough estimation) that the model must use to maintain authentic voice.
Codex Prompt Wrapper
For Codex compatibility, [codex-prompts/dyp-ask.md](https://github.com/xbtlin/ai-berkshire/blob/main/codex-prompts/dyp-ask.md) provides a thin wrapper that forwards user input via the $ARGUMENTS variable. This separation allows the same skill to run on different LLM runtimes without modifying the core persona definition.
Sync Infrastructure
The [scripts/sync-codex-skills.py](https://github.com/xbtlin/ai-berkshire/blob/main/scripts/sync-codex-skills.py) utility automatically generates the Codex prompt from the master skill file. Running this script ensures that any updates to the persona in skills/dyp-ask.md propagate to both Claude Code and Codex environments, preventing configuration drift.
How to Invoke the /dyp-ask Skill
You can trigger the skill through three interfaces depending on your environment.
Command Line Interface
If you have installed the Codex CLI tools from the repository, invoke the skill directly:
dyp-ask "Should I diversify into tech stocks in 2026?"
The CLI receives the response through the skill's prompt pipeline, returning Duan Yongping's analysis of the question framed around business moats and valuation.
Slash Command in Chat
Within the AI Berkshire interface or compatible editors, type:
/dyp-ask 拼多多的护城河到底在哪里?
The system replaces $ARGUMENTS with your question and prepends the skill definition, causing the model to respond in first-person voice with structured analysis covering differentiation, network effects, and capital requirements.
Programmatic Integration
For automated workflows, call the skill via Python subprocess:
import subprocess
def consult_dyp(question: str) -> str:
"""Query the Duan Yongping persona for business advice."""
result = subprocess.run(
['dyp-ask', question],
capture_output=True,
text=True,
encoding='utf-8'
)
return result.stdout
# Example usage
response = consult_dyp("How do I evaluate a company's management quality?")
print(response)
This method captures the full markdown response, including the characteristic terse style and specific Mandarin terminology defined in the skill file.
Safety Guards and Compliance
The skill embeds specific guardrails directly in the prompt text. According to the source in skills/dyp-ask.md, the model must:
- Refuse to provide specific stock price targets or entry points.
- Warn against margin trading and excessive leverage.
- Limit responses to concepts within the user's stated ability circle, directing them to "不懂" (I don't understand) rather than speculating on unfamiliar industries.
These constraints ensure the AI's output aligns with both Duan Yongping's conservative investment philosophy and the repository's compliance policies.
Summary
- The
/dyp-askskill is a declarative markdown prompt stored inskills/dyp-ask.mdthat defines the Duan Yongping persona. - Zero runtime code is required; the LLM interprets the skill file as a behavioral specification.
- The
scripts/sync-codex-skills.pygenerator maintains synchronization between the canonical skill and Codex-specific wrappers. - Three invocation methods exist: CLI (
dyp-ask), slash command (/dyp-ask), and programmatic Python calls. - Built-in safety guards prohibit specific financial advice and enforce the "ability circle" principle.
Frequently Asked Questions
What business philosophy does the /dyp-ask skill implement?
The skill implements the "段永平问答" (Duan Yongping Q&A) framework, which emphasizes value investing principles such as "买股票就是买公司" (buying stocks means buying the underlying business), analyzing economic moats, and maintaining a stop-doing-list to avoid decisions outside one's competence. The model answers from the perspective of the investor who built步步高 and achieved significant returns through NetEase and Apple investments.
How does the skill maintain Duan Yongping's specific voice and tone?
The skill definition in skills/dyp-ask.md encodes specific linguistic markers including the phrases "本分" (fundamental duty), "毛估估" (rough estimation), and "我不懂" (I don't understand). By loading these constraints into the system prompt, the LLM adopts Duan's characteristic terse, first-person speaking style and his habit of questioning the questioner's understanding of a business before providing analysis.
Can I modify the /dyp-ask skill to emulate a different investor?
Yes. Because the skill is data-driven, you can edit skills/dyp-ask.md to replace the biographical details, core principles, and specific phrases with those of another figure. After editing, run python scripts/sync-codex-skills.py to regenerate the Codex-compatible prompt. The synchronization script ensures your changes propagate to all runtime environments without requiring code changes in the CLI or UI components.
Why does the skill refuse to give specific stock prices or trading recommendations?
The source file explicitly defines execution rules that prohibit precise price targets and mandate warnings against margin trading. This design choice reflects Duan Yongping's actual investment philosophy of avoiding speculation and staying within one's ability circle, while also serving as a compliance mechanism to prevent the AI from generating regulated financial advice. When asked for specific prices, the model responds with the concept of "估值" (valuation) instead of numerical predictions.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →