konflux-ci/segment-bridge/updating-segment-event-mappings
Claude Code and agent skill by konflux-ci/segment-bridge
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
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-mappingsSemi-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:
| File | Event type | |
|---|---|---|
scripts/jq/transform-record.jq | PipelineRun (Started + Completed) | |
scripts/jq/transform-konflux.jq | Konflux operator record | |
scripts/jq/transform-namespace.jq | Namespace Created | |
scripts/jq/transform-component.jq | Component Created | |
scripts/jq/transform-application.jq | Application Created | |
scripts/jq/transform-release.jq | Release Created, Release Released | |
scripts/jq/heartbeat.jq | Segment Bridge Heartbeat | |
scripts/jq/filter-pipelineruns.jq | Pre-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
3. Run the integration test
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
go test ./tekton-to-segment/...git diff tekton-to-segment/sample/— should show only your intended changespre-commit run --all-files- 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
- SKILL.md in the repositoryCheckingskills/updating-segment-event-mappings/SKILL.md
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
[](https://verified-skill.com/skills/konflux-ci/segment-bridge/updating-segment-event-mappings)