Skip to content

Conversation

@Alan-TheGentleman
Copy link
Contributor

@Alan-TheGentleman Alan-TheGentleman commented Jan 9, 2026

Context

AI coding assistants (Claude, Gemini, Copilot) don't reliably auto-invoke skills even when the Trigger: in SKILL.md descriptions matches the user's request. This is a known issue - AI treats skill suggestions as "background noise" and proceeds with its default approach.

Solution: Explicit commands in AGENTS.md files force the AI to use skills. The Auto-invoke Skills section tells the AI: "When performing X action, ALWAYS invoke Y skill FIRST."

Description

This PR standardizes AI assistant configuration and automates skill invocation:

1. AGENTS.md as source of truth

  • Edit AGENTS.md once, sync to format-specific copies (CLAUDE.md, GEMINI.md, copilot-instructions.md)
  • Each component directory (ui/, api/, prowler/) has its own AGENTS.md with context-specific rules

2. Auto-invoke Skills sections

  • Added to root, ui/, api/, and prowler/ AGENTS.md files
  • Explicitly commands AI to invoke skills for specific actions
  • Solves the "skills not triggering" problem

3. skill-sync automation (NEW)

  • New skill-sync skill with sync.sh script
  • Reads metadata.scope and metadata.auto_invoke from each SKILL.md
  • Auto-generates Auto-invoke tables in corresponding AGENTS.md files
  • 22 unit tests for the sync script

4. Skill metadata fields (NEW)

  • Added metadata.scope (ui, api, sdk, root) to 17 skills
  • Added metadata.auto_invoke (action description) to 17 skills
  • Generic skills (pytest, typescript, etc.) intentionally have no scope

Usage

# Setup AI assistants (creates symlinks + copies AGENTS.md)
./skills/setup.sh

# After creating/modifying a skill, sync Auto-invoke sections
./skills/skill-sync/assets/sync.sh

# Dry run to preview changes
./skills/skill-sync/assets/sync.sh --dry-run

# Sync specific scope only
./skills/skill-sync/assets/sync.sh --scope ui

Files Changed

Category Files
Scripts skills/setup.sh, skills/skill-sync/assets/sync.sh
Tests skills/setup_test.sh, skills/skill-sync/assets/sync_test.sh
AGENTS.md root, ui/, api/, prowler/
Skills (metadata) 17 skills with scope + auto_invoke
Documentation skills/README.md

Why This Matters

Without this:

  • Developer asks AI to "create a new check"
  • AI ignores prowler-sdk-check skill and does it wrong

With this:

  • AGENTS.md says "Creating new checks → invoke prowler-sdk-check"
  • AI loads the skill and follows correct patterns

Test Plan

  • ./skills/setup_test.sh - 19 tests pass
  • ./skills/skill-sync/assets/sync_test.sh - 22 tests pass
  • Run ./skills/setup.sh --all and verify files created
  • Run ./skills/skill-sync/assets/sync.sh --dry-run and verify output
  • Verify Auto-invoke sections in ui/, api/, prowler/, root AGENTS.md

References

- setup.sh now copies AGENTS.md to CLAUDE.md, GEMINI.md, and
  .github/copilot-instructions.md for each AI assistant
- Added Auto-invoke Skills section to AGENTS.md to trigger
  skills automatically when performing specific actions
- Updated .gitignore to ignore generated instruction files

AGENTS.md remains the source of truth. Edit it and re-run
the script to sync all AI assistants.
@Alan-TheGentleman Alan-TheGentleman requested a review from a team as a code owner January 9, 2026 22:10
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

⚠️ Changes detected in the following folders without a corresponding update to the CHANGELOG.md:

  • api
  • ui
  • prowler

Please add an entry to the corresponding CHANGELOG.md file to maintain a clear history of changes.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

🔒 Container Security Scan

Image: prowler:87ec649
Last scan: 2026-01-12 20:14:12 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 3
Total 3

3 package(s) affected

⚠️ Action Required

Critical severity vulnerabilities detected. These should be addressed before merging:

  • Review the detailed scan results
  • Update affected packages to patched versions
  • Consider using a different base image if updates are unavailable

📋 Resources:

