borghei/claude-skills/people-analytics

Claude Code and agent skill by borghei/claude-skills

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

People analytics across workforce metrics, predictive modeling, and employee insights. Use when building turnover models, analyzing engagement surveys, running pay equity regressions, or scoring flight risk.

Install

npx vskill@latest install borghei/claude-skills/people-analytics

SKILL.md

The same SKILL.md was published earlier as borghei/claude-skills/people-analytics.

People Analytics

The agent operates as a senior people analytics partner, translating workforce data into actionable insights using statistical modeling, segmentation analysis, and data governance best practices.

Clarify First

Before generating the analysis, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.

  • Business question + success metric: frames the entire analysis (step 1); a vague question yields an unfocused output.
  • Analysis type (descriptive, attrition risk, pay equity, or engagement driver): selects the method and which script applies.
  • Available data sources + their quality/completeness: determines which method is even possible (step 2).
  • Segments + privacy threshold (minimum group size): drives segmentation and the anonymization/aggregation applied.

Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.

Workflow

  1. Frame the question -- Clarify the business question with the HR or business stakeholder. Examples: "Why is Sales attrition 2x the company average?" or "Are we paying equitably across gender?" Define the success metric for the analysis.
  2. Assess data readiness -- Identify required data sources (HRIS, ATS, survey platform, payroll). Check for completeness, recency, and quality. Flag any gaps before proceeding.
  3. Analyze -- Apply the appropriate method from the analytics toolkit (descriptive stats, regression, classification, segmentation). Document assumptions and limitations.
  4. Validate findings -- Sense-check results with domain experts (HRBPs, managers). Test for statistical significance and practical significance. Check predictive models for bias across protected groups.
  5. Recommend -- Translate findings into 2-3 specific, actionable recommendations with expected impact and cost.
  6. Deliver and monitor -- Present insights using the dashboard framework. Set up ongoing monitoring for key metrics with alert thresholds.
Checkpoint: After step 2, confirm that all data has been anonymized or aggregated to comply with privacy policy before analysis begins.

Analytics Maturity Model

LevelNameCapabilitiesTypical Questions Answered
1Operational ReportingHeadcount, compliance, ad-hoc queries"How many people do we have?"
2Advanced ReportingDashboards, trends, benchmarking, segmentation"How has attrition changed by quarter?"
3AnalyticsStatistical analysis, correlation, root cause"What drives attrition in Sales?"
4PredictiveTurnover prediction, performance modeling, risk scoring"Who is likely to leave in the next 6 months?"
5PrescriptiveAutomated recommendations, real-time interventions"What should we do to retain this person?"

Core HR Metrics

Workforce Metrics
MetricFormulaBenchmark
Turnover Rate(Separations / Avg HC) x 10010-15%
Retention Rate(Retained / Starting HC) x 10085-90%
Time to FillDays from req open to offer accept30-45 days
Cost per HireTotal recruiting cost / Hires$3-5K
Regrettable TurnoverRegrettable exits / Total exits< 30%
Performance Metrics
MetricFormulaBenchmark
High Performers% rated top tier15-20%
Goal CompletionGoals achieved / Goals set80%+
Promotion RatePromotions / Headcount8-12%
Engagement Metrics
MetricFormulaBenchmark
eNPSPromoters % - Detractors %20-40
Engagement ScoreSurvey composite (1-100)70%+
AbsenteeismAbsent days / Work days< 3%

Turnover Prediction Model

python
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
def build_turnover_model(employee_data: pd.DataFrame) -> dict:
"""
Build and evaluate a turnover prediction model.
Input: DataFrame with columns for features + 'left_company' (0/1).
Output: dict with model, feature importance, and evaluation metrics.
"""
features = [
'tenure_months', 'salary_ratio_to_market', 'performance_rating',
'months_since_last_promotion', 'manager_tenure', 'team_size',
'engagement_score', 'training_hours_ytd', 'projects_completed'
]
X = employee_data[features]
y = employee_data['left_company']
X_train, X_test, y_train, y_test = train_test_split(
X, y, test_size=0.2, random_state=42, stratify=y
)
model = RandomForestClassifier(n_estimators=100, random_state=42)
model.fit(X_train, y_train)
y_pred = model.predict(X_test)
report = classification_report(y_test, y_pred, output_dict=True)
importance = (
pd.DataFrame({'feature': features, 'importance': model.feature_importances_})
.sort_values('importance', ascending=False)
)
return {'model': model, 'importance': importance, 'evaluation': report}
def score_flight_risk(model, current_employees: pd.DataFrame) -> pd.DataFrame:
"""
Score current employees for flight risk.
Returns DataFrame with employee_id, flight_risk_score (0-1), and risk_level.
"""
probabilities = model.predict_proba(current_employees[model.feature_names_in_])[:, 1]
risk_levels = pd.cut(
probabilities,
bins=[0, 0.25, 0.50, 0.75, 1.0],
labels=['Low', 'Medium', 'High', 'Critical']
)
return pd.DataFrame({
'employee_id': current_employees['employee_id'],
'flight_risk_score': probabilities.round(3),
'risk_level': risk_levels
}).sort_values('flight_risk_score', ascending=False)

Example: Sales Attrition Root-Cause Analysis

QUESTION
Sales voluntary turnover is 22% vs 12% company average. Why?
DATA
Source: HRIS + engagement survey + exit interviews (n=45 exits, trailing 12 mo)
ANALYSIS
Segmentation by tenure band:
< 1 yr: 35% of exits (onboarding/ramp issues)
1-2 yr: 40% of exits (comp dissatisfaction + career path)
2+ yr: 25% of exits (manager relationship)
Regression on exit survey scores (n=38 respondents):
Top drivers of intent-to-leave:
1. "I am paid fairly" (beta = -0.42, p < 0.01)
2. "I see a career path here" (beta = -0.31, p < 0.01)
3. "My manager supports my development" (beta = -0.28, p < 0.05)
Compensation benchmark:
Sales IC3 compa-ratio: 0.88 (12% below midpoint)
Sales IC2 compa-ratio: 0.91 (9% below midpoint)
Rest of company average: 0.98
FINDINGS
1. Sales comp is significantly below market, especially at IC2-IC3
2. No defined career ladder for Sales ICs beyond IC3
3. New hires (< 1 yr) leaving due to unrealistic ramp expectations
RECOMMENDATIONS
1. Market adjustment: Bring Sales IC2-IC3 to 95th percentile compa-ratio ($180K budget)
2. Publish a Sales career ladder through IC5 with clear promotion criteria
3. Redesign onboarding: extend ramp period from 30 to 90 days with milestone targets
EXPECTED IMPACT
Reduce Sales attrition from 22% to 14-16% within 12 months
ROI: $180K adjustment saves ~$450K in replacement costs (10 fewer exits x $45K/hire)

Pay Equity Analysis

python
import pandas as pd
import statsmodels.api as sm
def analyze_pay_equity(employee_data: pd.DataFrame) -> dict:
"""
Conduct pay equity analysis controlling for legitimate pay factors.
Returns raw gap, adjusted gap, model fit, and employees flagged for review.
"""
# Raw gap
avg_by_gender = employee_data.groupby('gender')['salary'].mean()
raw_gap = (avg_by_gender['Female'] - avg_by_gender['Male']) / avg_by_gender['Male']
# Adjusted gap (control for level, tenure, performance, location)
controls = pd.get_dummies(
employee_data[['job_level', 'tenure_years', 'performance_rating', 'department', 'location']],
drop_first=True
)
controls = sm.add_constant(controls)
controls['is_female'] = (employee_data['gender'] == 'Female').astype(int)
model = sm.OLS(employee_data['salary'], controls).fit()
adjusted_gap = model.params['is_female']
# Flag outliers (residual > 2 std dev)
employee_data['predicted'] = model.predict(controls)
employee_data['residual'] = employee_data['salary'] - employee_data['predicted']
threshold = 2 * employee_data['residual'].std()
flagged = employee_data[abs(employee_data['residual']) > threshold]
return {
'raw_gap_pct': round(raw_gap * 100, 1),
'adjusted_gap_usd': round(adjusted_gap, 0),
'model_r_squared': round(model.rsquared, 3),
'employees_flagged': len(flagged),
'flagged_details': flagged[['employee_id', 'salary', 'predicted', 'residual']]
}

Engagement Survey Analysis

  1. Calculate response rate -- Target 80%+ for statistical validity. Flag departments below 60%.
  2. Compute category scores -- Average Likert responses by category (Manager, Growth, Culture, Compensation). Compare to prior period.
  3. Run driver analysis -- Regress category scores against overall engagement to identify which categories have the highest impact on engagement.
  4. Segment -- Break results by department, level, tenure band, and location. Identify where scores diverge most from company average.
  5. Prioritize -- Plot categories on a 2x2 matrix (Impact vs Score). "High impact, low score" quadrant = priority action areas.
Checkpoint: Suppress results for any segment with fewer than 5 respondents to protect anonymity.

DEI Metrics Framework

DomainMetricsData Source
RepresentationGender / ethnicity distribution by levelHRIS
Pay equityRaw gap, adjusted gap (controlled regression)Payroll + HRIS
ProgressionPromotion rates by demographic groupHRIS
HiringOffer and accept rates by demographic groupATS
InclusionInclusion index, belonging score, psychological safetySurvey

Data Governance Checklist

Before starting any people analytics project:

  • [ ] Business question and purpose clearly documented
  • [ ] Data minimization applied (only collect what is needed)
  • [ ] Privacy impact assessment completed
  • [ ] Anonymization or aggregation applied where possible
  • [ ] Predictive models tested for bias across protected groups
  • [ ] Role-based access controls implemented
  • [ ] Data retention policy defined
  • [ ] Employee communication planned (transparency principle)

Scripts

bash
# Analyze engagement survey results with driver analysis
python scripts/survey_analyzer.py --file survey_results.csv
python scripts/survey_analyzer.py --file survey_results.csv --prior prior_survey.csv --json
# Score attrition risk from employee data
python scripts/attrition_predictor.py --file employees.csv
python scripts/attrition_predictor.py --file employees.csv --threshold 0.7 --json
# Workforce headcount planning calculations
python scripts/headcount_planner.py --file workforce.csv --growth 0.15 --attrition 0.12
python scripts/headcount_planner.py --file workforce.csv --growth 0.15 --attrition 0.12 --json

Troubleshooting

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
854
Repository forks
155
7-day trend score
34

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 May 2026, 6 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/borghei/claude-skills/people-analytics/badge)](https://verified-skill.com/skills/borghei/claude-skills/people-analytics)

Something wrong with this skill or its page? Tell us.