construct-ai-primary/agent-companies-paperclip/database-cascade-management-devforge
Claude Code and agent skill by construct-ai-primary/agent-companies-paperclip
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Use when database foreign key cascade issues occur, deletion operations fail with constraint violations, or data model changes require cascade path updates. Handles company deletion CASCADE failures, orphaned records, and migration planning.
Install
npx vskill@latest install construct-ai-primary/agent-companies-paperclip/database-cascade-management-devforgeSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as construct-ai-primary/agent-companies-paperclip/database-cascade-management-devforge.
Database Cascade Management - DevForge AI
Overview
Handles database foreign key cascade issues in the Paperclip codebase. Resolves deletion operation failures caused by missing CASCADE constraints, plans safe migration paths for schema changes, and ensures data integrity during company/agent lifecycle operations.
When to Use
- When
DELETE /api/companies/:idfails with FK constraint violations - When orphaned records remain after parent entity deletion
- When schema migrations need CASCADE path additions
- When activity_log, cost_events, issue_read_states block deletion
- Don't use when: It's a query performance issue (use schema-devforge-data-schema-management)
Core Procedures
Cascade Fix Workflow
- Identify Blocking Constraints - Run deletion, capture FK violation errors
- Map Dependency Graph - Trace all tables referencing the target entity
- Determine Cascade Strategy - Decide CASCADE vs SET NULL vs manual deletion order
- Write Migration - Add ON DELETE CASCADE to appropriate FK constraints
- Test Deletion - Verify full cascade works with realistic test data
- Add Integration Test - Ensure deletion path is covered
Common Blocking Tables
activity_log.run_id→heartbeat_runs.idcost_events.heartbeat_run_id→heartbeat_runs.idissue_read_states.issue_id→issues.idagent_wakeup_requests→agents/heartbeat_runsgoals→ blocked byprojects.goal_id
Agent Assignment
Primary Agent: devcore-devforge-core-development Company: DevForge AI Role: Database Cascade Specialist Reports To: devcore-devforge-core-development Backup Agents: schema-devforge-data-schema-management, database-infraforge-database-infrastructure
Success Metrics
- Company deletion completes without manual SQL intervention
- All dependent tables properly cascaded
- No orphaned records after deletion
- Deletion covered by integration tests
Error Handling
- Error: CASCADE would delete unintended data
Response: Use soft delete pattern or manual ordered deletion instead
- Error: Circular FK prevents CASCADE
Response: Break circular dependency, use deferred constraints
Cross-Team Integration
Gigabrain Tags: devforge, database, cascade, foreign-key, migration, deletion Related Skills: devcore-devforge-core-development, schema-devforge-data-schema-management, database-infraforge-database-infrastructure Last Updated: 2026-04-07
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinghermes_agent/docs-paperclip/companies/devforge-ai/skills/database-cascade-management-devforge/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/construct-ai-primary/agent-companies-paperclip/database-cascade-management-devforge)