Introduction¶
Starting January 1, 2025, China implemented a gradual extension of the statutory retirement age. Official rules include precise delay tiers and contribution year increment tables, but most third-party calculators rely on empirical estimates, causing their results to deviate from official tables. The retirement-calc plugin encodes these precise rules into a single module and provides a web calculator, sidebar countdown, and Agent tools in DeepSeek Harness (DSH), ensuring complete consistency between the page and the Agent’s calculation results.
Plugin Overview¶
Name: smallballoons01/retirement-calc
Category: Workflow
License: MIT
Description: A tool for calculating China’s statutory retirement age and pension, integrated into the DSH ecosystem.
Core Features¶
The plugin provides three interaction modes:
- Sidebar button: Displays a “🕐 retirement in N days” button at the bottom of the DSH sidebar, providing a countdown entry point.
- Agent tools: Provides three dedicated tools for the Agent to query and simulate:
retirement_plan: Returns the retirement date, age, remaining days, and estimated monthly pension (including basic pension and personal account pension).retirement_profile: Manages stored basic information and contribution assumptions for a retiree (get, set, clear).retirement_compare: Simulates the impact of different scenarios (increasing contribution years, raising the contribution index, delayed retirement) on the pension.
- Fine-grained configuration: Supports province-specific parameter configuration; for example, in Guangdong, an additional deduction is applied when the average contribution index is below 0.6.
Installation and Activation¶
Installing the plugin requires manually creating symbolic links for peer dependencies. Make sure DeepSeek Harness and its core packages are already installed.
1. Create the directory and link dependencies¶
mkdir -p retirement_calc/node_modules/@deepseek-ai
for p in cordis dsh-llm dsh-settings dsh-skill dsh-system-prompt dsh-tools schemastery; do
ln -sfn "$HOME/.dsh/profiles/node_modules/@deepseek-ai/$p" "retirement_calc/node_modules/@deepseek-ai/$p"
done
2. Register the plugin¶
Add the local path to the specified profile (e.g., web):
dsh plugin --profile web add link:/path/to/retirement_calc
3. Verify the installation¶
Check whether the configuration has taken effect:
dsh --profile web --dump-config | grep retirement-calc
Note: If the configuration file already contains a
retirement-calcline, remove it first. Repeated registration can prevent the plugin tree from starting due to route conflicts.
Typical Usage¶
- Web calculation: Open
dist/retirement-calculator.html. Enter gender, birth year and month, occupation category (e.g., enterprise employee), and current contribution base on the left; the right panel displays the retirement countdown and estimated monthly pension in real time. - Sidebar shortcut: Click the “🕐 retirement in N days” button at the bottom of the DSH sidebar to quickly view the countdown.
- Agent interaction: The Agent can call the
retirement_plantool to obtain the current user’s retirement calculation result, or use theretirement_comparetool to compare multiple scenarios.
Applicable Scenarios and Notes¶
- Intended audience: DSH users and developers who need to precisely calculate China’s statutory retirement age and pension.
- Calculation logic limitation: If the planned contribution months exceed the actual remaining months, the system calculates only the actual months.
- Regional rules: In Guangdong and other provinces, an additional deduction is applied when the average contribution index is below 0.6; the tool supports enabling this logic by province.
- Gender and occupation: Delay rules differ for men and women, and among different occupation categories; gender and occupation category must be correctly distinguished during input.
- Permission note: The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license (MIT) before installation.
Ecosystem Links¶
- Plugin directory: https://www.skillhub.cn/plugins/Smallballoons01/retirement-calc
- Source repository: https://github.com/Smallballoons01/retirement-calc