Skip to content

Conversation

@MaxGhenis
Copy link
Contributor

Summary

This PR adds policyengine-claude plugin configuration to enable automated installation of skills for PolicyEngine calculator and analysis workflows.

Changes

  • ✅ Add plugin auto-install configuration in .claude/settings.json
  • ✅ Configure auto-install of analysis-tools plugin from PolicyEngine/policyengine-claude

What's Included

The analysis-tools plugin provides 3 skills (reference documentation):

1. policyengine-us-skill

  • Situation creation patterns (single, married, families)
  • Common variables reference (income, deductions, benefits, taxes)
  • Using axes for parameter sweeps
  • Policy reform definitions
  • Helper functions and examples
  • Directly applicable to GiveCalc's charitable donation calculations

2. policyengine-analysis-skill

  • Impact analysis patterns (distributional, case studies)
  • Plotly visualizations with PolicyEngine branding (teal #39C6C0)
  • Streamlit dashboard templates (like GiveCalc)
  • Jupyter notebook best practices
  • Reform analysis code templates

3. policyengine-standards-skill

  • Python standards (Black, 79-char, uv run)
  • Changelog management (changelog_entry.yaml)
  • Git workflow best practices
  • Common AI pitfalls

Benefits for GiveCalc

Development Assistance

  • Reference documentation - Claude automatically knows PolicyEngine patterns used in GiveCalc
  • Best practices - Consistent code quality and visualization standards
  • Streamlit patterns - Templates for dashboard features
  • Charitable donation logic - Skills include donation-specific examples

How It Works

Skills are automatically loaded by Claude when relevant. For example:

You: "Add a new chart showing marginal tax rate vs donation amount"

Claude: [Uses policyengine-us-skill for tax calculations]
        [Uses policyengine-analysis-skill for Plotly charting with PE branding]
        [Uses policyengine-standards-skill for code formatting]

Installation

Automatic (Recommended)

When you trust this repo in Claude Code, the plugin auto-installs!

Manual (Optional)

/plugin marketplace add PolicyEngine/policyengine-claude
/plugin install analysis-tools@policyengine-claude

Testing

After merging:

  1. Team members trust the repo in Claude Code
  2. Plugin auto-installs from marketplace
  3. Skills are automatically available when working on GiveCalc
  4. Claude will reference these patterns when helping with development

Related


🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

MaxGhenis and others added 3 commits October 14, 2025 20:43
- Created givecalc/ package separating calculation logic from UI
- Added 33 comprehensive tests with pytest (TDD approach)
- Fixed axes aggregation bug (use tax_unit instead of household for 2025)
- Updated to 2025 tax calculations
- Improved UI: sidebar layout, spinners, input persistence with st.form
- Fixed chart y-axis scaling issues
- Added Makefile for common tasks (test, run, format)
- Added pyproject.toml (modern Python packaging)
- Removed deprecated setup.py
- Organized all UI components in ui/ directory
- Added performance caching for faster calculations
- Fixed numpy deprecation warnings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Run tests on Python 3.10, 3.11, 3.12
- Check code formatting with Black and isort
- Use uv for fast dependency installation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Add plugin auto-install configuration in .claude/settings.json
- Configure auto-install of analysis-tools plugin from PolicyEngine/policyengine-claude
- Provides 3 skills for PolicyEngine calculator/analysis workflows

Included skills:
- policyengine-us-skill: Simulation patterns, situation creation, variable reference
- policyengine-analysis-skill: Impact analysis, Streamlit dashboards, Plotly visualizations
- policyengine-standards-skill: Code quality, formatting, CI requirements

Benefits:
- Automated reference documentation for PolicyEngine patterns
- Best practices for calculator apps and analysis
- Consistent code quality and visualization standards
@MaxGhenis
Copy link
Contributor Author

Closing in favor of #42 which now includes the Claude plugin configuration from this PR.

@MaxGhenis MaxGhenis closed this Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants