pyfixest-grid-sharding

pyfixest-grid-sharding is a skill for Claude Code from kennethkhoocy/applied-micro-skills. It costs 212 tokens per session (1,264 once invoked), scanned A, original, MIT.

A method for speeding up large pyfixest regression grids by splitting the list of models across operating-system processes. A regression grid is a collection of related statistical models run in sequence; pyfixest is a Python tool for fixed-effects regressions.

In plain words
What is it for?
Diagnosing slow batches of pyfixest models, checking whether the CPU or GPU is the bottleneck, and running model shards in parallel.
Why use it?
It addresses jobs that run slowly because the models are processed mostly one at a time even when a GPU is available but idle.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions Claude Code.

Part of the applied-micro plugin — 17 skills shipped together

Good fit Diagnosing slow batches of pyfixest models, checking whether the CPU or GPU is the bottleneck, and running model shards in parallel.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kennethkhoocy/applied-micro-skills/pyfixest-grid-sharding
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kennethkhoocy/applied-micro-skills --skill pyfixest-grid-sharding
Clone the repo
git clone --depth 1 https://github.com/kennethkhoocy/applied-micro-skills

Made for: Claude Code.

Or install applied-micro, the plugin that ships this one along with the rest of its 17 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pyfixest-grid-sharding

README.md
[![agentmods](https://agentmods.dev/badge/skills/kennethkhoocy/applied-micro-skills/pyfixest-grid-sharding/github.svg)](https://agentmods.dev/skills/kennethkhoocy/applied-micro-skills/pyfixest-grid-sharding)
Your own site
<a href="https://agentmods.dev/skills/kennethkhoocy/applied-micro-skills/pyfixest-grid-sharding"><img src="https://agentmods.dev/badge/skills/kennethkhoocy/applied-micro-skills/pyfixest-grid-sharding/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pyfixest-grid-sharding

Your own site · 80×15
<a href="https://agentmods.dev/skills/kennethkhoocy/applied-micro-skills/pyfixest-grid-sharding"><img src="https://agentmods.dev/badge/skills/kennethkhoocy/applied-micro-skills/pyfixest-grid-sharding.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 212 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00212 $0.01264
Opus 5 $0.00106 $0.00632
Sonnet 5 $0.00042 $0.00253
Haiku 4.5 $0.00021 $0.00126

Measured 11d ago against content hash 57bee9078a4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pyfixest-grid-sharding scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/applied-micro/skills/pyfixest-grid-sharding/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

pyfixest Grid Sharding

Problem

A regression grid (e.g. 2 measures x 3 FE structures x pooled+per-domain x 3 label variants ~ 70 models) on a 327k-row panel with high-cardinality director FE ran ~55 s/model sequentially — ~65 min wall — on an RTX 5080 machine with demeaner_backend="cupy64" on every call. The GPU was NOT the bottleneck.

Context / Trigger Conditions

  • Measured signature (verified 2026-07-21, H5 seat-loss rerun): job process at ~1.4 cores CPU (37.7 CPU-min in 27 wall-min), nvidia-smi 0% utilization with ~4 GB resident (cupy context loaded, idle), one pyfixest singleton warning per completed model ticking by in the log.
  • Any orchestration prompt that asks a worker to "rerun every headline cell under variants A/B/C" without specifying execution structure.

Solution

  1. Diagnose before blaming the GPU: check process CPU-minutes vs wall-clock (~1 core => serial CPU-bound) and GPU utilization (near 0% => demeaning is not the constraint). The cupy64 kwarg is still correct; it just cannot fix a CPU-dominated pipeline.
  2. Shard the GRID, not the data: split the model list across N OS processes (--shard i --nshards N over the model index, one output part-file each, merge step at the end), N ~ cores-4. Models are independent — this is the Execution Style process-sharding pattern applied to regressions.
  3. Amortize fixed costs inside a shard: build the panel/interactions ONCE per variant and reuse; where specs share RHS/FE, use pyfixest multiple- estimation syntax (multiple depvars / sw()/csw() stepwise) so one model matrix serves several reported cells.
  4. Orchestrator rule: put the sharding mandate IN the worker prompt for any grid larger than ~10 models. Workers default to sequential loops otherwise.
  5. Mid-flight call: if a sequential grid is already >1/3 done with no per-model checkpoint, let it finish — restart+shard usually nets slower. Grids launched fresh should checkpoint per model (append-only part file) so this trade-off never binds again.

Read the full file on GitHub · 89 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 89 lines · 212 tokens per session scan A 57bee9078a4a

Subscribe to this mod's changes

pyfixest-grid-sharding is a skill published in the GitHub repository kennethkhoocy/applied-micro-skills (28 stars, last pushed 6d ago), licensed MIT. It adds 212 tokens to every session and 1,264 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

baoyu-youtube-transcript

A tool for downloading the written captions, subtitles, chapter information, speaker labels, and cover image from a YouTube video using its URL or ID.

JimLiu/baoyu-skills · 107 tokens

baoyu-comic

A tool for creating original educational comics that explain knowledge or ideas through multiple illustrated panels. It supports different art styles and tones and can create several comics in one batch.

JimLiu/baoyu-skills · 61 tokens

baoyu-diagram

Create professional, dark-themed SVG diagrams of any type — architecture diagrams, flowcharts, sequence diagrams, structural diagrams, mind maps, timelines, illustrative/conceptual diagrams, and more. Use this skill whenever the user asks for any kind of technical or conceptual diagram, visualization of a system…

JimLiu/baoyu-skills · 146 tokens

baoyu-danger-gemini-web

Generates images and text via reverse-engineered Gemini Web API. Supports text generation, image generation from prompts, reference images for vision input, and multi-turn conversations. Use when other skills need image generation backend, or when user requests "generate image with Gemini", "Gemini text generation"…

JimLiu/baoyu-skills · 74 tokens

understand-figma

Analyze a Figma file via the Figma REST API and generate an interactive design knowledge graph (pages, screens, components, component sets, instances, design tokens) with a kind:"design" dashboard.

Egonex-AI/Understand-Anything · 47 tokens

playwright-cli

Automates browser interactions for testing and validating your own web applications using playwright-cli. Use when you need terminal-first browser control for navigation, form filling, screenshots, tracing, bound browser sessions, debugging, or generating Playwright test code. Only use against applications you own or…

testdino-hq/playwright-skill · 64 tokens