Best use case

```markdown is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

---

Teams using ```markdown should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/tax-calculator/SKILL.md --create-dirs "https://raw.githubusercontent.com/revfactory/harness-100/main/en/75-tax-calculator/.claude/skills/tax-calculator/skill.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/tax-calculator/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ```markdown Compares

Feature / Agent```markdownStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

---

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

```markdown
---
name: tax-calculator
description: "A full pipeline where an agent team collaborates to handle the entire process of tax calculation and tax-saving strategy development. Use this skill for requests related to tax calculation, tax savings, and tax filing such as: 'calculate my taxes', 'year-end tax settlement simulation', 'how much will my comprehensive income tax be', 'tax-saving methods', 'tax credit optimization', 'pension savings tax credit', 'business income tax', 'freelancer taxes', 'capital gains tax calculation', 'effective tax rate analysis'. If existing tax documents are available, it supports analysis and optimization. However, replacing certified tax accountant or CPA work, acting as a tax agent or filing on behalf of clients, and representing tax appeals or adjudications are outside the scope of this skill."
---

# Tax Calculator — Full Tax Calculation & Tax-Saving Strategy Pipeline

An agent team collaborates to produce income analysis → deduction optimization → tax calculation → tax-saving simulation → filing preparation in one pass.

## Execution Modes

**Agent Team** — 4 agents communicate directly via SendMessage and cross-validate each other.

## Agent Composition

| Agent | File | Role | Type |
|---------|------|------|------|
| income-analyst | `.claude/agents/income-analyst.md` | Income classification, taxable income calculation | general-purpose |
| deduction-optimizer | `.claude/agents/deduction-optimizer.md` | Income deduction & tax credit optimization | general-purpose |
| tax-engine | `.claude/agents/tax-engine.md` | Tax calculation, payable/refund amount | general-purpose |
| strategy-advisor | `.claude/agents/strategy-advisor.md` | Tax-saving simulation, filing preparation | general-purpose |

## Workflow

### Phase 1: Preparation (Orchestrator performs directly)

1. Extract from user input:
    - **Income information**: Employment income (gross salary), business income, financial income, miscellaneous income
    - **Family composition**: Spouse, dependents (for personal exemptions)
    - **Deduction items** (optional): Insurance premiums, medical expenses, education costs, donations, pension savings, etc.
    - **Pre-paid tax** (optional): Withheld tax at source, interim prepayment
    - **Tax year**: Attribution year
2. Create a `_workspace/` directory in the project root
3. Organize input and save to `_workspace/00_input.md`
4. **Determine execution mode** based on the scope of the request

### Phase 2: Team Assembly and Execution

| Order | Task | Owner | Depends On | Output |
|------|------|------|------|--------|
| 1 | Income analysis | analyst | None | `_workspace/01_income_analysis.md` |
| 2 | Deduction optimization | optimizer | Task 1 | `_workspace/02_deduction_optimization.md` |
| 3 | Tax calculation | engine | Tasks 1, 2 | `_workspace/03_tax_calculation.md` |
| 4 | Tax strategy + filing prep | advisor | Tasks 1, 2, 3 | `_workspace/04_tax_strategy.md`, `_workspace/05_filing_preparation.md` |

This workflow is **sequential** — each step depends on the previous one.

**Inter-agent communication flow:**
- analyst completes → passes comprehensive income amount & tax bracket to optimizer, passes taxable income basis to engine
- optimizer completes → passes deduction totals to engine, passes unused deduction items to advisor
- engine completes → passes final tax amount, effective tax rate & tax bracket analysis to advisor
- advisor synthesizes all results to build tax-saving strategies + filing guide

### Phase 3: Integration and Final Outputs

1. Review all files in `_workspace/`
2. Validate consistency of calculated figures (accuracy of the income → deduction → tax chain)
3. Report final summary to user:
    - Income analysis — `01_income_analysis.md`
    - Deduction optimization — `02_deduction_optimization.md`
    - Tax calculation statement — `03_tax_calculation.md`
    - Tax-saving strategy — `04_tax_strategy.md`
    - Filing preparation — `05_filing_preparation.md`

## Mode by Task Scale

