konflux-ci/segment-bridge/updating-segment-event-mappings

Claude Code and agent skill by konflux-ci/segment-bridge

Trust tier 2
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
LLM review pending
Source check pending

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

Guides changes to the jq transforms in scripts/jq/ that transform NDJSON records into Segment batch events. Covers updating field mappings, adding new event properties, and regenerating the sample fixtures. Use when the user asks to change what data is sent to Segment, add a new event property, or modify the Segment event schema.

Install

npx vskill@latest install konflux-ci/segment-bridge/updating-segment-event-mappings

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as konflux-ci/segment-bridge/updating-segment-event-mappings.

Updating Segment event mappings

How the transform works

scripts/tekton-to-segment.sh reads enriched NDJSON from stdin (output of get-konflux-public-info.sh) and uses a jq pipeline to produce Segment track events. Each input line becomes one output event.

The jq transform logic lives in standalone `.jq` files under scripts/jq/, loaded by tekton-to-segment.sh via jq -f. Each file handles a distinct record type:

FileEvent type
scripts/jq/transform-record.jqPipelineRun (Started + Completed)
scripts/jq/transform-konflux.jqKonflux operator record
scripts/jq/transform-namespace.jqNamespace Created
scripts/jq/transform-component.jqComponent Created
scripts/jq/transform-application.jqApplication Created
scripts/jq/transform-release.jqRelease Created, Release Released
scripts/jq/heartbeat.jqSegment Bridge Heartbeat
scripts/jq/filter-pipelineruns.jqPre-filter: keep only PipelineRuns

Canonical files:

  • Orchestration script: scripts/tekton-to-segment.sh
  • jq transform files: scripts/jq/
  • Sample input: tekton-to-segment/sample/input.json
  • Expected output: tekton-to-segment/sample/expected.json
  • Regeneration scripts: tekton-to-segment/sample/prepare-input.sh,

tekton-to-segment/sample/prepare-expected.sh

Steps

1. Edit the jq transform

Identify which event type you are changing from the table above, then edit the corresponding file in scripts/jq/. The orchestration script scripts/tekton-to-segment.sh calls these files with jq -f; you do not normally need to edit the shell script itself unless you are adding a brand-new event type or changing the dispatch logic.

Keep the output schema compatible with Segment's track call: each event needs type, event, properties, and messageId.

2. Regenerate sample fixtures
bash
cd tekton-to-segment/sample
./prepare-input.sh # regenerate input.json from source data
./prepare-expected.sh # regenerate expected.json by running the transform
3. Run the integration test
bash
go test ./tekton-to-segment/...

The test compares the script's output against expected.json.

4. CI drift check

The tekton-sample-input GitHub Actions workflow reruns the prepare scripts and fails if committed samples don't match. The regeneration step above prevents this.

Verification checkpoint

  1. go test ./tekton-to-segment/...
  2. git diff tekton-to-segment/sample/ — should show only your intended changes
  3. pre-commit run --all-files
  4. Stop and show results before committing.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

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

Source

Popularity

Repository forks
16
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

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/konflux-ci/segment-bridge/updating-segment-event-mappings/badge)](https://verified-skill.com/skills/konflux-ci/segment-bridge/updating-segment-event-mappings)

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