aps-doc-hist-union

aps-doc-hist-union is a skill for Claude Code from treasure-data/td-skills. It costs 45 tokens per session (933 once invoked), scanned A, original, Apache-2.0.

A documentation tool for hist-union workflows, which combine historical data with new incremental data. It covers schema checks, time-based partitions, and backfills that reload earlier periods.

In plain words
What is it for?
Use it when documenting hist-union layers and their historical or incremental table workflows.
Why use it?
It helps make table-combination logic clear and records how older data is corrected or rebuilt.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the aps-doc-skills plugin — 6 skills shipped together

Good fit Use it when documenting hist-union layers and their historical or incremental table workflows.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/treasure-data/td-skills/hist-union
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 treasure-data/td-skills --skill hist-union
Clone the repo
git clone --depth 1 https://github.com/treasure-data/td-skills

Made for: Claude Code.

Or install aps-doc-skills, the plugin that ships this one along with the rest of its 6 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 aps-doc-hist-union

README.md
[![agentmods](https://agentmods.dev/badge/skills/treasure-data/td-skills/hist-union/github.svg)](https://agentmods.dev/skills/treasure-data/td-skills/hist-union)
Your own site
<a href="https://agentmods.dev/skills/treasure-data/td-skills/hist-union"><img src="https://agentmods.dev/badge/skills/treasure-data/td-skills/hist-union/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 aps-doc-hist-union

Your own site · 80×15
<a href="https://agentmods.dev/skills/treasure-data/td-skills/hist-union"><img src="https://agentmods.dev/badge/skills/treasure-data/td-skills/hist-union.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 933 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.
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.00045 $0.00933
Opus 5.5 $0.00018 $0.00373
Sonnet 5.5 $0.00009 $0.00187
Haiku 4.5 $0.00005 $0.00093

Measured 3mo ago against content hash 974d92df25e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

aps-doc-hist-union 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 3mo 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.

aps-doc-skills/hist-union/SKILL.md · 201 lines

How it starts

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

APS Hist-Union Documentation Expert

Specialized skill for generating comprehensive documentation for hist-union workflows that combine historical and incremental table data.

When to Use This Skill

Use this skill when:

  • Documenting hist-union workflows
  • Creating documentation for historical data combination logic
  • Documenting backfill processes
  • Generating documentation for table merging strategies
  • Documenting schema validation and consistency checks

Example requests:

"Document the hist-union workflow for events table"
"Create documentation for historical data combination"
"Document the backfill process for customer data"
"Generate hist-union documentation following this template: [Confluence URL]"

🚨 MANDATORY: Codebase Access Required

WITHOUT codebase access = NO documentation. Period.

If no codebase access provided:

I cannot create technical documentation without codebase access.

Required:
- Directory path to hist-union workflows
- Access to .dig, .sql, .yml files

Without access, I cannot extract real table names, union logic, or configurations.
Provide path: "Code is in /path/to/histunion/"

Before proceeding:

  1. Ask for codebase path if not provided
  2. Use Glob to verify files exist
  3. STOP if cannot read files

Documentation MUST contain:

  • Real table names from actual configs
  • Actual SQL UNION logic from codebase
  • Real file paths and line numbers
  • Working examples from actual code

NO generic placeholders. Only real, extracted data.

REQUIRED Documentation Template

Follow this EXACT structure (analyzed from production examples):

# Hist_Union Project Documentation

## Overview
{Brief description of hist-union purpose}

**Key Features:**
- {Feature from actual workflow}
- {Feature from actual workflow}

---

## Architecture

### Project Structure
{Actual directory tree from codebase}

### Configuration
**Databases:**
{Table with database names and purposes}

**Watermark Table:**
{inc_log table structure and purpose}

---

## Processing Patterns

### Pattern 1: Incremental Load (Watermark-Based)
{Explain watermark tracking using inc_log}

**SQL Pattern:**
{Real SQL showing UNION ALL with watermark logic}

### Pattern 2: Full Load (Complete Reload)
{Explain full reload pattern}

**SQL Pattern:**
{Real SQL showing full reload}

---

## Watermark Management

**inc_log Table:**
{Schema and purpose}

**Watermark Update Logic:**
{Explain how watermarks are updated}

---

## Main Workflow Configuration

**Workflow File:** {hist_union_runner.dig}

**Key Features:**
- {Feature from actual .dig file}
- {Feature from actual .dig file}

**Parallel Execution:**
{Explain _parallel settings}

---

## SQL Query Examples

### Example 1: Incremental Load Pattern
{Real SQL from codebase}

### Example 2: Full Load Pattern
{Real SQL from codebase}

### Example 3: Complex Schema
{Real SQL from codebase if applicable}

---

## Tables Processed

{Table organized by data source listing all tables}

---

## Execution Flow

{Step-by-step workflow execution}

**Execution Commands:**
{Real commands from codebase}

---

## Best Practices

{List from actual implementation}

---

## Troubleshooting

**Common Issues:**
{Real issues and solutions}

**Monitoring Queries:**
{Real SQL for checking status}

---

## Maintenance

{Maintenance tasks and schedules}

---

## Summary

{Brief recap of capabilities}

Read the full file on GitHub · 201 lines

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. 3mo ago First seen · 201 lines · 45 tokens per session scan A 974d92df25e2

Subscribe to this mod's changes

aps-doc-hist-union is a skill published in the GitHub repository treasure-data/td-skills (23 stars, last pushed today), licensed Apache-2.0. It adds 45 tokens to every session and 933 once invoked, about $0.0002 per session on Opus 5.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

aps-doc-hist-union compared with skills from other repositories

aps-doc-hist-union next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
aps-doc-hist-uniontreasure-data/td-skillsSkill23todayApache-2.0A45Claude Code
agent-platform-model-registrygoogle/skillsSkill26kyesterdayApache-2.0A60Claude Code, Codex
llm-evaluationsickn33/agentic-awesome-skillsSkill51ktodayMITA25Claude Code
google-cloud-solution-agentic-analytics-spark-knowledge-cataloggoogle/skillsSkill26kyesterdayApache-2.0A132Claude Code, Codex
training-checkwanshuiyin/Auto-claude-code-research-in-sleepSkill20k2d agoMITA35Claude Code
tao-run-inference-serviceNVIDIA/skillsSkill4.3kyesterdayApache-2.0A92Claude Code
nemo-automodel-launcher-configNVIDIA/skillsSkill4.3kyesterdayApache-2.0A30Claude Code