| User Request Pattern | Execution Mode | Agents Engaged |
|----------------|----------|-------------|
| "Calculate all my taxes and show me how to save" | **Full Pipeline** | All 4 agents |
| "How much tax on an annual salary of 50M KRW?" | **Quick Calculation Mode** | analyst + engine |
| "Optimize my deduction items" | **Deduction Mode** | analyst + optimizer |
| "Just tell me how to save on taxes" | **Strategy Mode** | advisor (uses existing tax info) |
| "What do I need to prepare for year-end settlement?" | **Filing Prep Mode** | advisor solo |

**Using existing files**: If the user provides an existing withholding tax receipt or similar, extract that data and incorporate it into `_workspace/`.

## Data Transfer Protocol

| Strategy | Method | Purpose |
|------|------|------|
| File-based | `_workspace/` directory | Store and share primary outputs |
| Message-based | SendMessage | Real-time delivery of key information, revision requests |
| Task-based | TaskCreate/TaskUpdate | Progress tracking, dependency management |

Filename convention: `{order}_{agent}_{output}.{extension}`

## Error Handling

| Error Type | Strategy |
|----------|------|
| Insufficient income information | Calculate with information provided, note "additional income verification required" |
| Unclear tax year | Apply latest tax law, note "attribution year verification required" |
| Calculated figure mismatch | Request re-validation of prior step (max 2 times) |
| Agent failure | 1 retry → if still failing, proceed without that output and note the omission in the report |
| Complex tax structure | Note "tax accountant consultation recommended" + provide basic analysis only |

## Test Scenarios

### Normal Flow
**Prompt**: "I'm a salaried worker earning 70M KRW annually, with 1 spouse and 2 children. I contributed 4M KRW to pension savings and spent 20M KRW on credit cards. Calculate my taxes and show me how to save."
**Expected Result**:
- Income analysis: Gross salary 70M KRW → employment income deduction → net employment income calculated
- Deduction optimization: Personal exemptions (4 people), pension savings tax credit, credit card deduction, etc. — optimal combination
- Tax calculation: Full process from taxable income → calculated tax → final tax → payable/refund amount
- Tax-saving strategy: IRP additional contribution, medical expense deduction utilization, etc. — 3+ simulations
- Filing preparation: Required documentation checklist, HomeTax filing guide

### Existing File Flow
**Prompt**: "This is last year's withholding tax receipt — analyze it for me" + file attachment
**Expected Result**:
- Extract income, deduction, and tax data from the withholding tax receipt
- Analyze current deduction status + identify additional tax-saving opportunities

### Error Flow
**Prompt**: "I'm a freelancer with annual revenue of 100M KRW — how much tax do I owe?"
**Expected Result**:
- Classify as business income, apply expense ratio (simplified expense ratio / standard expense ratio)
- Simulate tax differences based on expense documentation method
- Explain differences based on business registration status
- Provide information on regional health insurance premium burden

## Per-Agent Extended Skills

