Detect Foreign Keys
Identify foreign key relationships between tables using heuristics, value overlap analysis, and referential integrity checks
Install
/plugin marketplace add tilmon-engineering/claude-skillsThe repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.
npx skills add tilmon-engineering/claude-skills --skill detect-foreign-keysgit clone --depth 1 https://github.com/tilmon-engineering/claude-skills.git /tmp/claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/claude-skills/plugins/datapeeker/skills/detect-foreign-keys ~/.claude/skills/detect-foreign-keysPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Detecting Foreign Keys ## Purpose This component skill guides systematic foreign key relationship detection in relational databases. Use it when: - Multiple tables exist in the database and relationships are undocumented - Need to understand table relationships before joining data - Validating referential integrity between tables - Identifying orphaned records that reference non-existent parent records - Referenced by importing-data or cleaning-data skills requiring relationship analysis ## Prerequisites - Tables exist in database (relational database with SQL support) - SQL query tool available (database CLI, IDE, or query interface) - Table schemas have been examined (Phase 1 of understanding-data) - Analysis workspace created ## Foreign Key Detection Process Create a TodoWrite checklist for the 5-phase FK detection process: ``` Phase 1: Candidate Identification - pending Phase 2: Value Overlap Analysis - pending Phase 3: Cardinality Assessment - pending Phase 4: Referential Integrity Validation - pending Phase 5: Relationship Documentation - pending ``` Mark each phase as you complete it. Document all findings in structured format. --- ## Phase 1: Candidate Identification **Goal:** Identify columns that are likely foreign keys based on naming patterns, data types, and uniqueness. ### Identify Candidate FK Columns by Naming Convention **Common FK naming patterns:** - Columns ending in `_id` (e.g., `customer_id`, `product_id`)
Details
- Skill name
detect-foreign-keys- Repository
- tilmon-engineering/claude-skills
- Path
plugins/datapeeker/skills/detect-foreign-keys/SKILL.md- License
- MIT
- Repo updated
- 22 May 2026
FAQ
What does the Detect Foreign Keys skill do?
Identify foreign key relationships between tables using heuristics, value overlap analysis, and referential integrity checks
How do I install the Detect Foreign Keys skill?
Claude Code plugin: /plugin marketplace add tilmon-engineering/claude-skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Detect Foreign Keys popular?
It lives in tilmon-engineering/claude-skills, which has 5 GitHub stars and 2 forks.
Related skills
Analyze Branch
5tilmon-engineering/claude-skills
Use when analyzing another branch's iteration journals to extract findings, decisions, and insights from divergent work
Branch Status
5tilmon-engineering/claude-skills
Use when user wants detailed status report for single autonomy branch including iteration timeline and metrics progression
Checkpoint Iteration
5tilmon-engineering/claude-skills
Use when saving current iteration progress mid-conversation, before context compaction, or at interim pause points
List Worktrees
5tilmon-engineering/claude-skills
Use when user wants to see all autonomy worktrees with their status
Create Goal
5tilmon-engineering/claude-skills
Use when setting up a new open-ended goal for autonomy tracking, before starting the first iteration
Ww Recall
5astoreyai/claude-skills
Recall memories from World Weaver using multi-strategy retrieval
Browse the most popular Claude skills, all other skills, or write your own with the skills generator.