Skip to content

Work with an AI coding assistant

You can build and run tdfs4ds pipelines by describing what you want to an AI coding assistant (Claude Code, or any assistant that reads SKILL.md files). The package ships the instructions the assistant needs, so the code it writes follows the conventions of the package instead of guesses.

What a skill is

A skill is a Markdown file (SKILL.md) with a name and a description. The assistant reads the descriptions, loads the skill whose description matches your request, and follows it. A tdfs4ds skill holds a code pattern with the values to ask you for, a list of rules, and links to the neighbouring skills. The description also says when to skip to another skill, so a request for "is my pipeline healthy" reaches fs-sanity-check and not fs-analyze.

The skills carry the practices of Good practices: entity_id is a list of columns, processes are refreshed only through run() and roll_out(), histories are built forward from the first date, a removal is planned first, and so on. They ship inside the package, so they are the version that matches your installed tdfs4ds.

Set up

Install the skills once, from the environment where tdfs4ds is installed:

import tdfs4ds

tdfs4ds.install_skills()                                   # user level: ~/.claude/skills/, every project
tdfs4ds.install_skills('.claude/skills')                   # project level: this repository only
tdfs4ds.install_skills(skills=['fs-setup', 'fs-upload'])   # a subset
tdfs4ds.export_skills('.claude/skills')                    # add the missing ones, keep existing copies

tdfs4ds.list_skills()                                      # the bundled names
tdfs4ds.skill_catalog()                                    # name and description of each

From a terminal: tdfs4ds-install-skills, with --target DIR, --skill NAME (repeatable), --no-overwrite and --list.

Call Overwrites existing copies Use it for
install_skills(target_dir=None, *, overwrite=True, skills=None, verbose=True) yes, by default the first install, and every upgrade
export_skills(target_dir, *, overwrite=False, skills=None, verbose=True) no, by default adding skills to a folder where you have changed some

install_skills_global() and install_skills_local() are the same call with the target set to ~/.claude/skills/ and ./.claude/skills/.

Re-install after every upgrade

The skills in the package are the source of truth; the installed folder holds copies. The skills change with the package (new functions, new rules). After pip install -U tdfs4ds, run tdfs4ds.install_skills() again, or the assistant follows the instructions of the old version. Do not edit an installed copy: the next install replaces it.

Check what the assistant sees with tdfs4ds.list_skills() (47 names) and by looking in the target folder: one folder per skill, each with a SKILL.md.

Share with a team

  • Commit .claude/skills/ to the repository of the project. Everybody gets the same skills with git pull. Commit the re-installed copies when someone upgrades tdfs4ds.
  • Or each person installs from the package with the command above, in the same tdfs4ds version as the team's.

Either way, keep the team on one tdfs4ds version.

Which skill for which request

You do not choose the skill: the assistant does, from your sentence. This table shows what each skill covers, so you know what to ask for.

You want to Skill What it does
Connect and create the store fs-setup Connection, setup(), data domain
Register a process from SQL or a DataFrame fs-upload upload_features on a permanent view
Register a trained tdstone2 model's outputs fs-tdstone2 upload_tdstone2_scores
Run one segment at a time fs-filter FilterManager, alone or under a TimeManager
Run at a business date, backfill, rebuild a history fs-rollout TimeManager, run, roll_out, one clock per data domain
Build a dataset (snapshot, as of, history, lags) fs-dataset build_dataset, build_historical_dataset, offsets
Browse the catalogs and the run history fs-inspect Processes, features, datasets, follow-up, exports, removal
Document the store fs-document LLM or manual documentation, EXPLAIN score
See where data comes from fs-lineage Dependency graph and Sankey for one process
Keep the lineage graph, or study an impact before a change fs-lineage-graph Persisted graph, scoped refresh, check_downstream_processes, impact_of
Find out why a process is slow fs-analyze Lineage, EXPLAIN, partition opportunities, FilterManager proposal
Get a health report fs-sanity-check sanity_check: verdict, whether each process can be refreshed
Know how the pipeline is built fs-workflow-assessment Entity keys, order, leakage, skew, partitioning, as data
Give features their own table, change a primary index fs-relocate plan_relocation, relocate_features, verify_relocation
Promote work from a lab store to production fs-migrate plan_migration, approval, migrate_objects
Read another store without copying fs-federation Read-only stores, federated catalogs
Start the chatbot fs-agent Consumer agent, index, UI
Configure the vector index fs-vector-store Chroma or Teradata Enterprise Vector Store
Host the chatbot on AI Studio fs-deploy-agentops Package, deploy, smoke test
Host your own agent on AI Studio td-agentops-custom-agent Runtime contract and the failures it avoids
Draw a chart in the database td-plot TD_PLOT through plot_*
Read an EXPLAIN plan td-explain Flow diagram and bottlenecks of a plan
Segment entities with k-means td-kmeans Fit in the database, register the labels as a feature
UAF diagnostics as features td-uaf-feature TD_ACF, TD_DICKEY_FULLER inline in a view
UAF values in an ART layer td-uaf-art 'uaf art view' with art_sql and art_layers
Forecast series in Vantage td-uaf-forecast Holt-Winters, ARIMA, registered as a feature
Design an analytics project td-analytics-workflow Rules, ML, agent: the reference architecture
Score, simplify, optimise a query qo-skill-explain, qo-skill-simplify, qo-skill-optimize The query-optimizer pipeline
Read an agent evaluation file eval-inspect One scenario, worst turns, per-skill scores