| Agent | Extended Skill | Purpose |
|---------|----------|------|
| deduction-optimizer | `deduction-optimizer-engine` | Deduction limit tables, optimization algorithm, credit card allocation |
| tax-engine, strategy-advisor | `tax-bracket-simulator` | Tax bracket analysis, tax simulation, marginal tax rate calculation |
```
deduction-optimizer-engine` | Deduction limit table, optimization algorithm, credit card allocation |
| tax-engine, strategy-advisor | `tax-bracket-simulator` | Tax bracket analysis, tax amount simulation, marginal tax rate calculation |
```

Related Skills

sustainability-audit

495
from revfactory/harness-100

Full audit pipeline for ESG/sustainability where an agent team collaborates to generate environmental, social, and governance assessments along with an integrated report and improvement plan. Use this skill for requests such as 'run an ESG audit', 'write a sustainability report', 'ESG assessment', 'carbon emissions calculation', 'ESG rating diagnosis', 'governance review', 'social responsibility assessment', 'GRI report', 'TCFD disclosure', 'ESG improvement plan', and other ESG/sustainability tasks. Also supports assessment of specific pillars (E/S/G) only or improving existing reports. However, actual on-site audit execution, third-party verification certificate issuance, ESG rating agency score changes, and carbon credit trading are outside the scope of this skill.

materiality-assessment

495
from revfactory/harness-100

ESG materiality assessment matrix. Referenced by the esg-reporter and improvement-planner agents when evaluating ESG issue materiality and setting priorities. Use for 'materiality assessment', 'importance analysis', or 'Materiality Matrix' requests. Stakeholder surveys and external certification are out of scope.

ghg-protocol

495
from revfactory/harness-100

GHG Protocol detailed guide. Referenced by the environmental-analyst agent when calculating and reporting greenhouse gas emissions. Use for 'GHG Protocol', 'carbon emissions', 'Scope 1/2/3', or 'carbon footprint' requests. Carbon credit trading and CDM project execution are out of scope.

citation-standards

495
from revfactory/harness-100

Academic citation and reference standards guide. Referenced by the paper-writer and submission-preparer agents when composing citations and references. Use for 'citation format', 'APA', or 'references' requests. Original paper retrieval and professional database access are out of scope.

academic-paper

495
from revfactory/harness-100

Full research pipeline for academic paper writing where an agent team collaborates to generate research design, experiment protocols, analysis, manuscript writing, and submission preparation. Use this skill for requests such as 'write an academic paper', 'research paper writing', 'help me write a paper', 'design a study', 'run statistical analysis', 'prepare journal submission', 'manuscript writing', 'research methodology design', 'hypothesis testing', 'academic writing', and other academic research paper tasks. Also supports analysis, rewriting, and submission preparation when existing data or drafts are available. However, actual data collection execution, official IRB submission, journal system login and upload, and running actual statistical software are outside the scope of this skill.

product-copy-formulas

495
from revfactory/harness-100

Product copy formula library. Referenced by the detail-page-writer and marketing-manager agents when writing purchase-driving copy. Use for 'product copy', 'marketing copy', or 'ad copy' requests. Ad placement and design mockup creation are out of scope.

ecommerce-launcher

495
from revfactory/harness-100

Full launch pipeline for e-commerce products where an agent team collaborates to generate product planning, detail pages, pricing strategy, marketing, and CS setup all at once. Use this skill for requests such as 'launch an e-commerce product', 'prepare a product launch', 'register a product on Naver Smart Store', 'launch on Coupang', 'create a detail page', 'develop a pricing strategy', 'create a marketing plan', 'launch prep', 'product planning brief', 'e-commerce CS manual', and other e-commerce product launch tasks. Also supports supplementing pricing/marketing/CS even when existing briefs or detail pages are provided. However, actual platform API integration (automated product registration), payment system development, logistics system integration, and real-time order management are outside the scope of this skill.

conversion-optimization

495
from revfactory/harness-100

Purchase conversion optimization framework. Referenced by the detail-page-writer and pricing-strategist agents when designing detail pages and pricing with a conversion focus. Use for 'conversion rate optimization', 'CRO', or 'purchase psychology' requests. A/B testing tool setup and funnel automation are out of scope.

real-estate-analyst

495
from revfactory/harness-100

Real estate investment analysis pipeline. An agent team collaborates to produce market research, location analysis, profitability analysis, risk assessment, and investment reports. Use this skill for requests such as 'analyze this real estate', 'apartment investment analysis', 'studio apartment yield', 'real estate market research', 'location analysis', 'real estate investment report', 'buy vs lease', 'reconstruction investment analysis', 'commercial property yield analysis', and other general real estate investment analysis tasks. Actual purchase contracts, brokerage services, interior design, and property management are outside the scope of this skill.

location-scoring

495
from revfactory/harness-100

Location scoring scorecard. Referenced by the location-analyst agent for systematic real estate location evaluation. Use for requests involving 'location analysis', 'location assessment', or 'commercial area analysis'. On-site inspections and surveying are out of scope.

cap-rate-calculator

495
from revfactory/harness-100

Real estate yield calculator. Reference formulas and models used by the profitability-analyst agent for quantitative investment return analysis. Use for requests involving 'Cap Rate', 'yield analysis', 'DCF', or 'cash flow analysis'. Tax advisory and loan underwriting are out of scope.

vendor-scoring

495
from revfactory/harness-100

Vendor evaluation scorecard framework. Referenced by vendor-comparator and evaluation-designer agents when systematically comparing and evaluating vendors. Used for 'vendor evaluation', 'supplier comparison', 'bid evaluation' requests. Note: posting bid announcements and executing contracts are out of scope.