headysystems/heady-testing/heady-drupal-content-sync

Claude Code and agent skill by headysystems/heady-testing

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Skill for syncing Drupal headless CMS content with HeadyAutoContext vector memory. Use when setting up Drupal integration, configuring webhook receivers, implementing JSON:API polling, indexing Drupal nodes into vector storage, or troubleshooting content sync issues. Official reference: https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module. Triggers on "Drupal", "JSON:API", "CMS sync", "content indexing", "webhook from Drupal", or any Drupal integration task.

Install

npx vskill@latest install headysystems/heady-testing/heady-drupal-content-sync

SKILL.md

The same SKILL.md was published earlier as headysystems/heady-testing/heady-drupal-content-sync.

Heady Drupal Content Sync

When to Use This Skill

Use this skill when:

  • Setting up the Drupal webhook receiver at POST /webhook/drupal
  • Configuring JSON:API polling for content change detection
  • Indexing any of the 13 Drupal content types into vector memory
  • Troubleshooting content sync delays or missed updates
  • Configuring Drupal hook_entity_update to fire webhooks
  • Managing the drupal-sync service at port 8809

Architecture

Drupal CMS (cms.headysystems.com)
│
├── hook_entity_update → POST /webhook/drupal (real-time, preferred)
│ HMAC-SHA256 signature: X-Drupal-Signature: sha256={hex}
│
└── JSON:API polling (fallback, 5-15 min phi-adaptive interval)
GET /jsonapi/node/{type}?filter[changed]>{lastPoll}
Webhook/Polling receiver (drupal-sync service, port 8809)
│
├── Verify HMAC signature (timing-safe comparison)
├── Fetch full node via JSON:API
├── Extract: title, body, summary, tags, URL, changed
├── Batch in groups of 13 (fib(7))
└── POST to AutoContext /context/index-batch
→ 384-dim embedding
→ CSL gate filtering
→ pgvector persistence

Drupal Content Types

Content TypePurposeHeady Sites
articleBlog posts, newsAll sites
documentationTechnical docsheadyio.com, headysystems.com
case_studyEnterprise case studiesheadysystems.com, headyfinance.com
patentPatent descriptionsheadysystems.com
eventCommunity eventsheadyconnection.com
grant_programNonprofit programsheadyconnection.org
agent_listingMarketplace listingsheadyex.com
investor_updateFinancial updatesheadyfinance.com
testimonialSocial proofheadyme.com, all
faqKnowledge baseAll sites
product_catalogService catalogheadyex.com
news_releasePress releasesheadyfinance.com
media_assetImages/videosAll sites

Instructions

Step 1 — Drupal Webhook Configuration

In Drupal admin, configure the Webhooks module:

php
// In a custom module's hook_entity_update():
function mymodule_entity_update(EntityInterface $entity) {
if ($entity->getEntityTypeId() !== 'node') return;
$bundle = $entity->bundle();
$tracked = ['article', 'documentation', 'case_study', 'patent',
'event', 'grant_program', 'agent_listing', 'investor_update',
'testimonial', 'faq', 'product_catalog', 'news_release', 'media_asset'];
if (!in_array($bundle, $tracked)) return;
$payload = [
'entity_type' => 'node',
'bundle' => $bundle,
'uuid' => $entity->uuid(),
'operation' => 'update',
];
$hmac = hash_hmac('sha256', json_encode($payload), DRUPAL_WEBHOOK_SECRET);
\Drupal::httpClient()->post('https://drupal-sync.headysystems.com/webhook/drupal', [
'json' => $payload,
'headers' => ['X-Drupal-Signature' => "sha256={$hmac}"],
]);
}
Step 2 — JSON:API Query Patterns
javascript
// Fetch changed nodes since last poll
const url = `${DRUPAL_BASE_URL}/jsonapi/node/${contentType}?` +
`filter[changed][condition][path]=changed&` +
`filter[changed][condition][operator]=>&` +
`filter[changed][condition][value]=${lastPollISO}&` +
`sort=changed&page[limit]=50&include=field_image,field_tags`;
// Fetch single node by UUID
const url = `${DRUPAL_BASE_URL}/jsonapi/node/${bundle}?filter[id]=${uuid}`;
Step 3 — Content Extraction

Always extract these fields from JSON:API responses:

javascript
function extractNodeContent(node) {
return {
id: node.id, // UUID
type: node.type?.replace('node--', ''),
title: node.attributes.title,
body: node.attributes.body?.value || '',
summary: node.attributes.body?.summary || '',
changed: node.attributes.changed,
langcode: node.attributes.langcode || 'en',
url: `${DRUPAL_BASE_URL}/node/${node.attributes.drupal_internal__nid}`,
};
}
Step 4 — Troubleshooting
SymptomLikely CauseFix
401 on webhookHMAC mismatchVerify DRUPAL_WEBHOOK_SECRET matches on both sides
Missing nodespolling filter wrongCheck changed field format (ISO 8601)
Empty bodyJSON:API field not enabledEnable field in Drupal JSON:API resource config
Slow indexingbatch too largeReduce from 13 to fib(6)=8

Environment Variables

DRUPAL_BASE_URL=https://cms.headysystems.com
DRUPAL_WEBHOOK_SECRET=<secret — store in secret-gateway>
AUTOCONTEXT_URL=http://heady-auto-context:8907
VECTOR_MEMORY_URL=http://heady-memory:8106

References

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/headysystems/heady-testing/heady-drupal-content-sync/badge)](https://verified-skill.com/skills/headysystems/heady-testing/heady-drupal-content-sync)

Something wrong with this skill or its page? Tell us.