AI Agent Hub
Back to skills
Shanghai Social Security Calculator icon

Shanghai Social Security Calculator

Business Operations Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @mayishebao/mayishebao02.

About this skill

Problem

When validating payroll, HR teams or engineers often need to convert a Shanghai social insurance base into personal and employer monthly contributions. Manual checks of rates, base clamping, and five insurance categories are error-prone, which can slow payroll review and introduce mistakes when policy limits change.

How it works

The skill accepts a monthly contribution base, reads references/rates.json for limits and rates, clamps the base to [7384, 36921], then calculates personal and employer amounts for pension, medical including maternity, unemployment, and work injury. scripts/calc_shanghai_ss.py performs the calculation, while scripts/make_image.py renders a PNG infographic with summary cards and a bar chart using matplotlib and pillow. It can pass --injury to override the employer work-injury rate. The output is useful for payroll checks, cost estimates, and explaining contribution composition.

Boundaries

The scope is limited to Shanghai enterprise employee social insurance and does not include the housing fund. Rates and base limits are local policy data; if Shanghai publishes new limits, update rates.json. Image generation may require matplotlib and pillow, and failed dependency installation needs manual handling.

Use Cases

  • HR answers an employee asking how much is deducted for a 15000 base by calculating the five-insurance detail.
  • Payroll validates personal and employer totals for a 12000 base and renders a contribution breakdown chart.
  • HR explains Shanghai social insurance categories to new hires with a generated PNG showing itemized amounts.
  • After policy updates, maintenance staff adjust rates.json base limits and recalculate monthly contribution totals.

Best For

  • Shanghai HR specialists who need to verify employee and employer monthly social insurance amounts for a given base.
  • Payroll operations engineers who maintain local rate files and recalculate base-limit impacts.
  • HR business partners who need a shareable PNG showing itemized social insurance deductions.
  • Recruiting leads estimating employer social insurance costs for candidate offer packages.