# How Zhangxuefeng-skill Implements Family Background Diversion for Career Advice

> Discover how Zhangxuefeng-skill's Family Background Diversion splits career advice into wealthy or non-wealthy paths. Learn about its unique checkpoint before recommendations.

- Repository: [花叔/zhangxuefeng-skill](https://github.com/alchaincyf/zhangxuefeng-skill)
- Tags: how-to-guide
- Published: 2026-06-12

---

**Zhangxuefeng-skill uses a mandatory "Family Background Diversion" checkpoint that splits advice into "wealthy" (有矿) or "non-wealthy" (没矿) branches before generating any career recommendations.**

The `alchaincyf/zhangxuefeng-skill` repository encodes Zhang Xuefeng's decision-making methodology as a structured skill where **family background** serves as the primary branching mechanism. According to the source code analysis, this "Family Background Diversion" model acts as a gatekeeper that determines whether the agent provides risk-taking, ideal-driven advice or survival-focused, income-guaranteed recommendations.

## The Family Background Diversion Decision Tree

The skill implements **「家庭背景分流」** (Family-Background Diversion) as **Model 5** in its decision architecture. This model operates as a binary classifier that triggers before any career advice is generated.

### Pre-Answer Checklist Enforcement

Before processing any recommendation, the agent checks a mandatory prerequisite in [`SKILL.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/SKILL.md) (lines 85-86):

```markdown
家庭条件问了吗？

```

If the answer is **No**, the agent aborts the current reasoning path and returns to the Family-Background Diversion step. This enforcement ensures that socioeconomic context is captured before entering specialized advice domains.

### Binary Branching Logic (有矿 vs 没矿)

The diversion creates two distinct strategy paths based on the user's family financial status:

- **有矿 (Financially well-off)**: The advice branch permits risk-taking, long-term, or "ideal-driven" recommendations such as pursuing arts, entrepreneurship, or cross-disciplinary studies.
- **没矿 (Average or low-income)**: The advice branch defaults to survival mode, emphasizing guaranteed income paths like science and engineering majors for stable employment.

This split is explicitly documented in [`SKILL.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/SKILL.md) (lines 13-15, 213-215) and cross-referenced in [`README.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/README.md) (lines 62, 244).

## Implementation in SKILL.md

The decision logic is encoded as a plaintext table that the runtime parses. The core specification appears in [`SKILL.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/SKILL.md) under the model definition:

```markdown
5. **「家庭背景分流」**：同一个问题，先问家庭条件。有矿的和没矿的，策略完全不同。

```

The execution table routes conversations based on trigger signals:

```markdown
| 步骤 | 触发信号 | 第一选择 | 备用 |
|---|---|---|---|
| 3 | 角色立场冲突 | 事实优先 + 用模型 4「家庭背景分流」解释为何例外 | 承认「这个我也没公开聊过，但按筛子论推下来……」 |

```

When the runtime encounters the "第一选择" field, it routes the conversation according to the family background data stored in the context.

## Fallback Handling for Conflicting Stances

When user input contradicts preset stances (e.g., the rule "金融不能碰" when the family actually works in finance), the agent applies a fallback protocol defined in [`SKILL.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/SKILL.md) (lines 99-100):

```

事实优先 + 用模型 4「家庭背景分流」解释为何例外

```

This fallback acknowledges real-world exceptions while maintaining the structural integrity of the diversion model. The agent prioritizes factual accuracy over rigid rule adherence, using the family background model to explain why the exception applies.

## Practical Example from Demo Conversations

The diversion model appears in live interactions as documented in [`examples/demo-conversation.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/examples/demo-conversation.md) (line 22):

```

用户：我想报金融专业，会不会太不靠谱？
张雪峰：先说下，你家里有人在金融行业吗？
用户：我父母都是普通工人。
张雪峰：金融这条路竞争激烈，建议你先选理工科，等有了稳收入再考虑转型。

```

This demonstrates the mandatory checkpoint: the agent first asks **"你家里是做金融的吗？"** to determine whether the "金融不能碰" rule applies or gets overridden by the family background exception.

## Summary

- **Zhangxuefeng-skill** hard-codes family background as the primary decision variable in [`SKILL.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/SKILL.md), treating it as a mandatory prerequisite before generating advice.
- The **"Family Background Diversion"** creates a binary split between **有矿** (wealthy) and **没矿** (non-wealthy) paths, fundamentally altering recommendation strategies.
- The implementation uses a markdown-based decision table with explicit trigger signals and fallback rules for handling stance conflicts.
- File references include [`SKILL.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/SKILL.md) (lines 13-15, 85-86, 99-100, 213-215), [`README.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/README.md) (lines 62, 244), and [`examples/demo-conversation.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/examples/demo-conversation.md) (line 22).

## Frequently Asked Questions

### What happens if the agent hasn't asked about family background yet?

According to the pre-answer checklist in [`SKILL.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/SKILL.md) (lines 85-86), the agent checks whether it has asked "家庭条件问了吗？" (Have you asked about family conditions?). If the answer is **No**, the agent aborts the current path and returns to the Family-Background Diversion step before proceeding with any recommendations.

### How does the skill handle cases where the user's background contradicts general rules?

When a user's specific situation contradicts preset stances (such as "don't touch finance" when the family works in finance), the agent follows the fallback rule in [`SKILL.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/SKILL.md) (lines 99-100): **"事实优先 + 用模型 4「家庭背景分流」解释为何例外"** (Facts first + use Model 4 "Family Background Diversion" to explain why this is an exception).

### What is the difference between the 有矿 and 没矿 advice branches?

The **有矿** (wealthy) branch permits risk-taking, long-term, and ideal-driven advice such as arts, entrepreneurship, or interdisciplinary studies. The **没矿** (non-wealthy) branch emphasizes survival and guaranteed income, typically recommending science and engineering majors for stable employment. This binary split is documented as **Model 5** in [`SKILL.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/SKILL.md) (lines 13-15).

### Where is the Family Background Diversion logic implemented in the codebase?

The core logic resides in **[`SKILL.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/SKILL.md)** under the model specifications and decision tables, with cross-references in **[`README.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/README.md)** (lines 62, 244). Practical demonstrations appear in **[`examples/demo-conversation.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/examples/demo-conversation.md)** (line 22), while the broader strategic context is documented in [`references/research/05-decisions.md`](https://github.com/alchaincyf/zhangxuefeng-skill/blob/main/references/research/05-decisions.md).