- Add interactive menu to select AI assistants (Claude, Gemini, Codex, Copilot)
- Add CLI flags for non-interactive usage (--claude, --gemini, --codex, --copilot, --all)
- Refactor setup logic into reusable functions
- Add 19 unit tests covering flags, symlinks, AGENTS.md copying, and idempotency
@Alan-TheGentleman Alan-TheGentleman force-pushed the feat/ai-skills-sync-agents-md branch from 70d4246 to 1eac7d9 Compare January 9, 2026 22:41
- Create skill-sync skill with sync.sh script and 22 unit tests
- Add metadata.scope and metadata.auto_invoke to 17 skills
- Auto-generate Auto-invoke sections in ui/, api/, prowler/, root AGENTS.md
- Update skills/README.md with Auto-invoke documentation

The Auto-invoke sections solve a known issue where AI assistants ignore
skills even when Trigger: descriptions match. Explicit commands force
the AI to load skills before performing actions.

Usage: ./skills/skill-sync/assets/sync.sh [--dry-run] [--scope <scope>]
@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

🔒 Container Security Scan

Image: prowler-ui:1f8592e
Last scan: 2026-01-13 10:11:00 UTC

✅ No Vulnerabilities Detected

The container image passed all security checks. No known CVEs were found.

📋 Resources:

@github-actions
Copy link
Contributor

github-actions bot commented Jan 12, 2026

🔒 Container Security Scan

Image: prowler-api:1f8592e
Last scan: 2026-01-13 10:11:15 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 11
Total 11

10 package(s) affected

⚠️ Action Required

Critical severity vulnerabilities detected. These should be addressed before merging:

  • Review the detailed scan results
  • Update affected packages to patched versions
  • Consider using a different base image if updates are unavailable

📋 Resources:

@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.51%. Comparing base (17f5633) to head (622397c).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #9751       +/-   ##
===========================================
+ Coverage   58.94%   92.51%   +33.57%     
===========================================
  Files           8      163      +155     
  Lines         397    23285    +22888     
===========================================
+ Hits          234    21543    +21309     
- Misses        163     1742     +1579     
Flag Coverage Δ
api 92.51% <ø> (?)
prowler-py3.10-kubernetes ?
prowler-py3.11-kubernetes ?
prowler-py3.12-kubernetes ?
prowler-py3.9-kubernetes ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler ∅ <ø> (∅)
api 92.51% <ø> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pedrooot pedrooot mentioned this pull request Jan 13, 2026
20 tasks
Add new Agent Skill for reviewing PRs that add or modify compliance
frameworks. This skill provides:

- Review checklist with pass/fail criteria
- Validation script to verify check existence and JSON validity
- Decision tree for review recommendations
- Dashboard file pattern reference

The skill complements prowler-compliance (creates frameworks) by
focusing on the review/validation process.
- Rename "Validation Commands" to "Commands"
- Replace "Agent Integration" with "Testing the Compliance Framework"
- Fix awk multi-line string handling in sync.sh by using temp file
- Add scope and auto_invoke metadata to prowler-compliance-review skill
- Regenerate AGENTS.md Auto-invoke sections
Add prowler-compliance-review, prowler-ci, and skill-sync to the
AI Skills architecture diagram and Skills Included table.
andoniaf
andoniaf previously approved these changes Jan 13, 2026
pedrooot
pedrooot previously approved these changes Jan 13, 2026
@pedrooot pedrooot dismissed stale reviews from andoniaf and themself via 0dffc7d January 13, 2026 09:56
andoniaf
andoniaf previously approved these changes Jan 13, 2026
pedrooot
pedrooot previously approved these changes Jan 13, 2026
@pedrooot pedrooot dismissed stale reviews from andoniaf and themself via 3ff14ab January 13, 2026 10:01
pedrooot
pedrooot previously approved these changes Jan 13, 2026
@pedrooot pedrooot added the no-changelog Skip including change in changelog/release notes label Jan 13, 2026
Add skills/** and **/AGENTS.md to files_ignore in SDK workflows to
skip unnecessary CI runs for documentation-only changes.
@andoniaf andoniaf requested a review from a team as a code owner January 13, 2026 10:03
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Jan 13, 2026
Add AGENTS.md to files_ignore in API and UI workflows to skip
unnecessary CI runs for agent documentation changes.
@Alan-TheGentleman Alan-TheGentleman merged commit c8fab49 into master Jan 13, 2026
41 checks passed
@Alan-TheGentleman Alan-TheGentleman deleted the feat/ai-skills-sync-agents-md branch January 13, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/api component/ui documentation github_actions Pull requests that update GitHub Actions code no-changelog Skip including change in changelog/release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants