Skip to main content
skill GitHub Copilot official · GitHub

datanalysis-credit-risk — GitHub Copilot skill: what it does

This skill cleans credit data and screens variables before risk modeling. Use it when a raw dataset needs quality checks and pre-loan preparation.

Install into GitHub Copilot · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill datanalysis-credit-risk
Open on GitHub

What datanalysis-credit-risk does

The skill runs a credit-data cleaning pipeline. It loads and formats the dataset, reviews sample counts and bad-sample rates by organization, separates OOS records, and filters abnormal months. It then measures missing rates and removes variables with high missingness, low IV, unstable PSI, Null Importance noise, or high correlation.

Each step runs independently, so the original data stays available for comparison. Parameters can be entered before a step, with default values supported. IV and PSI calculations support multiprocessing. The pipeline exports an Excel report with step results, filtering conditions, organization-level statistics, and removed variables.

You need Python and a dataset with date, label, organization, and key columns. Set the file path through DATA_PATH; parquet is preferred. Install it when you are preparing credit scoring data and need a traceable screening report. It is a poor fit for a small one-off review done by hand.

What it helps with

  • assess the quality of raw credit data
  • separate OOS records from modeling data
  • remove variables with excessive missing values
  • screen variables by IV and PSI
  • export an Excel cleaning report

Example prompts for the agent

  • Run the full pipeline for the dataset in `DATA_PATH` and export the report.
  • Check missing rates, IV, PSI, and correlation before training the model.
  • Run the example at `.github/skills/datanalysis-credit-risk/scripts/example.py`.

How to install datanalysis-credit-risk

1Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill datanalysis-credit-risk

2GitHub CLI

gh skill install github/awesome-copilot datanalysis-credit-risk

3Manually: put the files in place

.github/skills/datanalysis-credit-risk/SKILL.md

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

Similar

sql-optimization-patterns Seth Hobson This skill helps inspect slow SQL, EXPLAIN plans, and index choices. Use it when a query scans too much data, JOINs poorly, or causes N+1 calls. Claude Code CX Codex Cursor 19,717installs data-manager-api-event-ingestion official google Guides event and conversion ingestion to Google products through the Data Manager API. Use it for offline conversions, lead conversions, and Google Analytics events. Claude Code Gemini CLI CX Codex 6,148installs data-manager-api-setup official google This skill sets up Data Manager API access and client libraries. Use it when preparing a local environment before building an API integration. Claude Code Gemini CLI CX Codex 6,109installs database-migration Seth Hobson This skill handles schema and data migrations with Sequelize, TypeORM, and Prisma. Use it when a change needs a rollback plan or a zero-downtime rollout. Claude Code CX Codex Cursor 17,549installs google-cloud-storage-basics official google This skill helps an agent manage Google Cloud Storage buckets and objects, from file transfers and access control to storage policies. Claude Code Gemini CLI CX Codex 5,516installs clean-data-xls official anthropics Automates cleanup of messy Excel and Google Sheets data: trims whitespace, unifies case, converts numbers stored as text, standardizes dates, removes duplicates, and flags mixed-type columns. Claude Code CX Codex Cursor +1 2,100installs xlsx official anthropics Creates, reads, edits, and converts spreadsheet files. Use it when the requested deliverable is an Excel workbook or another tabular file. Claude Code Claude.ai 187,223installs google-agents-cli-observability official Google This skill guides you through tracing and monitoring AI agents, including ADK agents. Use it when you need to inspect agent execution or monitor a deployed agent. Claude Code CX Codex Cursor +1 509,900installs

Questions about datanalysis-credit-risk

How do I install datanalysis-credit-risk in GitHub Copilot?

Run npx skills add github/awesome-copilot --skill datanalysis-credit-risk, then use the skill from .github/skills/datanalysis-credit-risk/SKILL.md.

What does datanalysis-credit-risk do?

It cleans credit data and screens variables before pre-loan modeling. It also exports an Excel report with processing details.

What do I need before running it?

You need Python and a dataset path in DATA_PATH. Set DATE_COL, Y_COL, ORG_COL, and KEY_COLS; use OOS_ORGS for out-of-sample organization settings.

Source text

SKILL.md · MIT
---
name: datanalysis-credit-risk
description: Credit risk data cleaning and variable screening pipeline for pre-loan modeling. Use when working with raw credit data that needs quality assessment,  missing value analysis, or variable selection before modeling. it covers data loading and formatting, abnormal period filtering, missing rate calculation, high-missing variable removal,low-IV variable filtering, high-PSI variable removal, Null Importance denoising, high-correlation variable removal, and cleaning report generation. Applicable scenarios arecredit risk data cleaning, variable screening, pre-loan modeling preprocessing.
---

# Data Cleaning and Variable Screening

## Quick Start

```bash
# Run the complete data cleaning pipeline
python ".github/skills/datanalysis-credit-risk/scripts/example.py"
```

## Complete Process Description

The data cleaning pipeline consists of the following 11 steps, each executed independently without deleting the original data:

1. **Get Data** - Load and format raw data
2. **Organization Sample Analysis** - Statistics of sample count and bad sample rate for each organization
3. **Separate OOS Data** - Separate out-of-sample (OOS) samples from modeling samples
4. **Filter Abnormal Months** - Remove months with insufficient bad sample count or total sample count
5. **Calculate Missing Rate** - Calculate overall and organization-level missing rates for each feature
6. **Drop High Missing Rate Features** - Remove features with overall missing rate exceeding threshold
7. **Drop Low IV Features** - Remove features with overall IV too low or IV too low in too many organizations
8. **Drop High PSI Features** - Remove features with unstable PSI
9. **Null Importance Denoising** - Remove noise features using label permutation method
10. **Drop High Correlation Features** - Remove high correlation features based on original gain
11. **Export Report** - Generate Excel report containing details and statistics of all steps

## Core Functions

| Function | Purpose | Module |
|------|------|----------|
| `get_dataset()` | Load and format data | references.func |
| `org_analysis()` | Organization sample analysis | references.func |
| `missing_check()` | Calculate missing rate | references.func |
| `drop_abnormal_ym()` | Filter abnormal months | references.analysis |
| `drop_highmiss_features()` | Drop high missing rate features | references.analysis |
| `drop_lowiv_features()` | Drop low IV features | references.analysis |
| `drop_highpsi_features()` | Drop high PSI features | references.analysis |
| `drop_highnoise_features()` | Null Importance denoising | references.analysis |
| `drop_highcorr_features()` | Drop high correlation features | references.analysis |
| `iv_distribution_by_org()` | IV distribution statistics | references.analysis |
| `psi_distribution_by_org()` | PSI distribution statistics | references.analysis |
| `value_ratio_distribution_by_org()` | Value ratio distribution statistics | references.analysis |
| `export_cleaning_report()` | Export cleaning report | references.analysis |

## Parameter Description

### Data Loading Parameters
- `DATA_PATH`: Data file path (best are parquet format)
- `DATE_COL`: Date column name
- `Y_COL`: Label column name
- `ORG_COL`: Organization column name
- `KEY_COLS`: Primary key column name list

### OOS Organization Configuration
- `OOS_ORGS`: Out-of-sample organization list

### Abnormal Month Filtering Parameters
- `min_ym_bad_sample`: Minimum bad sample count per month (default 10)
- `min_ym_sample`: Minimum total sample count per month (default 500)

### Missing Rate Parameters
- `missing_ratio`: Overall missing rate threshold (default 0.6)

### IV Parameters
- `overall_iv_threshold`: Overall IV threshold (default 0.1)
- `org_iv_threshold`: Single organization IV threshold (default 0.1)
- `max_org_threshold`: Maximum tolerated low IV organization count (default 2)

### PSI Parameters
- `psi_threshold`: PSI threshold (default 0.1)
- `max_months_ratio`: Maximum unstable month ratio (default 1/3)
- `max_orgs`: Maximum unstable organization count (default 6)

### Null Importance Parameters
- `n_estimators`: Number of trees (default 100)
- `max_depth`: Maximum tree depth (default 5)
- `gain_threshold`: Gain difference threshold (default 50)

### High Correlation Parameters
- `max_corr`: Correlation threshold (default 0.9)
- `top_n_keep`: Keep top N features by original gain ranking (default 20)

## Output Report

The generated Excel report contains the following sheets:

1. **汇总** - Summary information of all steps, including operation results and conditions
2. **机构样本统计** - Sample count and bad sample rate for each organization
3. **分离OOS数据** - OOS sample and modeling sample counts
4. **Step4-异常月份处理** - Abnormal months that were removed
5. **缺失率明细** - Overall and organization-level missing rates for each feature
6. **Step5-有值率分布统计** - Distribution of features in different value ratio ranges
7. **Step6-高缺失率处理** - High missing rate features that were removed
8. **Step7-IV明细** - IV values of each feature in each organization and overall
9. **Step7-IV处理** - Features that do not meet IV conditions and low IV organizations
10. **Step7-IV分布统计** - Distribution of features in different IV ranges
11. **Step8-PSI明细** - PSI values of each feature in each organization each month
12. **Step8-PSI处理** - Features that do not meet PSI conditions and unstable organizations
13. **Step8-PSI分布统计** - Distribution of features in different PSI ranges
14. **Step9-null importance处理** - Noise features that were removed
15. **Step10-高相关性剔除** - High correlation features that were removed

## Features

- **Interactive Input**: Parameters can be input before each step execution, with default values supported
- **Independent Execution**: Each step is executed independently without deleting original data, facilitating comparative analysis
- **Complete Report**: Generate complete Excel report containing details, statistics, and distributions
- **Multi-process Support**: IV and PSI calculations support multi-process acceleration
- **Organization-level Analysis**: Support organization-level statistics and modeling/OOS distinction

© github · MIT · github/awesome-copilot

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor