historical-data-manager
БесплатноБез исполняемых скриптовНе проверенExtract, clean, and organize legacy construction data from archives. Migrate historical project data, cost records, and schedules into modern formats.
от datadrivenconstruction★ 461 звезда на GitHubОб этом скилле
Historical Data Manager for Construction
Overview
Manage legacy construction data from archives, old systems, and historical records. Extract, clean, normalize, and migrate data into modern formats for analysis and benchmarking.
Business Case
Construction companies accumulate decades of project data in various formats:
- Paper records scanned to PDF
- Legacy database exports (Access, dBase, FoxPro)
- Old spreadsheet formats (Lotus 1-2-3, early Excel)
- Proprietary software exports
- Project closeout documentation
This skill helps extract value from historical data for:
- Cost benchmarking and trending
- Productivity analysis over time
- Risk pattern identification
- Estimating improvement
Technical Implementation
Historical Data Extractor
from dataclasses import dataclass, field
from typing import List, Dict, Any, Optional
from datetime import datetime
from pathlib import Path
import pandas as pd
import re
import json
@dataclass
class HistoricalRecord:
project_id: str
project_name: str
year: int
data_type: str # cost, schedule, labor, material
original_format: str
extracted_data: Dict[str, Any]
quality_score: float
notes: List[str] = field(default_factory=list)
class HistoricalDataManager:
"""Manage extraction and normalization of historical construction data."""
def __init__(self, archive_path: str):
self.archive_path = Path(archive_path)
self.records: List[HistoricalRecord] = []
self.normalization_rules = self._load_normalization_rules()
def scan_archive(self) -> Dict[str, int]:
"""Scan archive and categorize files by type."""
file_types = {}
for file_path in self.archive_path.rglob('*'):
if file_path.is_file():
ext = file_path.suffix.lower()
file_types[ext] = file_types.get(ext, 0) + 1
return file_types
def extract_from_legacy_excel(self, file_path: str, year: int) -> List[HistoricalRecord]:
"""Extract data from legacy Excel files."""
records = []
try:
# Try different engines for old formats
try:
df = pd.read_excel(file_path, engine='openpyxl')
except:
df = pd.read_excel(file_path, engine='xlrd')
# Detect data type from content
data_type = self._detect_data_type(df)
# Normalize column names
df = self._normalize_columns(df)
# Extract project info
project_info = self._extract_project_info(df, file_path)
record = HistoricalRecord(
project_id=project_info.get('id', f'LEGACY-{year}-{hash(file_path) % 10000}'),
project_name=project_info.get('name', Path(file_path).stem),
year=year,
data_type=data_type,
original_format='excel',
extracted_data=df.to_dict('records'),
quality_score=self._assess_quality(df)
)
records.append(record)
except Exception as e:
print(f"Error extracting {file_path}: {e}")
return records
def extract_from_csv(self, file_path: str, year: int) -> HistoricalRecord:
"""Extract data from CSV files with encoding detection."""
# Try different encodings
encodings = ['utf-8', 'latin-1', 'cp1252', 'iso-8859-1']
for encoding in encodings:
try:
df = pd.read_csv(file_path, encoding=encoding)
break
except:
continue
df = self._normalize_columns(df)
data_type = self._detect_data_type(df)
return HistoricalRecord(
project_id=f'CSV-{year}-{hash(file_path) % 10000}',
project_name=Path(file_path).stem,
year=year,
data_type=data_type,
original_format='csv',
extracted_data=df.to_dict('records'),
quality_score=self._assess_quality(df)
)
def extract_from_database_export(self, file_path: str, db_type: str) -> List[HistoricalRecord]:
"""Extract data from legacy database exports."""
records = []
if db_type == 'access':
# Read Access MDB/ACCDB files
import pyodbc
conn_str = f'DRIVER={{Microsoft Access Driver (*.mdb, *.accdb)}};DBQ={file_path}'
conn = pyodbc.connect(conn_str)
# Get all tables
cursor = conn.cursor()
tables = [row.table_name for row in cursor.tables(tableType='TABLE')]
for table in tables:
df = pd.read_sql(f'SELECT * FROM [{table}]', conn)
# Process each table...
conn.close()
return records
def normalize_cost_data(self, records: List[HistoricalRecord], base_year: int = 2026) -> pd.DataFrame:
"""Normalize historical cost data to current dollars."""
# RSMeans
Установить historical-data-manager в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл historical-data-manager?
Extract, clean, and organize legacy construction data from archives. Migrate historical project data, cost records, and schedules into modern formats.
Как установить скилл historical-data-manager?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл historical-data-manager запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic