Skip to content

feat(be): Add proto-writer skill and TAGS.md reference#21020

Open
charmik-redhat wants to merge 1 commit into
masterfrom
charmik/proto-writer-skill
Open

feat(be): Add proto-writer skill and TAGS.md reference#21020
charmik-redhat wants to merge 1 commit into
masterfrom
charmik/proto-writer-skill

Conversation

@charmik-redhat

@charmik-redhat charmik-redhat commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Description

Add comprehensive proto tag reference and interactive Claude Code skill for creating/modifying StackRox protobuf definitions and Postgres store generation.

proto/TAGS.md — Reference covering all 8 tag types (sql, search, policy, hash, sensorhash, scrub, validate, crYaml), gen.go flags, scenarios, and type mappings.

.claude/skills/proto-writer/SKILL.md — Interactive workflow skill guiding proto changes through tag decisions, architectural choices (embedded vs FK, search scope, API/storage separation), gen.go creation, and registration steps.

User-facing documentation

  • CHANGELOG.md update is not needed
  • documentation PR is not needed

Testing and quality

  • the change is production ready

Automated testing

Documentation and skill files only — no code changes, no tests needed.

How I validated my change

Tested the skill by generating a set of connected protos that have FK dependencies, searchable fields, and secret fields. Compared agent performance with and without the skill. Skill performance was better (less tokens, duration) when generating a completely new set of protos, while the performance with and without skill was identical when a clear repeatable pattern existed in the code base (e.g., flatten NodeCVEs by following the example of ImageCVEV2).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@charmik-redhat

Copy link
Copy Markdown
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@openshift-ci

openshift-ci Bot commented Jun 8, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 6f80551b-443c-4266-a11d-5368ae3ae3f4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch charmik/proto-writer-skill

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Build Images Ready

Images are ready for commit 848f76d. To use with deploy scripts:

export MAIN_IMAGE_TAG=4.12.x-102-g848f76dcbf

@charmik-redhat charmik-redhat changed the title Add proto-writer skill and proto/TAGS.md reference guide docs: add proto-writer skill and TAGS.md reference Jun 9, 2026
@charmik-redhat charmik-redhat changed the title docs: add proto-writer skill and TAGS.md reference feat(be): Add proto-writer skill and TAGS.md reference Jun 9, 2026
@charmik-redhat charmik-redhat marked this pull request as ready for review June 9, 2026 05:09
@charmik-redhat charmik-redhat requested review from a team June 9, 2026 05:10

@vikin91 vikin91 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes regarding the invocation method. I didn't review the contents of the skill.

Comment on lines +2 to +4
name: proto-writer
description: Guide the creation or modification of StackRox protobuf definitions and Postgres store generation. Use when creating new storage types, adding fields to existing protos, setting up gen.go files, or making architectural decisions about data modeling (embedded vs FK relationships, search scope, API/storage separation).
---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: proto-writer
description: Guide the creation or modification of StackRox protobuf definitions and Postgres store generation. Use when creating new storage types, adding fields to existing protos, setting up gen.go files, or making architectural decisions about data modeling (embedded vs FK relationships, search scope, API/storage separation).
---
name: proto-writer
description: Guide the creation or modification of StackRox protobuf definitions and Postgres store generation. Use when creating new storage types, adding fields to existing protos, setting up gen.go files, or making architectural decisions about data modeling (embedded vs FK relationships, search scope, API/storage separation).
disable-model-invocation: true
---

This skill targets a very specific task. It would be good to let the Agents skip it if not needed. Note that in Cursor, you cannot explicitly disable skills, to we either need disable-model-invocation: true, or the skill should go to a different repo, for example stackrox/skills. Otherwise, the Agents will evaluate whether to use that skill or not on almost every prompt related to that repo.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been thinking about this since the demo. I've seen anecdotally where having a bunch of skills in the repo can degrade the quality of the work the robots do. It may be better to start with it in the skills repo instead and advertise that it is there.

@charmik-redhat charmik-redhat Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can definitely disable auto invocation of this skill or move it to stackrox/skills.

What do you think about the TAGS.md documentation? Do you think that should be moved to the separate repo too? While the documentation looks accurate as far as I can tell, I wouldn't want an agent to go down some unintended rabbit hole after consuming all that context. As I had mentioned in my demo, when a replicable example exists in the codebase, the agent would do just fine by following the same pattern. But when designing something entirely new (like when we flattened ImageCVE the first time), the skill and documentation could be useful.

- Should it cascade delete? (default yes) If restrict -> add `,restrict-delete` (use sparingly)

4. **Should this field be indexed?**
- Yes -> `sql:"index=btree"` (default), or `hash` for equality-only, `brin` for time-series, `gin` for arrays

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even for equality we found hash to have a lot of overhead and expense. Do not recommend using hash unless there is a very specific use case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants