Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Create Table Classifier

ASecurity

Train vision models to predict optimal Camelot extraction strategies

18 stars
0 votes
0 copies
1 views
Added 9/4/2026
devopspythonbash

Security Analysis

A100/100

Scanned 9/4/2026

$npx -y skills add majiayu000/claude-skill-registry-data --skill create-table-classifier --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Create Table Classifier?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Create Table Classifier
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-create-table-classifier-claude-skill-registry-data/badge)](https://www.skillsdirectory.com/skills/majiayu000-create-table-classifier-claude-skill-registry-data)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: create-table-classifier
description: Train vision models to predict optimal Camelot extraction strategies
  for PDF tables.
---

---
name: create-table-classifier
description: >
  Train vision classifiers for Camelot table extraction strategy prediction.
  Uses MobileNetV2 with GRPO training and Camelot execution feedback.
  Integrates with Federated Taxonomy for preset-aware predictions.
allowed-tools: Bash, Read
triggers:
  - train table classifier
  - table strategy training
  - camelot strategy model
  - extraction strategy training
  - s05 strategy predictor
metadata:
  short-description: GRPO training for table extraction strategy prediction

provides:
  - create-table-classifier
composes: [, task-monitor]
---

# Create Table Classifier

Train vision models to predict optimal Camelot extraction strategies for PDF tables.
Uses GRPO with execution feedback from actual Camelot extractions.

## Training Approaches

| Approach | Description | Use When |
|----------|-------------|----------|
| **GRPO (Recommended)** | RL with Camelot execution feedback | Production training |
| **SFT Only** | Supervised fine-tuning | Quick baseline |
| **Collect Only** | Data collection from corpus | Building dataset |

## Quick Start (GRPO with Execution Feedback)

```bash
cd .pi/skills/create-table-classifier

# 1. Setup environment
cp .env.example .env
# Edit .env with paths to corpus and extractor

# 2. Collect training data from successful extractions
./run.sh collect \
    --corpus /path/to/12tb/corpus \
    --extractor-results /path/to/s05/outputs \
    --limit 5000

# 3. Split data into train/eval
./run.sh split --input data/labels/collected.jsonl --train-ratio 0.85

# 4. Run full training pipeline (warmup -> GRPO -> eval)
./run.sh train-full \
    --train-file data/labels/train.jsonl \
    --eval-file data/labels/eval.jsonl \
    --wandb

# 5. Test inference
./run.sh infer --image data/images/test/sample.png
```

## GRPO Training Pipeline

```
┌─────────────────────────────────────────────────────────────────┐
│                    GRPO Training Pipeline                        │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  1. Data Collection (from S05 successful extractions)            │
│     PDF → Table Region → [Image, Strategy, Quality]              │
│                                                                  │
│  2. SFT Warmup (3 epochs)                                        │
│     Initialize policy on high-quality extractions                │
│                                                                  │
│  3. GRPO Training Loop                                           │
│     ┌───────────────────────────────────────────────────────┐   │
│     │  Image ──▶ Generate N strategies ──▶ Execute Camelot  │   │
│     │                                           │            │   │
│     │  ┌─────────────────────────────────────────┐          │   │
│     │  │ Reward = 0.5×Quality + 0.3×Speed       │          │   │
│     │  │        + 0.2×PresetMatch                │          │   │
│     │  └─────────────────────────────────────────┘          │   │
│     │                    │                                   │   │
│     │                    ▼                                   │   │
│     │  Group-relative advantage ──▶ Policy update           │   │
│     └───────────────────────────────────────────────────────┘   │
│                                                                  │
│  4. Evaluation on Holdout                                        │
│     If fails: Retry with adjusted hyperparameters               │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘
```

## Reward Functions

| Reward | Weight | Source | Description |
|--------|--------|--------|-------------|
| Quality | 50% | Camelot accuracy | Table extraction accuracy score |
| Speed | 30% | Extraction time | Faster than baseline = bonus |
| PresetMatch | 20% | Federated Taxonomy | Strategy matches preset expectations |

## Federated Taxonomy Integration

The classifier predicts **preset-aware** strategies:

```json
{
  "strategy": "lattice_sensitive",
  "line_scale": 15,
  "edge_tol": 300,
  "preset_hint": "arxiv_scientific",
  "domain": "scientific",
  "confidence": 0.92
}
```

**Preset-Strategy Mapping:**

| Preset | Expected Strategy | line_scale | Notes |
|--------|------------------|------------|-------|
| arxiv_scientific | lattice_sensitive | 12-15 | Thin LaTeX borders |
| requirements_spec | lattice | 20-25 | Structured tables |
| archive_scanned | stream | 35-40 | OCR-degraded lines |

## Evaluation Thresholds

| Metric | Threshold | Description |
|--------|-----------|-------------|
| strategy_accuracy | ≥ 85% | Correct strategy selection |
| param_mae | ≤ 5 | Mean absolute error for line_scale |
| fallback_rate | ≤ 10% | Tables needing retry |
| avg_quality | ≥ 0.85 | Mean extraction quality |

## Architecture

```
Table Region Image (224x224)
    │
    ▼
┌─────────────────────────────────────────────┐
│  MobileNetV2 (pretrained ImageNet)          │
│  + Strategy Classification Head (3 classes) │
│  + Regression Head (line_scale, edge_tol)   │
│  + Preset Embedding (optional)              │
└─────────────────────────────────────────────┘
    │
    ▼
Strategy Prediction
{
  "strategy": "lattice" | "stream" | "lattice_sensitive",
  "line_scale": 12-40,
  "edge_tol": 100-500,
  "confidence": 0.92
}
```

## Training Data Format

```json
{
  "image_path": "data/images/train/arxiv_2501_page3_table1.png",
  "source_pdf": "2501_15355.pdf",
  "page": 3,
  "bbox": [100, 200, 400, 350],
  "strategy": "lattice_sensitive",
  "params": {
    "line_scale": 15,
    "edge_tol": 300,
    "flavor": "lattice"
  },
  "quality_score": 0.92,
  "fallback_used": false,
  "preset": "arxiv_scientific",
  "domain": "scientific"
}
```

## Commands

### Data Collection

| Command | Description |
|---------|-------------|
| `./run.sh collect` | Collect table images from corpus |
| `./run.sh split` | Split data into train/eval sets |
| `./run.sh stats` | Show dataset statistics |

### GRPO Training

| Command | Description |
|---------|-------------|
| `./run.sh train-full` | Full pipeline: warmup → GRPO → eval |
| `./run.sh warmup` | SFT warmup before GRPO |
| `./run.sh grpo` | GRPO training with Camelot feedback |
| `./run.sh evaluate` | Run evaluation on holdout set |

### Utilities

| Command | Description |
|---------|-------------|
| `./run.sh infer` | Test inference on image |
| `./run.sh tensorboard` | Start TensorBoard |
| `./run.sh export` | Export model for S05 integration |

## S05 Integration

After training, integrate with S05:

```python
from create_table_classifier.inference import TableStrategyPredictor

predictor = TableStrategyPredictor(
    model_path="models/table-classifier-final",
)

# Predict strategy for table region
pred = predictor.predict(region_image)
if pred.confidence > 0.8:
    strategies_to_try = [pred.to_camelot_params()] + fallback_strategies
```

## GPU Requirements

| GPU | Batch Size | Memory |
|-----|------------|--------|
| RTX 3090 (24GB) | 32 | ~8GB |
| RTX 4090 (24GB) | 64 | ~12GB |
| A100 (40GB) | 128 | ~20GB |

## Output Structure

```
models/
├── table-classifier-sft/       # SFT warmup checkpoint
│   ├── model.pth
│   └── config.json
├── table-classifier-grpo/      # GRPO trained model
│   └── attempt_N/
└── table-classifier-final/     # Best model for S05
    ├── model.pth
    ├── config.json
    └── preset_embeddings.json  # Federated Taxonomy mappings
```

## Monitoring

Training logs are saved to `logs/` and optionally to Weights & Biases.

```bash
# View training progress
./run.sh logs

# TensorBoard
./run.sh tensorboard
```

## Self-Improvement Cycle

The classifier improves through continuous learning:

1. **Extract** tables from 10K PDF corpus
2. **Collect** successful strategies from S05 outputs
3. **Train** GRPO model with execution feedback
4. **Deploy** updated model to S05
5. **Repeat** nightly on scheduler

```bash
# Run full self-improvement cycle
./run.sh self-improve --corpus /path/to/10k_pdfs --nights 7
```

Attribution

majiayu000majiayu000
View sourceSee grades on GitHubMore from majiayu000 →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Terraform Module Library

Build reusable Terraform modules for AWS, Azure, and GCP infrastructure following infrastructure-as-code best practices. Use when creating infrastructure modules, standardizing cloud provisioning, or implementing reusable IaC components.

401991 votes

sematext-otel

Wire a service's OpenTelemetry output to Sematext Cloud. Walks through region, App-type, instrumentation flow (managed OTLP endpoint vs Sematext Agent), and signal selection (traces/metrics/logs), then produces the exact env-var block and points at a runnable reference example in this repo. Invoke when instrumenting a new app for Sematext.

01 votes

Deployment Patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications. Use when setting up deployment infrastructure or planning releases.

2699140 votes

Babysit

Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.

971540 votes

V7 Roster

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

953190 votes
View all in devops →