Agent skill
xlsx-to-python-dark-intelligence-archive-generation
Sub-skill of xlsx-to-python: Dark Intelligence Archive Generation.
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/data/office/xlsx-to-python/dark-intelligence-archive-generation
SKILL.md
Dark Intelligence Archive Generation
Dark Intelligence Archive Generation
Convert extraction results to the canonical archive YAML:
def formula_manifest_to_archive(
formula_cells: list[dict],
named_ranges: list[dict],
classification: dict,
category: str,
subcategory: str,
) -> dict:
"""Convert XLSX extraction to dark-intelligence archive YAML."""
name_map = {
f"{nr['sheet']}!{nr['cell_ref']}": nr["name"]
for nr in named_ranges
}
archive = {
"source_type": "excel",
"source_description": f"{category}/{subcategory} calculation",
"extracted_date": datetime.now().strftime("%Y-%m-%d"),
"legal_scan_passed": False, # Must be set after legal scan
"category": category,
"subcategory": subcategory,
"equations": [],
"inputs": [],
"outputs": [],
"worked_examples": [],
"assumptions": [],
"references": [],
}
# Map input cells
for input_ref in classification["inputs"]:
cell = next(
(c for c in formula_cells
if f"{c['sheet']}!{c['ref']}" == input_ref),
None,
)
name = name_map.get(input_ref, input_ref)
archive["inputs"].append({
"name": name,
"symbol": name,
"unit": "", # Must be filled manually or from column headers
"test_value": cell["value"] if cell else None,
})
# Map formula cells as equations
for cell in formula_cells:
cell_id = f"{cell['sheet']}!{cell['ref']}"
if cell_id in classification["inputs"]:
continue
archive["equations"].append({
"name": name_map.get(cell_id, cell["ref"]),
"excel_formula": cell["formula"],
"latex": "", # TODO: formula-to-LaTeX translation
"description": f"Cell {cell['ref']} in {cell['sheet']}",
})
# Map output cells
for output_ref in classification["outputs"]:
cell = next(
(c for c in formula_cells
if f"{c['sheet']}!{c['ref']}" == output_ref),
None,
)
if cell and cell["value"] is not None:
name = name_map.get(output_ref, output_ref)
archive["outputs"].append({
"name": name,
"symbol": name,
"unit": "",
"test_expected": cell["value"],
"tolerance": 1e-6,
})
return archive
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?