The ca-* skills (16) are not for the coding assistant. They describe the intents of the consumer agent and the agent loads them itself.

Example prompts

Say what you want and what you know. The assistant asks for the rest (database, data domain, dates). Each prompt below names the skill it should reach.

Data engineer

Prompt Skill
"Register SELECT customer_id, SUM(amount) ... FROM sales.transactions as a process on entity customer_id, with the daily business date from our TimeManager, and do not run it yet." fs-upload
"Build the history of this process from 2024-01-01 to today." fs-rollout
"Run all the processes of the SALES domain at the current business date, in dependency order." fs-rollout
"This source is too big for one pass. Run it one region at a time." fs-filter
"I want to remove the column MAX_SPEND from process X. What reads it, and what would break?" fs-lineage-graph (impact_of)
"Run a sanity check on the SALES domain and tell me whether each process can still be refreshed." fs-sanity-check
"Two of my processes on the same entity run one after the other. Why, and how do I fix it?" fs-relocate
"Promote the churn processes from the lab store to production." fs-migrate

Data scientist

Prompt Skill
"Build a dataset of the customer features as of 2024-06-30." fs-dataset
"Build a historical dataset of the last 12 months with the spend lagged one month." fs-dataset
"Plot the distribution of AVG_BASKET and its change over time." td-plot
"Cluster the customers on these four features and store the cluster as a feature." td-kmeans
"Forecast the weekly volume per store with Holt-Winters and keep it as a feature." td-uaf-forecast
"Register the scores of my trained tdstone2 model as features." fs-tdstone2

Administrator

Prompt Skill
"Connect to the database, create the feature store in FS_PROD and select the data domain." fs-setup
"Switch the agent's vector index from Chroma to the Teradata Vector Store." fs-vector-store
"Document the whole store and rebuild the index." fs-document
"Package the consumer agent and deploy it to AgentOps." fs-deploy-agentops
"Which objects are in the store, and which are orphans?" fs-inspect

Review what the assistant writes

The assistant writes code; you remain responsible for running it. Check the code against this list before you run it. Each line is a rule of Good practices.

  • entity_id is a list of column names, not a dictionary of types.
  • Nothing loops around run() or roll_out(), no FEATURE_STORE_TIME is set by hand to replay dates, and nothing writes or deletes in an FS_T_* table. The framework walks the dates and the segments.
  • A history uses a TimeManager or the domain clock, and is built forward from the first date. A rebuild is roll_out(..., time_id_start=1, force_compute=True).
  • A schedule runs the domain (run(data_domain=...), roll_out(data_domain=...)), so the processes share one valid time and run in dependency order, not run(pid) alone.
  • A heavy SQL query is validated before it runs: upload_features(..., run_now=False) checks the source with EXPLAIN, and the sanity check reads the result.
  • Before an edit of a process, a view, a source table or a dataset, the assistant ran impact_of and you read the verdicts.
  • A removal comes from plan_removal, not from a hand-written DROP or DELETE.
  • No credential is in the code, in the prompt or in a file you commit. The code reads the TDFS4DS_* variables from .env or the environment.
  • The assistant did not run a destructive call (remove_*, migrate_objects, relocate_features, REPLACE VIEW, DROP) without asking you. Ask for the plan or the dry run first; confirm the apply yourself.

Tell the assistant to stop at the plan

"Show me the plan and the dry run, do not apply" is enough. Planners (plan_migration, plan_relocation, plan_removal, impact_of) change nothing.

Limits

  • The assistant knows the skills and what you show it. It does not know your data. Check the values, the row counts and the follow-up of a run, as you would for code you wrote.
  • The skills target the installed tdfs4ds version. Re-install them after an upgrade, and keep the assistant on the same version as the code it writes for.
  • A skill is advice that the assistant may misread. If the code ignores a rule, point to it by name ("follow the rules of fs-rollout") or give the sentence of the rule.
  • An assistant has no Teradata session of its own. It writes code that you run in your session, or runs it in a terminal you let it use. Give it the least access that does the job.

See also