Skip to content

Comments

feat: Add agentskills.io standard compliance#33

Merged
mrbrandao merged 7 commits intoRedHatProductSecurity:mainfrom
mrbrandao:dynamic-module-path
Feb 3, 2026
Merged

feat: Add agentskills.io standard compliance#33
mrbrandao merged 7 commits intoRedHatProductSecurity:mainfrom
mrbrandao:dynamic-module-path

Conversation

@mrbrandao
Copy link
Collaborator

Summary

  • Added support for agentskills.io standard skill structure (SKILL.md at repository root)
  • Enables LOLA to work with single-skill repositories while maintaining full backward compatibility
  • Updated documentation to explain three module patterns: single skill, skill bundle, and AI context module

Related Issues

Fixes #31

Test Plan

Verification steps:

  1. Test single skill detection:
lola mod add https://github.com/user/my-skill.git
lola mod info my-skill  # Should detect skill from SKILL.md at root
  1. Test skill bundle (backward compatibility):
lola mod add https://github.com/user/skill-bundle.git
lola mod info skill-bundle  # Should detect skills from skills/ subdirectory
  1. Test custom content path:
lola mod add https://github.com/company/monorepo.git --module-content=packages/ai-tools
lola install monorepo -a claude-code
  1. Run test suite:
pytest  # All 533 tests passing (515 original + 18 new)

Code changes:

  • src/lola/models.py: Added is_single_skill field, updated skill discovery logic
  • src/lola/targets/base.py: Updated _skill_source_dir() to detect single skills
  • tests/test_single_skill.py: 13 new tests for single skill functionality
  • tests/test_skill_source_dir.py: 5 new tests for path resolution
  • README.md: Documented three module patterns with examples

Checklist

  • Tests pass (pytest) - All 533 tests passing
  • Linting passes (ruff check src tests) - No issues
  • Type checking passes (ty check) - Passes

AI Disclosure

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

mrbrandao and others added 7 commits February 3, 2026 12:14
- Add --module-content flag to `lola mod add` command
- Support "/" value to explicitly use root directory
- Pass content_dirname through fetch and validation chain
- Store content_dirname in .lola-source.yml for updates
- Update Module.from_path() to accept content_dirname parameter
- Add Module._resolve_content_path() for path resolution logic
- Update README with monorepo and flat repo examples
- Update marketplace examples to show path field usage
- Refactor tests to explicitly test custom content dirs
- Remove auto-discovery of lola-module/ (breaking change)

BREAKING CHANGE: lola-module/ is no longer auto-discovered.
Use --module-content=lola-module or path field in marketplaces.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Extract load_registered_module() helper to consistently read
content_dirname from .lola/source.yml. Replace direct Module.from_path()
calls across install.py and mod.py when loading registry modules.

Preserve direct Module.from_path() for non-registry paths in mod info.

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Add is_single_skill field to Module model to detect and handle
single-skill modules (SKILL.md at content root) following the
agentskills.io standard.

- Detect single skill via SKILL.md at content_path root
- Extract skill name from frontmatter metadata or module name
- Update _skills_root_dir() and get_skill_paths() for single skills
- Update _skill_source_dir() to check single skill before bundles
- Maintain backward compatibility with skill bundles and legacy

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add test coverage for single skill functionality
(agentskills.io standard) including:
- Single skill detection with frontmatter name parsing
- Path resolution for root and module/ subdirectory patterns
- Validation of single skill structure
- Precedence rules between skill bundles and single skills
- Custom content directory support
- _skill_source_dir() function behavior for all patterns

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Document three module patterns: single skill, skill bundle, AI context module
- Add content path detection section
- Recommend lola mod init for new modules
- Provide clear guidance on when to use each pattern
Remove unused Path import from test_skill_source_dir.py to
clean up dependencies.
@mrbrandao mrbrandao merged commit b5c4344 into RedHatProductSecurity:main Feb 3, 2026
4 checks passed
@mrbrandao mrbrandao deleted the dynamic-module-path branch February 3, 2026 18:15
@mrbrandao
Copy link
Collaborator Author

This will allow any module structure to be supported in Lola via the flag --module-content or in the marketplace using path: notation.

example:

lola mod add https://github.com/RedHatProductSecurity/secdevai --module-content=templates

cc: @jeremychoi

@SecKatie
Copy link
Contributor

SecKatie commented Feb 3, 2026

Ahh this is amazing!

@mrbrandao mrbrandao added the enhancement New feature or request label Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --module-content flag for custom module directories

2 participants