Skip to content

Ignore .grok/skills in Lab workspaces - #791

Open
martian56 wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
martian56:fix-grok-skills-gitignore
Open

Ignore .grok/skills in Lab workspaces#791
martian56 wants to merge 1 commit into
PrimeIntellect-ai:mainfrom
martian56:fix-grok-skills-gitignore

Conversation

@martian56

Copy link
Copy Markdown

Closes #790.

When grok is selected during prime lab setup, the workspace gets a .grok/skills/ directory, but that path was never added to .gitignore and wasn't flagged by prime lab hygiene / prime lab doctor. Every other agent's skills directory is ignored, so grok's generated files could be committed by accident.

The two lists in lab_hygiene.py (LAB_GITIGNORE_PATTERNS and LAB_TRACKED_PREFIXES) were hand-maintained copies of the per-agent skills directories, and grok was missing from both. Rather than just add the one line, I pulled the skill directories into a single LAB_AGENT_SKILL_DIRS tuple and derive both lists from it, so they can't drift apart again.

Added tests/test_lab_hygiene.py, which walks every agent from the registry and asserts its project skill directory is covered by both lists. Without the fix it fails on grok; with it, it passes.

Testing

uv run pytest tests/test_lab_hygiene.py

The rest of the Lab test suite is unchanged by this PR. A handful of pre-existing failures in tests/test_lab_setup.py reproduce on main as well — they're unrelated (Windows path-separator assertions and symlink behaviour in the download/skill-sync tests).

@martian56

Copy link
Copy Markdown
Author

@JannikSt can you take a look at this

prime lab setup creates a .grok/skills directory when Grok is selected as
a coding agent, but the Lab gitignore patterns and git-hygiene checks
never listed it. The generated skill files ended up untracked and were
never flagged, so they could be committed by accident.

Both lists were hand-maintained copies of the per-agent skill directories,
which is how grok slipped through. Derive them from a single
LAB_AGENT_SKILL_DIRS tuple instead, add grok to it, and add a test that
walks every agent in the registry and asserts its skill directory is
covered by both lists so a new agent can't drift again.
@martian56
martian56 force-pushed the fix-grok-skills-gitignore branch from 985b07c to a1786b3 Compare July 28, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

prime lab setup doesn't gitignore .grok/skills when Grok is a selected agent

1 participant